* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#ifndef _HELP_DIALOG_H_
-#define _HELP_DIALOG_H_
+#ifndef QVLC_HELP_DIALOG_H_
+#define QVLC_HELP_DIALOG_H_ 1
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+
+#include "qt4.hpp"
#include "util/qvlcframe.hpp"
+#include "util/singleton.hpp"
+#include "ui/about.h"
+#include "ui/update.h"
class QPushButton;
class QTextBrowser;
class QLabel;
class QEvent;
class QPushButton;
+class QTextEdit;
-class HelpDialog : public QVLCDialog
+class HelpDialog : public QVLCFrame, public Singleton<HelpDialog>
{
- Q_OBJECT;
-public:
- static HelpDialog * getInstance( intf_thread_t *p_intf )
- {
- if( !instance)
- instance = new HelpDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
- return instance;
- }
+ Q_OBJECT
+private:
+ HelpDialog( intf_thread_t * );
virtual ~HelpDialog();
-private:
- HelpDialog( QWidget *, intf_thread_t * );
- static HelpDialog *instance;
public slots:
void close();
+
+ friend class Singleton<HelpDialog>;
};
-class AboutDialog : public QVLCFrame
+class AboutDialog : public QVLCDialog, public Singleton<AboutDialog>
{
- Q_OBJECT;
-public:
- static AboutDialog * getInstance( intf_thread_t *p_intf )
- {
- if( !instance)
- instance = new AboutDialog( p_intf );
- return instance;
- }
- virtual ~AboutDialog();
+ Q_OBJECT
private:
AboutDialog( intf_thread_t * );
- static AboutDialog *instance;
+ virtual ~AboutDialog();
+ Ui::aboutWidget ui;
+
public slots:
void close();
+
+ friend class Singleton<AboutDialog>;
};
#ifdef UPDATE_CHECK
-static int UDOkEvent = QEvent::User + 1;
-static int UDErrorEvent = QEvent::User + 2;
+static const int UDOkEvent = QEvent::User + DialogEventType + 21;
+static const int UDErrorEvent = QEvent::User + DialogEventType + 22;
-class UpdateDialog : public QVLCFrame
+class UpdateDialog : public QVLCFrame, public Singleton<UpdateDialog>
{
- Q_OBJECT;
+ Q_OBJECT
public:
- static UpdateDialog * getInstance( intf_thread_t *p_intf )
- {
- if( !instance )
- instance = new UpdateDialog( p_intf );
- return instance;
- }
- virtual ~UpdateDialog();
void updateNotify( bool );
private:
UpdateDialog( intf_thread_t * );
- static UpdateDialog *instance;
+ virtual ~UpdateDialog();
+
+ Ui::updateWidget ui;
update_t *p_update;
- QPushButton *updateButton;
- QLabel *updateLabel;
void customEvent( QEvent * );
bool b_checked;
private slots:
void close();
void UpdateOrDownload();
+
+ friend class Singleton<UpdateDialog>;
};
#endif