]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/preferences_widgets.hpp
Qt4 - Preferences. Add CONFIG_DIRECTORY_ITEM. Does not work, but does not harm. Why...
[vlc] / modules / gui / qt4 / components / preferences_widgets.hpp
index 3017badf813db8d5c1ac876d5b5c146d042e90a2..9ad8d2d1f47462b08373bb8649f6dd35c49395e4 100644 (file)
@@ -6,6 +6,7 @@
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
  *          Antoine Cellerier <dionoea@videolan.org>
+ *          Jean-Baptiste Kempf <jb@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -36,6 +37,7 @@
 #include <QDialog>
 #include <QLabel>
 #include <QFile>
+#include <QPushButton>
 
 #include "qt4.hpp"
 #include <assert.h>
@@ -262,17 +264,37 @@ public:
                         QLineEdit*, bool pwd );
     virtual ~FileConfigControl() {};
     virtual QString getValue() { return text->text(); };
-    virtual void show() { text->show(); label->show(); }
-    virtual void hide() { text->hide(); label->hide(); }
-public slots: 
+    virtual void show() { text->show(); label->show(); browse->show(); }
+    virtual void hide() { text->hide(); label->hide(); browse->hide(); }
+public slots:
     void updateField();
-private:
+protected:
     void finish();
+private:
     QLineEdit *text;
     QLabel *label;
     QPushButton *browse;
 };
 
+class DirectoryConfigControl : public FileConfigControl
+{
+    Q_OBJECT;
+public:
+    DirectoryConfigControl( vlc_object_t *, module_config_t *, QWidget *,
+                         QGridLayout *, int&, bool pwd );
+    DirectoryConfigControl( vlc_object_t *, module_config_t *, QLabel *,
+                        QLineEdit*, bool pwd );
+    virtual ~DirectoryConfigControl() {};
+    virtual QString getValue() { return text->text(); };
+    virtual void show() { text->show(); label->show(); browse->show(); }
+    virtual void hide() { text->hide(); label->hide(); browse->hide(); }
+public slots:
+    void updateField();
+private:
+    QLineEdit *text;
+    QLabel *label;
+    QPushButton *browse;
+};
 
 class ModuleConfigControl : public VStringConfigControl
 {