]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/simple_preferences.hpp
Small fix for Windows compilation... gruiking because MOC doesn't understand #ifdef...
[vlc] / modules / gui / qt4 / components / simple_preferences.hpp
1 /*****************************************************************************
2  * simple_preferences.hpp : Simple prefs
3  ****************************************************************************
4  * Copyright (C) 2006 the VideoLAN team
5  * $Id: preferences.hpp 16348 2006-08-25 21:10:10Z zorglub $
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef _SIMPLEPREFS_H_
25 #define _SIMPLEPREFS_H_
26
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
30
31 #include <vlc/vlc.h>
32 #include <vlc_interface.h>
33 #include <QWidget>
34
35 #include "ui/sprefs_input.h"
36 #include "ui/sprefs_audio.h"
37 #include "ui/sprefs_video.h"
38 #include "ui/sprefs_subtitles.h"
39 #include "ui/sprefs_interface.h"
40
41 enum {
42     SPrefsInterface = 0,
43     SPrefsAudio,
44     SPrefsVideo,
45     SPrefsSubtitles,
46     SPrefsInputAndCodecs,
47     SPrefsHotkeys,
48     SPrefsMax
49 };
50 #define SPrefsDefaultCat SPrefsInterface
51
52 enum {
53     CachingCustom = 0,
54     CachingLowest = 100,
55     CachingLow = 200,
56     CachingNormal = 300,
57     CachingHigh = 400,
58     CachingHigher = 500
59 };
60
61 enum { alsaW = 0, ossW, directxW, fileW, audioOutCoB, normalizerChB };
62 enum { recordChB, dumpChB, bandwidthChB, timeshiftChB, inputLE, cachingCoB };
63 enum { skinRB, qtRB };
64
65 class ConfigControl;
66 class QComboBox;
67 class QLineEdit;
68 class QRadioButton;
69 class QCheckBox;
70 class QString;
71
72 #ifdef WIN32
73 class QListWidgetItem;
74 #endif
75
76 class SPrefsCatList : public QWidget
77 {
78     Q_OBJECT;
79 public:
80     SPrefsCatList( intf_thread_t *, QWidget *);
81     virtual ~SPrefsCatList() {};
82 private:
83     intf_thread_t *p_intf;
84 signals:
85     void currentItemChanged( int );
86 public slots:
87     void switchPanel( int );
88 };
89
90 class SPrefsPanel : public QWidget
91 {
92     Q_OBJECT
93 public:
94     SPrefsPanel( intf_thread_t *, QWidget *, int );
95     virtual ~SPrefsPanel() {};
96     void apply();
97     void clean();
98 private:
99     intf_thread_t *p_intf;
100     QList<ConfigControl *> controls;
101
102     int number;
103
104     QList<QWidget *> optionWidgets;
105     QString qs_filter;
106     
107
108 #ifdef WIN32
109     QList<QListWidgetItem *> listAsso;
110 #endif
111
112 /* Display only the options for the selected audio output */
113 private slots:
114     void lastfm_Changed( int );
115     void updateAudioOptions( int ); 
116 #ifdef SYS_MINGW32
117     void assoDialog();
118     void saveAsso();
119 #endif
120 };
121
122 #endif