help.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Help.hpp : Help and About dialogs
00003  ****************************************************************************
00004  * Copyright (C) 2007 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef _HELP_DIALOG_H_
00025 #define _HELP_DIALOG_H_
00026 
00027 #ifdef HAVE_CONFIG_H
00028 #include "config.h"
00029 #endif
00030 
00031 #include "qt4.hpp"
00032 
00033 #include "util/qvlcframe.hpp"
00034 
00035 class QPushButton;
00036 class QTextBrowser;
00037 class QLabel;
00038 class QEvent;
00039 class QPushButton;
00040 class QTextEdit;
00041 
00042 class HelpDialog : public QVLCFrame
00043 {
00044     Q_OBJECT;
00045 public:
00046     static HelpDialog * getInstance( intf_thread_t *p_intf )
00047     {
00048         if( !instance)
00049             instance = new HelpDialog( p_intf );
00050         return instance;
00051     }
00052     static void killInstance()
00053     { if( instance ) delete instance; instance = NULL;}
00054     virtual ~HelpDialog();
00055 
00056 private:
00057     HelpDialog( intf_thread_t * );
00058     static HelpDialog *instance;
00059 public slots:
00060     void close();
00061 };
00062 
00063 
00064 class AboutDialog : public QVLCDialog
00065 {
00066     Q_OBJECT;
00067 public:
00068     static AboutDialog * getInstance( intf_thread_t *p_intf )
00069     {
00070         if( !instance)
00071             instance = new AboutDialog( (QWidget *)p_intf->p_sys->p_mi,
00072                                         p_intf );
00073         return instance;
00074     }
00075 
00076 private:
00077     AboutDialog( QWidget *, intf_thread_t * );
00078     virtual ~AboutDialog();
00079 
00080     static AboutDialog *instance;
00081 
00082 public slots:
00083     void close();
00084 };
00085 
00086 #ifdef UPDATE_CHECK
00087 
00088 static const int UDOkEvent = QEvent::User + DialogEventType + 21;
00089 static const int UDErrorEvent = QEvent::User + DialogEventType + 22;
00090 
00091 class UpdateDialog : public QVLCFrame
00092 {
00093     Q_OBJECT;
00094 public:
00095     static UpdateDialog * getInstance( intf_thread_t *p_intf )
00096     {
00097         if( !instance )
00098             instance = new UpdateDialog( p_intf );
00099         return instance;
00100     }
00101     static void killInstance()
00102     { if( instance ) delete instance; instance = NULL;}
00103 
00104     void updateNotify( bool );
00105 
00106 private:
00107     UpdateDialog( intf_thread_t * );
00108     virtual ~UpdateDialog();
00109 
00110     static UpdateDialog *instance;
00111 
00112     update_t *p_update;
00113     QPushButton *updateButton;
00114     QLabel *updateLabelTop;
00115     QLabel *updateLabelDown;
00116     QTextEdit *updateText;
00117     void customEvent( QEvent * );
00118     bool b_checked;
00119 
00120 private slots:
00121     void close();
00122     void UpdateOrDownload();
00123 };
00124 #endif
00125 
00126 #endif

Generated on Wed Aug 13 08:02:37 2008 for VLC by  doxygen 1.5.1