messages.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Messages.hpp : Information about a stream
00003  ****************************************************************************
00004  * Copyright (C) 2006-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 _MESSAGES_DIALOG_H_
00025 #define _MESSAGES_DIALOG_H_
00026 
00027 #include "util/qvlcframe.hpp"
00028 
00029 class QTabWidget;
00030 class QPushButton;
00031 class QSpinBox;
00032 class QGridLayout;
00033 class QLabel;
00034 class QTextEdit;
00035 class QTreeWidget;
00036 class QTreeWidgetItem;
00037 
00038 class MessagesDialog : public QVLCFrame
00039 {
00040     Q_OBJECT;
00041 public:
00042     static MessagesDialog * getInstance( intf_thread_t *p_intf )
00043     {
00044         if( !instance)
00045             instance = new MessagesDialog( p_intf );
00046         return instance;
00047     }
00048     static void killInstance()
00049     {
00050         if( instance ) delete instance;
00051         instance = NULL;
00052     }
00053 
00054     virtual ~MessagesDialog(){ writeSettings( "messages" ); };
00055 
00056 private:
00057     MessagesDialog( intf_thread_t * );
00058     static MessagesDialog *instance;
00059     QTabWidget *mainTab;
00060     QSpinBox *verbosityBox;
00061     QLabel *verbosityLabel;
00062     QTextEdit *messages;
00063     QTreeWidget *modulesTree;
00064     QPushButton *clearUpdateButton;
00065     QPushButton *saveLogButton;
00066 
00067 private slots:
00068     void updateTab( int );
00069     void updateLog();
00070     void clearOrUpdate();
00071     bool save();
00072 private:
00073     void clear();
00074     void updateTree();
00075     void buildTree( QTreeWidgetItem *, vlc_object_t * );
00076 };
00077 
00078 #endif

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