external.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef QVLC_DIALOGS_EXTERNAL_H_
00022 #define QVLC_DIALOGS_EXTERNAL_H_ 1
00023
00024 #include <QObject>
00025 #include <vlc_common.h>
00026 #include "variables.hpp"
00027
00028 struct intf_thread_t;
00029 class QProgressDialog;
00030
00031 class DialogHandler : public QObject
00032 {
00033 Q_OBJECT
00034
00035 friend class QVLCProgressDialog;
00036
00037 public:
00038 DialogHandler (intf_thread_t *, QObject *parent);
00039 ~DialogHandler (void);
00040
00041 private:
00042 intf_thread_t *intf;
00043 static int error (vlc_object_t *, const char *, vlc_value_t, vlc_value_t,
00044 void *);
00045 QVLCPointer critical;
00046 QVLCPointer login;
00047 QVLCPointer question;
00048 QVLCPointer progressBar;
00049 signals:
00050 void progressBarDestroyed (QWidget *);
00051 void error (const QString&, const QString&);
00052
00053 private slots:
00054 void displayError (const QString&, const QString&);
00055 void displayCritical (vlc_object_t *, void *);
00056 void requestLogin (vlc_object_t *, void *);
00057 void requestAnswer (vlc_object_t *, void *);
00058 void startProgressBar (vlc_object_t *, void *);
00059 void stopProgressBar (QWidget *);
00060 };
00061
00062
00063 #include <QProgressDialog>
00064
00065 class QVLCProgressDialog : public QProgressDialog
00066 {
00067 Q_OBJECT
00068 public:
00069 QVLCProgressDialog (DialogHandler *parent,
00070 struct dialog_progress_bar_t *);
00071 virtual ~QVLCProgressDialog (void);
00072
00073 private:
00074 DialogHandler *handler;
00075 bool cancelled;
00076
00077 static void update (void *, const char *, float);
00078 static bool check (void *);
00079 static void destroy (void *);
00080 private slots:
00081 void saveCancel (void);
00082
00083 signals:
00084 void progressed (int);
00085 void described (const QString&);
00086 void destroyed (void);
00087 };
00088
00089 #endif