X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fdialogs%2Fexternal.hpp;h=1e5ed5edabf955950a8d69e7a3211482409b8eb7;hb=ad77d955a5dc051976d94d6e08ee0f717ec3a938;hp=2daa1d5634062c76e2e61b8e20af9f7780a809b1;hpb=77c9756c40adbeae30b1f23b4ca96df719eaad27;p=vlc diff --git a/modules/gui/qt4/dialogs/external.hpp b/modules/gui/qt4/dialogs/external.hpp index 2daa1d5634..1e5ed5edab 100644 --- a/modules/gui/qt4/dialogs/external.hpp +++ b/modules/gui/qt4/dialogs/external.hpp @@ -18,35 +18,68 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#ifndef VLC_QT4_DIALOGS_EXTERNAL_H_ -# define VLC_QT4_DIALOGS_EXTERNAL_H 1 +#ifndef QVLC_DIALOGS_EXTERNAL_H_ +#define QVLC_DIALOGS_EXTERNAL_H_ 1 #include #include +#include "variables.hpp" struct intf_thread_t; +class QProgressDialog; class DialogHandler : public QObject { Q_OBJECT + + friend class QVLCProgressDialog; + public: - DialogHandler (intf_thread_t *); + DialogHandler (intf_thread_t *, QObject *parent); ~DialogHandler (void); private: intf_thread_t *intf; - static int MessageCallback (vlc_object_t *, const char *, - vlc_value_t, vlc_value_t, void *); - static int LoginCallback (vlc_object_t *obj, const char *, - vlc_value_t, vlc_value_t, void *data); + QVLCPointer message; + QVLCPointer login; + QVLCPointer question; + QVLCPointer progressBar; +signals: + void progressBarDestroyed (QWidget *); + +private slots: + void displayMessage (vlc_object_t *, void *); + void requestLogin (vlc_object_t *, void *); + void requestAnswer (vlc_object_t *, void *); + void startProgressBar (vlc_object_t *, void *); + void stopProgressBar (QWidget *); +}; + +/* Put here instead of .cpp because of MOC */ +#include + +class QVLCProgressDialog : public QProgressDialog +{ + Q_OBJECT +public: + QVLCProgressDialog (DialogHandler *parent, + struct dialog_progress_bar_t *); + virtual ~QVLCProgressDialog (void); + +private: + DialogHandler *handler; + bool cancelled; + static void update (void *, const char *, float); + static bool check (void *); + static void destroy (void *); private slots: - void displayMessage (const struct dialog_fatal_t *); - void requestLogin (struct dialog_login_t *data); + void saveCancel (void); signals: - void message (const struct dialog_fatal_t *); - void authentication (struct dialog_login_t *); + void progressed (int); + void described (const QString&); + void destroyed (void); }; #endif