]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/variables.hpp
Qt: EPGWidget: namespace enum
[vlc] / modules / gui / qt4 / variables.hpp
index 40d414c217fa9cfa4a778b85294cb7995a79dd61..dd511d9c38e02d7f20b1b3b4e6a9995b55ffda37 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * external.hpp : Dialogs from other LibVLC core and other plugins
+ * variables.hpp : Dialogs from other LibVLC core and other plugins
  ****************************************************************************
  * Copyright (C) 2009 RĂ©mi Denis-Courmont
  *
 #ifndef QVLC_VARIABLES_H_
 #define QVLC_VARIABLES_H_ 1
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <QObject>
 #include <vlc_common.h>
 
@@ -32,39 +36,85 @@ private:
                          vlc_value_t, vlc_value_t, void *);
     vlc_object_t *object;
     QString name;
-    virtual void trigger (vlc_object_t *, vlc_value_t, vlc_value_t) = 0;
+    virtual void trigger (vlc_value_t, vlc_value_t) = 0;
 
 public:
     QVLCVariable (vlc_object_t *, const char *, int, bool);
-    virtual ~QVLCVariable (void);
+    ~QVLCVariable (void);
 };
 
 class QVLCPointer : public QVLCVariable
 {
     Q_OBJECT
 private:
-    virtual void trigger (vlc_object_t *, vlc_value_t, vlc_value_t);
+    virtual void trigger (vlc_value_t, vlc_value_t);
 
 public:
     QVLCPointer (vlc_object_t *, const char *, bool inherit = false);
+    bool addCallback (QObject *, const char *,
+                      Qt::ConnectionType type = Qt::AutoConnection);
 
 signals:
-    void pointerChanged (vlc_object_t *, void *, void *);
-    void pointerChanged (vlc_object_t *, void *);
+    void pointerChanged (void *);
 };
 
 class QVLCInteger : public QVLCVariable
 {
     Q_OBJECT
 private:
-    virtual void trigger (vlc_object_t *, vlc_value_t, vlc_value_t);
+    virtual void trigger (vlc_value_t, vlc_value_t);
 
 public:
     QVLCInteger (vlc_object_t *, const char *, bool inherit = false);
+    bool addCallback (QObject *, const char *,
+                      Qt::ConnectionType type = Qt::AutoConnection);
+
+signals:
+    void integerChanged (qlonglong);
+};
+
+class QVLCBool : public QVLCVariable
+{
+    Q_OBJECT
+private:
+    virtual void trigger (vlc_value_t, vlc_value_t);
+
+public:
+    QVLCBool (vlc_object_t *, const char *, bool inherit = false);
+    bool addCallback (QObject *, const char *,
+                      Qt::ConnectionType type = Qt::AutoConnection);
+
+signals:
+    void boolChanged (bool);
+};
+
+class QVLCFloat : public QVLCVariable
+{
+    Q_OBJECT
+private:
+    virtual void trigger (vlc_value_t, vlc_value_t);
+
+public:
+    QVLCFloat (vlc_object_t *, const char *, bool inherit = false);
+    bool addCallback (QObject *, const char *,
+                      Qt::ConnectionType type = Qt::AutoConnection);
 
 signals:
-    void integerChanged (vlc_object_t *, int, int);
-    void integerChanged (vlc_object_t *, int);
+    void floatChanged (float);
 };
 
+class QVLCString : public QVLCVariable
+{
+    Q_OBJECT
+private:
+    virtual void trigger (vlc_value_t, vlc_value_t);
+
+public:
+    QVLCString (vlc_object_t *, const char *, bool inherit = false);
+    bool addCallback (QObject *, const char *,
+                      Qt::ConnectionType type = Qt::AutoConnection);
+
+signals:
+    void stringChanged (QString);
+};
 #endif