00001 #ifndef __KMTRACEVIEWER_MAIN_WINDOW_H__ 00002 #define __KMTRACEVIEWER_MAIN_WINDOW_H__ 00003 00004 #ifdef HAVE_CONFIG_H 00005 #include <config.h> 00006 #endif 00007 00008 // KDE includes 00009 #include <kmainwindow.h> 00010 #include <kstatusbar.h> 00011 #include <kaction.h> 00012 00013 // KMtraceViewer includes 00014 #include "KMtraceModel.hh" 00015 #include "KMtraceStatisticsView.hh" 00016 #include "KMtraceLeaksView.hh" 00017 #include "KMtraceSuppressListDialog.hh" 00018 #include "KMtraceSourceCodeView.hh" 00019 00037 class KMtraceViewerMainWindow : public KMainWindow 00038 { 00039 Q_OBJECT 00040 00041 public: 00048 KMtraceViewerMainWindow( const char *ktreefile = 0 ); 00049 00050 ~KMtraceViewerMainWindow( ); 00051 00058 void setModel( KMtraceModel *model ); 00059 00066 void setModelFromFilename( const char *filename ); 00067 00068 protected slots: 00069 void slotEditToolbars( ); 00070 void slotUpdateToolbars( ); 00071 void slotShowSuppressed( ); 00072 void slotSuppressListDialog( ); 00073 void slotSuppressListDialogDone( ); 00074 void slotOpenFile( ); 00075 void slotOpenRecentFile( const KURL& url ); 00076 virtual bool queryExit( ); 00077 virtual void restoreSettings( KConfig *config ); 00078 virtual void saveSettings( KConfig *config ); 00079 00080 public slots: 00092 void slotModuleChanged( QString module, int line ); 00093 00099 void slotModuleUnselect( ); 00100 00101 private: 00102 // the model for the output of the kmtrace command 00103 KMtraceModel *m_model; 00104 00105 // the two main widgets (statistics and list of leaks) 00106 KMtraceStatisticsView *m_statsView; 00107 KMtraceLeaksView *m_leaksView; 00108 00109 // the window showing the source code 00110 KMtraceSourceCodeView *m_sourceCodeView; 00111 00112 // status bar 00113 KStatusBar *m_statusBar; 00114 00115 // the "show supress list dialog" 00116 KToggleAction *m_showSuppressListDialog; 00117 00118 // the "show suppressed" menu checker 00119 KToggleAction *m_showSuppressedAction; 00120 00121 // the dialog contain all suppressions 00122 KMtraceSuppressListDialog *m_suppressListDialog; 00123 00124 // the separator between source code and the list of leaks 00125 QSplitter *m_splitter; 00126 }; 00127 00128 #endif