]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/preferences_widgets.hpp
Qt: Drop the no longer used sample_classic
[vlc] / modules / gui / qt4 / components / preferences_widgets.hpp
index 3a0f5e116318a8e13bca8f61f93133d0f1d27bf6..4ef0c35274b260c3a819af63a89377e30c4c6238 100644 (file)
@@ -45,6 +45,7 @@
 #include <QPushButton>
 #include <QVector>
 #include <QDialog>
+#include <QFontComboBox>
 
 class QTreeWidget;
 class QTreeWidgetItem;
@@ -53,6 +54,28 @@ class QGridLayout;
 class QDialogButtonBox;
 class QVBoxLayout;
 
+/*******************************************************
+ * Simple widgets
+ *******************************************************/
+
+class InterfacePreviewWidget : public QLabel
+{
+    Q_OBJECT
+public:
+    InterfacePreviewWidget( QWidget * );
+    enum enum_style {
+                 COMPLETE, // aka MPC
+                 MINIMAL,  // aka WMP12 minimal
+                 SKINS };
+public slots:
+    void setPreview( enum_style );
+    void setNormalPreview( bool b_minimal );
+};
+
+/*******************************************************
+ * Variable controls
+ *******************************************************/
+
 class ConfigControl : public QObject
 {
     Q_OBJECT
@@ -184,14 +207,14 @@ public:
     BoolConfigControl( vlc_object_t *, module_config_t *, QWidget *,
                        QGridLayout *, int& );
     BoolConfigControl( vlc_object_t *, module_config_t *,
-                       QLabel *, QCheckBox*, bool );
+                       QLabel *, QAbstractButton*, bool );
     virtual ~BoolConfigControl() {};
     virtual int getValue();
     virtual void show() { checkbox->show(); }
     virtual void hide() { checkbox->hide(); }
     virtual int getType() { return CONFIG_ITEM_BOOL; }
 private:
-    QCheckBox *checkbox;
+    QAbstractButton *checkbox;
     void finish();
 };
 
@@ -312,20 +335,20 @@ public slots:
     virtual void updateField();
 };
 
-#if 0
-class FontConfigControl : public FileConfigControl
+class FontConfigControl : public VStringConfigControl
 {
     Q_OBJECT;
 public:
     FontConfigControl( vlc_object_t *, module_config_t *, QWidget *,
-                       QGridLayout *, int&, bool pwd );
+                       QGridLayout *, int&);
     FontConfigControl( vlc_object_t *, module_config_t *, QLabel *,
-                       QLineEdit *, QPushButton *, bool pwd );
+                       QFontComboBox *);
     virtual ~FontConfigControl() {};
-public slots:
-    virtual void updateField();
+    virtual QString getValue(){ return font->currentFont().family(); }
+protected:
+    QLabel *label;
+    QFontComboBox *font;
 };
-#endif
 
 class ModuleConfigControl : public VStringConfigControl
 {