]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/preferences_widgets.hpp
Qt4 - Preferences and SPrefs. Add the necessary handler for CONFIG_FILE_ITEMs.
[vlc] / modules / gui / qt4 / components / preferences_widgets.hpp
index eb2a75ca3d257eef018086860fa1d77887621f6d..3017badf813db8d5c1ac876d5b5c146d042e90a2 100644 (file)
@@ -35,6 +35,7 @@
 #include <QVector>
 #include <QDialog>
 #include <QLabel>
+#include <QFile>
 
 #include "qt4.hpp"
 #include <assert.h>
@@ -251,6 +252,28 @@ private:
     QLabel *label;
 };
 
+class FileConfigControl : public VStringConfigControl
+{
+    Q_OBJECT;
+public:
+    FileConfigControl( vlc_object_t *, module_config_t *, QWidget *,
+                         QGridLayout *, int&, bool pwd );
+    FileConfigControl( vlc_object_t *, module_config_t *, QLabel *,
+                        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: 
+    void updateField();
+private:
+    void finish();
+    QLineEdit *text;
+    QLabel *label;
+    QPushButton *browse;
+};
+
+
 class ModuleConfigControl : public VStringConfigControl
 {
 public: