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 <qpopupmenu.h> 00023 #include "ui/outputviewbase.h" 00024 00026 struct Message 00027 { 00028 QString file; 00029 int line; 00030 QString error; 00031 }; 00032 00034 class BasicOutputView : public QListBox 00035 { 00036 Q_OBJECT 00037 public: 00038 BasicOutputView( QWidget *parent = 0, const char *name = 0); 00040 void append( QString text ); 00041 public slots: 00043 void slotNextMessage(); 00045 void slotPrevMessage(); 00046 signals: 00048 void jump( QString fileName, unsigned int lineno ); 00050 void clearAllOutputViews(); 00051 protected slots: 00053 void slotDoubleClicked(QListBoxItem*); 00055 void slotClearAllOutputViews(); 00057 void insertString(QString); 00058 protected: 00060 void mousePressEvent(QMouseEvent*); 00062 Message message(QString msg); 00063 QPopupMenu *contextMenu; 00064 }; 00065 00067 class OutputView : public BasicOutputView 00068 { 00069 Q_OBJECT 00070 public: 00071 OutputView( QWidget *parent = 0, const char *name = 0); 00072 }; 00073 00075 class GrepOutputView : public BasicOutputView 00076 { 00077 Q_OBJECT 00078 public: 00079 GrepOutputView( QWidget *parent = 0, const char *name = 0); 00080 signals: 00082 void showGrepDialog(); 00083 }; 00084 00086 class TagOutputView : public BasicOutputView 00087 { 00088 Q_OBJECT 00089 public: 00090 TagOutputView( QWidget *parent = 0, const char *name = 0); 00091 }; 00092 00093 #endif