]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/external.cpp
Qt: don't attach the core dialogs to the Main Interface but to the Dialog Provider.
[vlc] / modules / gui / qt4 / dialogs / external.cpp
index 4153470f7ddf41cf17a638b9b54e566ea86a27d2..2621076f8c4c9d72c35167f0373d35b6b8d2295f 100644 (file)
 #include <QProgressDialog>
 #include <QMutex>
 
-QVLCVariable::QVLCVariable (vlc_object_t *obj, const char *varname, int type)
-    : object (obj), name (qfu(varname))
-{
-    var_Create (object, qtu(name), type);
-    var_AddCallback (object, qtu(name), callback, this);
-}
-
-QVLCVariable::~QVLCVariable (void)
-{
-    var_DelCallback (object, qtu(name), callback, this);
-    var_Destroy (object, qtu(name));
-}
-
-int QVLCVariable::callback (vlc_object_t *object, const char *,
-                            vlc_value_t, vlc_value_t cur, void *data)
-{
-    QVLCVariable *self = (QVLCVariable *)data;
-
-    emit self->pointerChanged (object, cur.p_address);
-    return VLC_SUCCESS;
-}
-
-
-DialogHandler::DialogHandler (intf_thread_t *intf)
-    : intf (intf),
+DialogHandler::DialogHandler (intf_thread_t *intf, QObject *_parent)
+    : intf (intf), QObject( _parent ),
       message (VLC_OBJECT(intf), "dialog-fatal", VLC_VAR_ADDRESS),
       login (VLC_OBJECT(intf), "dialog-login", VLC_VAR_ADDRESS),
       question (VLC_OBJECT(intf), "dialog-question", VLC_VAR_ADDRESS),