00001 /*************************************************************************** 00002 outputview.h - views output of programs in a list box 00003 ------------------- 00004 begin : Don, 13 Feb 2003 00005 copyright : (C) 2003 by Heiko Köhler 00006 email : heicom@users.sourceforge.net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef __OUTPUTVIEW_H__ 00019 #define __OUTPUTVIEW_H__ 00020 00021 #include <qlistbox.h> 00022 // include files for QextMDI 00023 #include <qextmdichildview.h> 00024 #include "ui/outputviewbase.h" 00025 00027 struct Message 00028 { 00029 QString file; 00030 int line; 00031 QString error; 00032 }; 00033 00035 class BasicOutputView : public QListBox 00036 { 00037 Q_OBJECT 00038 public: 00039 BasicOutputView( QWidget *parent = 0, const char *name = 0); 00041 void append( QString text ); 00042 public slots: 00044 void slotNextMessage(); 00046 void slotPrevMessage(); 00047 signals: 00049 void jump( QString fileName, unsigned int lineno ); 00051 void clearAllOutputViews(); 00052 protected slots: 00054 void slotDoubleClicked(QListBoxItem*); 00056 void slotClearAllOutputViews(); 00058 void insertString(QString); 00059 protected: 00061 void mousePressEvent(QMouseEvent*); 00063 Message message(QString msg); 00064 QPopupMenu *contextMenu; 00065 }; 00066 00068 class OutputView : public BasicOutputView 00069 { 00070 Q_OBJECT 00071 public: 00072 OutputView( QWidget *parent = 0, const char *name = 0); 00073 }; 00074 00076 class GrepOutputView : public BasicOutputView 00077 { 00078 Q_OBJECT 00079 public: 00080 GrepOutputView( QWidget *parent = 0, const char *name = 0); 00081 signals: 00083 void showGrepDialog(); 00084 }; 00085 00086 #endif