[vlc-devel] commit: Qt4: add QVLCInteger ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat May 16 12:01:46 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 16 13:00:17 2009 +0300| [98d71a44e45fc6e2fdca667d755e2efd5cdecd93] | committer: Rémi Denis-Courmont 

Qt4: add QVLCInteger

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98d71a44e45fc6e2fdca667d755e2efd5cdecd93
---

 modules/gui/qt4/variables.cpp |   12 ++++++++++++
 modules/gui/qt4/variables.hpp |   14 ++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/variables.cpp b/modules/gui/qt4/variables.cpp
index 6dc2895..36da23b 100644
--- a/modules/gui/qt4/variables.cpp
+++ b/modules/gui/qt4/variables.cpp
@@ -65,3 +65,15 @@ void QVLCPointer::trigger (vlc_object_t *obj, vlc_value_t old, vlc_value_t cur)
     emit pointerChanged (obj, old.p_address, cur.p_address);
     emit pointerChanged (obj, cur.p_address);
 }
+
+
+QVLCInteger::QVLCInteger (vlc_object_t *obj, const char *varname, bool inherit)
+    : QVLCVariable (obj, varname, VLC_VAR_INTEGER, inherit)
+{
+}
+
+void QVLCInteger::trigger (vlc_object_t *obj, vlc_value_t old, vlc_value_t cur)
+{
+    emit integerChanged (obj, old.i_int, cur.i_int);
+    emit integerChanged (obj, cur.i_int);
+}
diff --git a/modules/gui/qt4/variables.hpp b/modules/gui/qt4/variables.hpp
index af6e65b..40d414c 100644
--- a/modules/gui/qt4/variables.hpp
+++ b/modules/gui/qt4/variables.hpp
@@ -53,4 +53,18 @@ signals:
     void pointerChanged (vlc_object_t *, void *);
 };
 
+class QVLCInteger : public QVLCVariable
+{
+    Q_OBJECT
+private:
+    virtual void trigger (vlc_object_t *, vlc_value_t, vlc_value_t);
+
+public:
+    QVLCInteger (vlc_object_t *, const char *, bool inherit = false);
+
+signals:
+    void integerChanged (vlc_object_t *, int, int);
+    void integerChanged (vlc_object_t *, int);
+};
+
 #endif




More information about the vlc-devel mailing list