]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/help.hpp
Qt: rebase about dialog on Qtcreator
[vlc] / modules / gui / qt4 / dialogs / help.hpp
1 /*****************************************************************************
2  * Help.hpp : Help and About dialogs
3  ****************************************************************************
4  * Copyright (C) 2007 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef QVLC_HELP_DIALOG_H_
25 #define QVLC_HELP_DIALOG_H_ 1
26
27 #ifdef HAVE_CONFIG_H
28 #include "config.h"
29 #endif
30
31 #include "qt4.hpp"
32
33 #include "util/qvlcframe.hpp"
34 #include "util/singleton.hpp"
35 #include "ui/about.h"
36
37 class QPushButton;
38 class QTextBrowser;
39 class QLabel;
40 class QEvent;
41 class QPushButton;
42 class QTextEdit;
43
44 class HelpDialog : public QVLCFrame, public Singleton<HelpDialog>
45 {
46     Q_OBJECT
47 private:
48     HelpDialog( intf_thread_t * );
49     virtual ~HelpDialog();
50
51 public slots:
52     void close();
53
54     friend class    Singleton<HelpDialog>;
55 };
56
57
58 class AboutDialog : public QVLCDialog, public Singleton<AboutDialog>
59 {
60     Q_OBJECT
61
62 private:
63     AboutDialog( intf_thread_t * );
64     virtual ~AboutDialog();
65     Ui::aboutWidget ui;
66
67 public slots:
68     void close();
69
70     friend class    Singleton<AboutDialog>;
71 };
72
73 #ifdef UPDATE_CHECK
74
75 static const int UDOkEvent = QEvent::User + DialogEventType + 21;
76 static const int UDErrorEvent = QEvent::User + DialogEventType + 22;
77
78 class UpdateDialog : public QVLCFrame, public Singleton<UpdateDialog>
79 {
80     Q_OBJECT
81 public:
82     void updateNotify( bool );
83
84 private:
85     UpdateDialog( intf_thread_t * );
86     virtual ~UpdateDialog();
87
88     update_t *p_update;
89     QPushButton *updateButton;
90     QLabel *updateLabelTop;
91     QLabel *updateLabelDown;
92     QTextEdit *updateText;
93     void customEvent( QEvent * );
94     bool b_checked;
95
96 private slots:
97     void close();
98     void UpdateOrDownload();
99
100     friend class    Singleton<UpdateDialog>;
101 };
102 #endif
103
104 #endif