]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs/help.cpp
Qt4 - Add skeletons for Captures and some widget on Help/ About
[vlc] / modules / gui / qt4 / dialogs / help.cpp
1 /*****************************************************************************
2  * Help.cpp : Help and About dialogs
3  ****************************************************************************
4  * Copyright (C) 2006 the VideoLAN team
5  * $Id: Messages.cpp 16024 2006-07-13 13:51:05Z xtophe $
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 #include "dialogs/help.hpp"
25
26 #include "dialogs_provider.hpp"
27 #include "util/qvlcframe.hpp"
28 #include "qt4.hpp"
29
30 #include <QTextBrowser>
31 #include <QTabWidget>
32
33 HelpDialog *HelpDialog::instance = NULL;
34
35 HelpDialog::HelpDialog( intf_thread_t *_p_intf) :  QVLCFrame( _p_intf )
36 {
37     setWindowTitle( qtr( "Help" ) );
38     resize(450, 500);
39
40     QGridLayout *layout = new QGridLayout(this);
41     QTextBrowser *helpBrowser = new QTextBrowser(this);
42     QPushButton *closeButton = new QPushButton(qtr("&Close"));
43
44     layout->addWidget(helpBrowser, 0, 0, 1, 0);
45     layout->addWidget(closeButton, 1, 3);
46
47     BUTTONACT( closeButton, close() );
48 }
49
50 HelpDialog::~HelpDialog()
51 {
52 }
53 void HelpDialog::close()
54 {
55     this->toggleVisible();
56 }
57
58 AboutDialog *AboutDialog::instance = NULL;
59
60 AboutDialog::AboutDialog( intf_thread_t *_p_intf) :  QVLCFrame( _p_intf )
61 {
62     setWindowTitle( qtr( "About" ) );
63     resize( 450, 250 );
64
65     QGridLayout *layout = new QGridLayout( this );
66     QTabWidget *tab = new QTabWidget( this );
67     QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
68     
69     layout->addWidget( tab, 0, 0); 
70     layout->addWidget( closeButton, 1, 3 );
71     BUTTONACT( closeButton, close() );
72 }
73
74 AboutDialog::~AboutDialog()
75 {
76 }
77 void AboutDialog::close()
78 {
79     this->toggleVisible();
80 }