00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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