1 /*****************************************************************************
2 * Help.cpp : Help and About dialogs
3 ****************************************************************************
4 * Copyright (C) 2007 the VideoLAN team
5 * $Id: Messages.cpp 16024 2006-07-13 13:51:05Z xtophe $
7 * Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
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.
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.
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 *****************************************************************************/
24 #include "dialogs/about.hpp"
25 #include "dialogs/help.hpp"
27 #include "dialogs_provider.hpp"
28 #include "util/qvlcframe.hpp"
31 #include <QTextBrowser>
37 HelpDialog *HelpDialog::instance = NULL;
39 HelpDialog::HelpDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
41 setWindowTitle( qtr( "Help" ) );
44 QGridLayout *layout = new QGridLayout( this );
45 QTextBrowser *helpBrowser = new QTextBrowser( this );
46 helpBrowser->setOpenExternalLinks( true );
47 helpBrowser->setHtml( _("<html><b>Documentation</b><br><br>You can find VLC documentation (in english) on VLC wiki website.<br><br>Please see the <a href=\"http://wiki.videolan.org/Documentation:VLC_for_dummies\">Basic Documentation</a>.<br>As well as the more <a href=\"http://wiki.videolan.org/Documentation:Play_HowTo\">Advanced Documentation</a>.<br>You might also be interested by the <a href=\"http://wiki.videolan.org/Documentation:Streaming_HowTo\">Streaming Documentation</a>.<br><br><br><b>Getting Help</b><br><br>You might get (and give) help on the <a href=\"http://forum.videolan.org\">Forums</a>.</html>") );
48 QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
49 closeButton->setDefault( true );
51 layout->addWidget( helpBrowser, 0, 0, 1, 0 );
52 layout->addWidget( closeButton, 1, 3 );
54 BUTTONACT( closeButton, close() );
57 HelpDialog::~HelpDialog()
60 void HelpDialog::close()
62 this->toggleVisible();
65 AboutDialog *AboutDialog::instance = NULL;
67 AboutDialog::AboutDialog( intf_thread_t *_p_intf) : QVLCFrame( _p_intf )
69 setWindowTitle( qtr( "About" ) );
72 QGridLayout *layout = new QGridLayout( this );
73 QTabWidget *tab = new QTabWidget( this );
75 QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
76 closeButton->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
77 closeButton->setDefault( true );
79 QLabel *introduction = new QLabel(
80 qtr( "Information about VLC media player" ) );
82 layout->addWidget( introduction, 0, 0, 1, 2 );
83 layout->addWidget( tab, 1, 0, 1, 2 );
84 layout->addWidget( closeButton, 2, 1, 1, 1 );
87 QTextEdit *licenseEdit = new QTextEdit( this );
88 licenseEdit->setText( qfu( psz_licence ) );
89 licenseEdit->setReadOnly( true );
91 /* People who helped */
92 QTextEdit *thanksEdit = new QTextEdit( this );
93 thanksEdit->setText( qfu( psz_thanks ) );
94 thanksEdit->setReadOnly( true );
96 /* add the tabs to the Tabwidget */
97 tab->addTab( NULL, qtr( "General Info" ) );
98 tab->addTab( NULL, qtr( "Authors" ) );
99 tab->addTab( thanksEdit, qtr("Thanks") );
100 tab->addTab( licenseEdit, qtr("Distribution License") );
102 BUTTONACT( closeButton, close() );
105 AboutDialog::~AboutDialog()
108 void AboutDialog::close()
110 this->toggleVisible();