diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am index a37baeb1a943549796069d664cdea6f27d85627f..4006263dcdf295aed939fca5a5eac5df916b2b7e 100644 --- a/modules/gui/qt/Makefile.am +++ b/modules/gui/qt/Makefile.am @@ -52,7 +52,7 @@ libqt_plugin_la_SOURCES = \ gui/qt/recents.cpp gui/qt/recents.hpp \ gui/qt/adapters/seekpoints.cpp gui/qt/adapters/seekpoints.hpp \ gui/qt/adapters/chromaprint.cpp gui/qt/adapters/chromaprint.hpp \ - gui/qt/adapters/variables.cpp gui/qt/adapters/variables.hpp \ + gui/qt/adapters/legacy_variables.cpp gui/qt/adapters/legacy_variables.hpp \ gui/qt/dialogs/playlist.cpp gui/qt/dialogs/playlist.hpp \ gui/qt/dialogs/bookmarks.cpp gui/qt/dialogs/bookmarks.hpp \ gui/qt/dialogs/preferences.cpp gui/qt/dialogs/preferences.hpp \ @@ -176,7 +176,7 @@ nodist_libqt_plugin_la_SOURCES = \ gui/qt/recents.moc.cpp \ gui/qt/adapters/seekpoints.moc.cpp \ gui/qt/adapters/chromaprint.moc.cpp \ - gui/qt/adapters/variables.moc.cpp \ + gui/qt/adapters/legacy_variables.moc.cpp \ gui/qt/dialogs/playlist.moc.cpp \ gui/qt/dialogs/bookmarks.moc.cpp \ gui/qt/dialogs/mediainfo.moc.cpp \ diff --git a/modules/gui/qt/adapters/variables.cpp b/modules/gui/qt/adapters/legacy_variables.cpp similarity index 58% rename from modules/gui/qt/adapters/variables.cpp rename to modules/gui/qt/adapters/legacy_variables.cpp index 22597b64665ad91a28860ff8a36c71725c8aeb75..e872b02b0071659f5f1dd101b4509f6f6e5e35a1 100644 --- a/modules/gui/qt/adapters/variables.cpp +++ b/modules/gui/qt/adapters/legacy_variables.cpp @@ -1,5 +1,5 @@ /***************************************************************************** - * variables.cpp : VLC variable class + * legacy_variables.cpp : VLC variable class **************************************************************************** * Copyright (C) 2009 Rémi Denis-Courmont * Copyright (C) 2006 the VideoLAN team @@ -24,9 +24,9 @@ #endif #include "qt.hpp" -#include "variables.hpp" +#include "legacy_variables.hpp" -QVLCVariable::QVLCVariable (vlc_object_t *obj, const char *varname, int type, +QVLCLEGACYVariable::QVLCLEGACYVariable (vlc_object_t *obj, const char *varname, int type, bool inherit) : object (obj), name (qfu(varname)) { @@ -36,99 +36,99 @@ QVLCVariable::QVLCVariable (vlc_object_t *obj, const char *varname, int type, var_AddCallback (object, qtu(name), callback, this); } -QVLCVariable::~QVLCVariable (void) +QVLCLEGACYVariable::~QVLCLEGACYVariable (void) { var_DelCallback (object, qtu(name), callback, this); var_Destroy (object, qtu(name)); } -int QVLCVariable::callback(vlc_object_t *, const char *, +int QVLCLEGACYVariable::callback(vlc_object_t *, const char *, vlc_value_t old, vlc_value_t cur, void *data) { - QVLCVariable *self = static_cast<QVLCVariable *>(data); + QVLCLEGACYVariable *self = static_cast<QVLCLEGACYVariable *>(data); self->trigger (old, cur); return VLC_SUCCESS; } -QVLCPointer::QVLCPointer (vlc_object_t *obj, const char *varname, bool inherit) - : QVLCVariable (obj, varname, VLC_VAR_ADDRESS, inherit) +QVLCLEGACYPointer::QVLCLEGACYPointer (vlc_object_t *obj, const char *varname, bool inherit) + : QVLCLEGACYVariable (obj, varname, VLC_VAR_ADDRESS, inherit) { } -void QVLCPointer::trigger (vlc_value_t, vlc_value_t cur) +void QVLCLEGACYPointer::trigger (vlc_value_t, vlc_value_t cur) { emit pointerChanged (cur.p_address); } -bool QVLCPointer::addCallback (QObject *tgt, const char *method, +bool QVLCLEGACYPointer::addCallback (QObject *tgt, const char *method, Qt::ConnectionType type) { return tgt->connect (this, SIGNAL(pointerChanged(void *)), method, type); } -QVLCInteger::QVLCInteger (vlc_object_t *obj, const char *varname, bool inherit) - : QVLCVariable (obj, varname, VLC_VAR_INTEGER, inherit) +QVLCLEGACYInteger::QVLCLEGACYInteger (vlc_object_t *obj, const char *varname, bool inherit) + : QVLCLEGACYVariable (obj, varname, VLC_VAR_INTEGER, inherit) { } -void QVLCInteger::trigger (vlc_value_t, vlc_value_t cur) +void QVLCLEGACYInteger::trigger (vlc_value_t, vlc_value_t cur) { emit integerChanged (cur.i_int); } -bool QVLCInteger::addCallback (QObject *tgt, const char *method, +bool QVLCLEGACYInteger::addCallback (QObject *tgt, const char *method, Qt::ConnectionType type) { return tgt->connect (this, SIGNAL(integerChanged(qlonglong)), method, type); } -QVLCBool::QVLCBool (vlc_object_t *obj, const char *varname, bool inherit) - : QVLCVariable (obj, varname, VLC_VAR_BOOL, inherit) +QVLCLEGACYBool::QVLCLEGACYBool (vlc_object_t *obj, const char *varname, bool inherit) + : QVLCLEGACYVariable (obj, varname, VLC_VAR_BOOL, inherit) { } -void QVLCBool::trigger (vlc_value_t, vlc_value_t cur) +void QVLCLEGACYBool::trigger (vlc_value_t, vlc_value_t cur) { emit boolChanged (cur.b_bool); } -bool QVLCBool::addCallback (QObject *tgt, const char *method, +bool QVLCLEGACYBool::addCallback (QObject *tgt, const char *method, Qt::ConnectionType type) { return tgt->connect (this, SIGNAL(boolChanged(bool)), method, type); } -QVLCFloat::QVLCFloat (vlc_object_t *obj, const char *varname, bool inherit) - : QVLCVariable (obj, varname, VLC_VAR_FLOAT, inherit) +QVLCLEGACYFloat::QVLCLEGACYFloat (vlc_object_t *obj, const char *varname, bool inherit) + : QVLCLEGACYVariable (obj, varname, VLC_VAR_FLOAT, inherit) { } -void QVLCFloat::trigger (vlc_value_t, vlc_value_t cur) +void QVLCLEGACYFloat::trigger (vlc_value_t, vlc_value_t cur) { emit floatChanged (cur.f_float); } -bool QVLCFloat::addCallback (QObject *tgt, const char *method, +bool QVLCLEGACYFloat::addCallback (QObject *tgt, const char *method, Qt::ConnectionType type) { return tgt->connect (this, SIGNAL(floatChanged(float)), method, type); } -QVLCString::QVLCString (vlc_object_t *obj, const char *varname, bool inherit) - : QVLCVariable (obj, varname, VLC_VAR_STRING, inherit) +QVLCLEGACYString::QVLCLEGACYString (vlc_object_t *obj, const char *varname, bool inherit) + : QVLCLEGACYVariable (obj, varname, VLC_VAR_STRING, inherit) { } -void QVLCString::trigger (vlc_value_t, vlc_value_t cur) +void QVLCLEGACYString::trigger (vlc_value_t, vlc_value_t cur) { QString str = qfu(cur.psz_string); emit stringChanged (str); } -bool QVLCString::addCallback (QObject *tgt, const char *method, +bool QVLCLEGACYString::addCallback (QObject *tgt, const char *method, Qt::ConnectionType type) { return tgt->connect (this, SIGNAL(stringChanged(QString)), method, type); diff --git a/modules/gui/qt/adapters/variables.hpp b/modules/gui/qt/adapters/legacy_variables.hpp similarity index 74% rename from modules/gui/qt/adapters/variables.hpp rename to modules/gui/qt/adapters/legacy_variables.hpp index 6585f0712679550b32b18d06ea96ebad472d5b3e..9696058761a52d9bcb19a47ee22edd7a13388765 100644 --- a/modules/gui/qt/adapters/variables.hpp +++ b/modules/gui/qt/adapters/legacy_variables.hpp @@ -1,5 +1,5 @@ /***************************************************************************** - * variables.hpp : Dialogs from other LibVLC core and other plugins + * legacy_variables.hpp : Dialogs from other LibVLC core and other plugins **************************************************************************** * Copyright (C) 2009 Rémi Denis-Courmont * @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#ifndef QVLC_VARIABLES_H_ -#define QVLC_VARIABLES_H_ 1 +#ifndef QVLCLEGACY_LEGACY_VARIABLES_H_ +#define QVLCLEGACY_LEGACY_VARIABLES_H_ 1 #ifdef HAVE_CONFIG_H # include <config.h> @@ -30,7 +30,7 @@ #include <QObject> #include <vlc_common.h> -class QVLCVariable : public QObject +class QVLCLEGACYVariable : public QObject { Q_OBJECT private: @@ -41,18 +41,18 @@ private: virtual void trigger (vlc_value_t, vlc_value_t) = 0; public: - QVLCVariable (vlc_object_t *, const char *, int, bool); - virtual ~QVLCVariable (void); + QVLCLEGACYVariable (vlc_object_t *, const char *, int, bool); + virtual ~QVLCLEGACYVariable (void); }; -class QVLCPointer : public QVLCVariable +class QVLCLEGACYPointer : public QVLCLEGACYVariable { Q_OBJECT private: void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE; public: - QVLCPointer (vlc_object_t *, const char *, bool inherit = false); + QVLCLEGACYPointer (vlc_object_t *, const char *, bool inherit = false); bool addCallback (QObject *, const char *, Qt::ConnectionType type = Qt::AutoConnection); @@ -60,14 +60,14 @@ signals: void pointerChanged (void *); }; -class QVLCInteger : public QVLCVariable +class QVLCLEGACYInteger : public QVLCLEGACYVariable { Q_OBJECT private: void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE; public: - QVLCInteger (vlc_object_t *, const char *, bool inherit = false); + QVLCLEGACYInteger (vlc_object_t *, const char *, bool inherit = false); bool addCallback (QObject *, const char *, Qt::ConnectionType type = Qt::AutoConnection); @@ -75,14 +75,14 @@ signals: void integerChanged (qlonglong); }; -class QVLCBool : public QVLCVariable +class QVLCLEGACYBool : public QVLCLEGACYVariable { Q_OBJECT private: void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE; public: - QVLCBool (vlc_object_t *, const char *, bool inherit = false); + QVLCLEGACYBool (vlc_object_t *, const char *, bool inherit = false); bool addCallback (QObject *, const char *, Qt::ConnectionType type = Qt::AutoConnection); @@ -90,14 +90,14 @@ signals: void boolChanged (bool); }; -class QVLCFloat : public QVLCVariable +class QVLCLEGACYFloat : public QVLCLEGACYVariable { Q_OBJECT private: void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE; public: - QVLCFloat (vlc_object_t *, const char *, bool inherit = false); + QVLCLEGACYFloat (vlc_object_t *, const char *, bool inherit = false); bool addCallback (QObject *, const char *, Qt::ConnectionType type = Qt::AutoConnection); @@ -105,14 +105,14 @@ signals: void floatChanged (float); }; -class QVLCString : public QVLCVariable +class QVLCLEGACYString : public QVLCLEGACYVariable { Q_OBJECT private: void trigger (vlc_value_t, vlc_value_t) Q_DECL_OVERRIDE; public: - QVLCString (vlc_object_t *, const char *, bool inherit = false); + QVLCLEGACYString (vlc_object_t *, const char *, bool inherit = false); bool addCallback (QObject *, const char *, Qt::ConnectionType type = Qt::AutoConnection); diff --git a/modules/gui/qt/input_manager.hpp b/modules/gui/qt/input_manager.hpp index 7fc69178f6b1a6ed5515f6423c590d0204c939c4..353e6c8f3ae38cfdd21e23737702e6f592ae897a 100644 --- a/modules/gui/qt/input_manager.hpp +++ b/modules/gui/qt/input_manager.hpp @@ -32,7 +32,7 @@ #include "qt.hpp" #include "util/singleton.hpp" -#include "adapters/variables.hpp" +#include "adapters/legacy_variables.hpp" #include <QObject> #include <QEvent> @@ -291,9 +291,9 @@ private: InputManager *im; input_thread_t *p_input; intf_thread_t *p_intf; - QVLCBool random, repeat, loop; - QVLCFloat volume; - QVLCBool mute; + QVLCLEGACYBool random, repeat, loop; + QVLCLEGACYFloat volume; + QVLCLEGACYBool mute; private: static int ItemChanged( vlc_object_t *, const char *, diff --git a/po/POTFILES.in b/po/POTFILES.in index f477c3029d869cc69a85b528566aaf4a4f59dc0d..c6e84863f04858975083a3d59a9e234fce76a5fb 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -638,8 +638,8 @@ modules/gui/qt/adapters/chromaprint.cpp modules/gui/qt/adapters/chromaprint.hpp modules/gui/qt/adapters/seekpoints.cpp modules/gui/qt/adapters/seekpoints.hpp -modules/gui/qt/adapters/variables.cpp -modules/gui/qt/adapters/variables.hpp +modules/gui/qt/adapters/legacy_variables.cpp +modules/gui/qt/adapters/legacy_variables.hpp modules/gui/qt/components/complete_preferences.cpp modules/gui/qt/components/complete_preferences.hpp modules/gui/qt/components/controller.cpp