]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/preferences_widgets.hpp
Qt: now that you don't control the controls size anymore, be careful to resize the...
[vlc] / modules / gui / qt4 / components / preferences_widgets.hpp
index d8b108a57ebe7d82f253b05154853be2cbf45772..90cb3fccb7625a20acce0b9ac33cdb43b23393ea 100644 (file)
@@ -26,7 +26,9 @@
 #ifndef _PREFERENCESWIDGETS_H_
 #define _PREFERENCESWIDGETS_H_
 
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include "qt4.hpp"
 #include <assert.h>
@@ -44,8 +46,6 @@
 #include <QVector>
 #include <QDialog>
 
-
-class QFile;
 class QTreeWidget;
 class QTreeWidgetItem;
 class QGroupBox;
@@ -159,6 +159,7 @@ private:
 
 class IntegerListConfigControl : public VIntConfigControl
 {
+Q_OBJECT
 public:
     IntegerListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
                               bool, QGridLayout*, int& );
@@ -169,9 +170,12 @@ public:
     virtual void hide() { combo->hide(); if( label ) label->hide(); }
     virtual void show() { combo->show(); if( label ) label->show(); }
 private:
-    void finish( bool );
+    void finish(module_config_t *, bool );
     QLabel *label;
     QComboBox *combo;
+private slots:
+    void actionRequested( int );
+
 };
 
 class BoolConfigControl : public VIntConfigControl
@@ -279,9 +283,9 @@ class FileConfigControl : public VStringConfigControl
     Q_OBJECT;
 public:
     FileConfigControl( vlc_object_t *, module_config_t *, QWidget *,
-                       QGridLayout *, int&, bool pwd );
+                       QGridLayout *, int& );
     FileConfigControl( vlc_object_t *, module_config_t *, QLabel *,
-                       QLineEdit *, QPushButton *, bool pwd );
+                       QLineEdit *, QPushButton * );
     virtual ~FileConfigControl() {};
     virtual QString getValue() { return text->text(); };
     virtual void show() { text->show(); if( label ) label->show(); browse->show(); }
@@ -300,14 +304,15 @@ class DirectoryConfigControl : public FileConfigControl
     Q_OBJECT;
 public:
     DirectoryConfigControl( vlc_object_t *, module_config_t *, QWidget *,
-                            QGridLayout *, int&, bool pwd );
+                            QGridLayout *, int& );
     DirectoryConfigControl( vlc_object_t *, module_config_t *, QLabel *,
-                            QLineEdit *, QPushButton *, bool pwd );
+                            QLineEdit *, QPushButton * );
     virtual ~DirectoryConfigControl() {};
 public slots:
     virtual void updateField();
 };
 
+#if 0
 class FontConfigControl : public FileConfigControl
 {
     Q_OBJECT;
@@ -320,6 +325,7 @@ public:
 public slots:
     virtual void updateField();
 };
+#endif
 
 class ModuleConfigControl : public VStringConfigControl
 {
@@ -346,6 +352,7 @@ struct checkBoxListItem {
 class ModuleListConfigControl : public VStringConfigControl
 {
     Q_OBJECT;
+    friend class ConfigControl;
 public:
     ModuleListConfigControl( vlc_object_t *, module_config_t *, QWidget *,
                              bool, QGridLayout*, int& );
@@ -356,7 +363,7 @@ public:
     virtual void hide();
     virtual void show();
 public slots:
-    void onUpdate( int value );
+    void onUpdate();
 private:
     void finish( bool );
     QVector<checkBoxListItem*> modules;
@@ -376,9 +383,9 @@ public:
     virtual QString getValue();
     virtual void hide() { combo->hide(); if( label ) label->hide(); }
     virtual void show() { combo->show(); if( label ) label->show(); }
-       QComboBox *combo;
+    QComboBox *combo;
 private:
-    void finish( bool );
+    void finish(module_config_t *, bool );
     QLabel *label;
 private slots:
     void actionRequested( int );
@@ -386,7 +393,7 @@ private slots:
 };
 
 void setfillVLCConfigCombo(const char *configname, intf_thread_t *p_intf,
-                        QComboBox *combo, QWidget *parent = 0 );
+                        QComboBox *combo );
 
 #if 0
 struct ModuleCheckBox {
@@ -417,7 +424,9 @@ class KeyShortcutEdit: public QLineEdit
     Q_OBJECT
 public:
     void setValue( int _value ){ value = _value; }
-    int getValue(){ return value; }
+    int getValue() const { return value; }
+public slots:
+    virtual void clear(void) { value = 0; QLineEdit::clear(); }
 private:
     int value;
     virtual void mousePressEvent( QMouseEvent *event );
@@ -445,7 +454,7 @@ private:
 private slots:
     void setTheKey();
     void selectKey( QTreeWidgetItem * = NULL );
-    void select1Key( QTreeWidgetItem *);
+    void select1Key();
 };
 
 class KeyInputDialog : public QDialog