]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/prefs_dialog.hpp
Skeleton for simple prefs
[vlc] / modules / gui / qt4 / dialogs / prefs_dialog.hpp
1 /*****************************************************************************
2  * prefs_dialog.hpp : Preferences
3  ****************************************************************************
4  * Copyright (C) 2006 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
29 class PrefsTree;
30 class SPrefsCatList;
31 class PrefsPanel;
32 class SPrefsPanel;
33 class QTreeWidgetItem;
34 class QTreeWidget;
35 class QHBoxLayout;
36 class QVBoxLayout;
37 class QGroupBox;
38 class QRadioButton;
39 class QWidget;
40 class QCheckBox;
41 class QListWidget;
42 class QListWidgetItem;
43
44 class PrefsDialog : public QVLCFrame
45 {
46     Q_OBJECT;
47 public:
48     static PrefsDialog * getInstance( intf_thread_t *_p_intf )
49     {
50         if( !instance )
51             instance = new PrefsDialog( _p_intf );
52         return instance;
53     }
54     virtual ~PrefsDialog();
55 private:
56     PrefsDialog( intf_thread_t * );
57
58     QWidget *main_panel;
59     QHBoxLayout *main_panel_l;
60     PrefsPanel *advanced_panel;
61     SPrefsPanel *simple_panel;
62
63     QWidget *tree_panel;
64     QHBoxLayout *tree_panel_l;
65     SPrefsCatList *simple_tree;
66     PrefsTree *advanced_tree;
67
68     QGroupBox *types;
69     QRadioButton *small,*all;
70     QCheckBox *adv_chk;
71
72     QGridLayout *main_layout;
73
74     static PrefsDialog *instance;
75 private slots:
76      void changePanel( QTreeWidgetItem *);
77      void changeSimplePanel( QListWidgetItem *);
78      void setAll();
79      void setSmall();
80      void setAdvanced( bool );
81 };
82
83 #endif