]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/simple_preferences.hpp
missing from [24525]
[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 #if WIN32
72 class QListWidgetItem;
73 #endif
74
75 class SPrefsCatList : public QWidget
76 {
77     Q_OBJECT;
78 public:
79     SPrefsCatList( intf_thread_t *, QWidget *);
80     virtual ~SPrefsCatList() {};
81 private:
82     intf_thread_t *p_intf;
83 signals:
84     void currentItemChanged( int );
85 public slots:
86     void switchPanel( int );
87 };
88
89 class SPrefsPanel : public QWidget
90 {
91     Q_OBJECT
92 public:
93     SPrefsPanel( intf_thread_t *, QWidget *, int );
94     virtual ~SPrefsPanel() {};
95     void apply();
96     void clean();
97 private:
98     intf_thread_t *p_intf;
99     QList<ConfigControl *> controls;
100
101     int number;
102
103     QList<QWidget *> optionWidgets;
104     QString qs_filter;
105
106 #if WIN32
107     QList<QListWidgetItem *> listAsso;
108 #endif
109
110 /* Display only the options for the selected audio output */
111 private slots:
112     void lastfm_Changed( int );
113     void updateAudioOptions( int );
114 #ifdef WIN32
115     void assoDialog();
116     void saveAsso();
117 #endif
118 };
119
120 #endif