]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/preferences.hpp
qt4: attempt to work around a design flaw in the toolbar editor
[vlc] / modules / gui / qt4 / dialogs / preferences.hpp
1 /*****************************************************************************
2  * preferences.hpp : Preferences
3  *****************************************************************************
4  * Copyright (C) 2006-2007 the VideoLAN team
5  * $Id$
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 QVLC_PREFS_DIALOG_H_
25 #define QVLC_PREFS_DIALOG_H_ 1
26
27 #include "util/qvlcframe.hpp"
28 #include "components/simple_preferences.hpp"
29
30 class PrefsTree;
31 class SPrefsCatList;
32 class AdvPrefsPanel;
33 class SPrefsPanel;
34 class QTreeWidgetItem;
35 class QTreeWidget;
36 class QHBoxLayout;
37 class QVBoxLayout;
38 class QGroupBox;
39 class QRadioButton;
40 class QWidget;
41 class QCheckBox;
42 class QLabel;
43
44 class PrefsDialog : public QVLCDialog
45 {
46     Q_OBJECT
47 public:
48     PrefsDialog( QWidget *, intf_thread_t * );
49     virtual ~PrefsDialog() {}
50 #if 0
51     /*Called from extended settings, is not used anymore, but could be useful one day*/
52     void showModulePrefs( char* );
53 #endif
54
55 private:
56     QGridLayout *main_layout;
57
58     QWidget *main_panel;
59     QHBoxLayout *main_panel_l;
60
61     AdvPrefsPanel *advanced_panel;
62     SPrefsPanel *current_simple_panel;
63     SPrefsPanel *simple_panels[SPrefsMax];
64
65     QWidget *tree_panel;
66     QHBoxLayout *tree_panel_l;
67
68     SPrefsCatList *simple_tree;
69     PrefsTree *advanced_tree;
70
71     QGroupBox *types;
72     QRadioButton *small,*all;
73
74     bool b_small;
75
76 private slots:
77     void setAdvanced();
78     void setSmall();
79
80     void changeAdvPanel( QTreeWidgetItem * );
81     void changeSimplePanel( int );
82
83     void save();
84     void cancel();
85     void reset();
86     void close() { save(); };
87 };
88
89 #endif