]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/preferences.hpp
Qt4 - Remove unused includes.
[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 _PREFS_DIALOG_H_
25 #define _PREFS_DIALOG_H_
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     static PrefsDialog * getInstance( intf_thread_t *p_intf )
49     {
50         if( !instance )
51             instance = new PrefsDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
52         return instance;
53     }
54     virtual ~PrefsDialog() {};
55 #if 0
56     /*Called from extended settings, is not used anymore, but could be useful one day*/
57     void showModulePrefs( char* );
58 #endif
59
60 private:
61     PrefsDialog( QWidget *, intf_thread_t * );
62     QGridLayout *main_layout;
63
64     QWidget *main_panel;
65     QHBoxLayout *main_panel_l;
66
67     AdvPrefsPanel *advanced_panel;
68     SPrefsPanel *current_simple_panel;
69     SPrefsPanel *simple_panels[SPrefsMax];
70
71     QWidget *tree_panel;
72     QHBoxLayout *tree_panel_l;
73
74     SPrefsCatList *simple_tree;
75     PrefsTree *advanced_tree;
76
77     QGroupBox *types;
78     QRadioButton *small,*all;
79
80     static PrefsDialog *instance;
81
82 private slots:
83     void setAdvanced();
84     void setSmall();
85
86     void changeAdvPanel( QTreeWidgetItem * );
87     void changeSimplePanel( int );
88
89     void save();
90     void cancel();
91     void reset();
92     void close(){ save(); }; /* Needed for any generic CloseEvent*/
93 };
94
95 #endif