]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/preferences.hpp
Drop trailing semicolons
[vlc] / modules / gui / qt4 / dialogs / preferences.hpp
index 55e409b10007edb7429b9c0d560a93a61be2de81..e14124009eeb1dbb796f829251768c5a20e4e9cc 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef _PREFS_DIALOG_H_
-#define _PREFS_DIALOG_H_
+#ifndef QVLC_PREFS_DIALOG_H_
+#define QVLC_PREFS_DIALOG_H_ 1
 
 #include "util/qvlcframe.hpp"
 #include "components/simple_preferences.hpp"
 
 class PrefsTree;
 class SPrefsCatList;
-class PrefsPanel;
+class AdvPrefsPanel;
 class SPrefsPanel;
 class QTreeWidgetItem;
 class QTreeWidget;
@@ -39,53 +39,51 @@ class QGroupBox;
 class QRadioButton;
 class QWidget;
 class QCheckBox;
-class QListWidget;
-class QListWidgetItem;
 class QLabel;
 
-class PrefsDialog : public QVLCFrame
+class PrefsDialog : public QVLCDialog
 {
-    Q_OBJECT;
+    Q_OBJECT
 public:
-    static PrefsDialog * getInstance( intf_thread_t *_p_intf )
-    {
-        if( !instance )
-            instance = new PrefsDialog( _p_intf );
-        return instance;
-    }
-    virtual ~PrefsDialog() {};
-
+    PrefsDialog( QWidget *, intf_thread_t * );
+    virtual ~PrefsDialog() {}
+#if 0
+    /*Called from extended settings, is not used anymore, but could be useful one day*/
     void showModulePrefs( char* );
+#endif
+
 private:
-    PrefsDialog( intf_thread_t * );
+    QGridLayout *main_layout;
 
     QWidget *main_panel;
     QHBoxLayout *main_panel_l;
-    PrefsPanel *advanced_panel;
-    SPrefsPanel *simple_panel;
+
+    AdvPrefsPanel *advanced_panel;
+    SPrefsPanel *current_simple_panel;
     SPrefsPanel *simple_panels[SPrefsMax];
 
     QWidget *tree_panel;
     QHBoxLayout *tree_panel_l;
+
     SPrefsCatList *simple_tree;
     PrefsTree *advanced_tree;
 
     QGroupBox *types;
     QRadioButton *small,*all;
 
-    QGridLayout *main_layout;
-
-//    QLabel *panel_label;
+    bool b_small;
 
-    static PrefsDialog *instance;
 private slots:
-     void changePanel( QTreeWidgetItem * );
-     void changeSimplePanel( QListWidgetItem * );
-     void setAll();
-     void setSmall();
-     void save();
-     void cancel();
-     void reset();
+    void setAdvanced();
+    void setSmall();
+
+    void changeAdvPanel( QTreeWidgetItem * );
+    void changeSimplePanel( int );
+
+    void save();
+    void cancel();
+    void reset();
+    void close() { save(); };
 };
 
 #endif