]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/help.hpp
Qt4 - Fix Compilation on CYGWin. This is a quick fix but not a solution. Again, MOC...
[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 _HELP_DIALOG_H_
25 #define _HELP_DIALOG_H_
26
27 #include "config.h"
28
29 #include "util/qvlcframe.hpp"
30
31 class QPushButton;
32 class QTextBrowser;
33 class QLabel;
34 class QEvent;
35 class QPushButton;
36
37 class HelpDialog : public QVLCDialog
38 {
39     Q_OBJECT;
40 public:
41     static HelpDialog * getInstance( intf_thread_t *p_intf )
42     {
43         if( !instance)
44             instance = new HelpDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
45         return instance;
46     }
47     virtual ~HelpDialog();
48
49 private:
50     HelpDialog( QWidget *, intf_thread_t * );
51     static HelpDialog *instance;
52 public slots:
53     void close();
54 };
55
56
57 class AboutDialog : public QVLCFrame
58 {
59     Q_OBJECT;
60 public:
61     static AboutDialog * getInstance( intf_thread_t *p_intf )
62     {
63         if( !instance)
64             instance = new AboutDialog( p_intf );
65         return instance;
66     }
67     virtual ~AboutDialog();
68
69 private:
70     AboutDialog( intf_thread_t * );
71     static AboutDialog *instance;
72 public slots:
73     void close();
74 };
75
76 #ifdef UPDATE_CHECK
77
78 static int UDOkEvent = QEvent::User + 1;
79 static int UDErrorEvent = QEvent::User + 2;
80
81 class UpdateDialog : public QVLCFrame
82 {
83     Q_OBJECT;
84 public:
85     static UpdateDialog * getInstance( intf_thread_t *p_intf )
86     {
87         if( !instance )
88             instance = new UpdateDialog( p_intf );
89         return instance;
90     }
91     virtual ~UpdateDialog();
92     void updateNotify( bool );
93
94 private:
95     UpdateDialog( intf_thread_t * );
96     static UpdateDialog *instance;
97     update_t *p_update;
98     QPushButton *updateButton;
99     QLabel *updateLabel;
100     void customEvent( QEvent * );
101     bool b_checked;
102
103 private slots:
104     void close();
105     void UpdateOrDownload();
106 };
107 #endif
108
109 #endif