#ifndef LOGVIEWER_H #define LOGVIEWER_H #include #include class KPushButton; class Logger; /** * @short The items for the log viewer list * @author Daniel Faust * @version 0.3 */ class LogViewerItem : public KListViewItem { public: /** * Constructor * @param tqparent The tqparent list view * @param after The item, the new item should be placed after * @param label1 The text for the first column */ LogViewerItem( KListView* tqparent, LogViewerItem* after, TQString label1 ); /** * Constructor * @param tqparent The tqparent list view item * @param after The item, the new item should be placed after * @param label1 The text for the first column */ LogViewerItem( LogViewerItem* tqparent, LogViewerItem* after, TQString label1 ); /** * Destructor */ virtual ~LogViewerItem(); virtual void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int tqalignment ); LogViewerItem* nextSibling() const { return static_cast( KListViewItem::nextSibling() ); } LogViewerItem* firstChild() const { return static_cast( KListViewItem::firstChild() ); } bool converting; }; /** * @short The log viewer list * @author Daniel Faust * @version 0.3 */ class LogViewerList : public KListView { Q_OBJECT TQ_OBJECT public: /** * Constructor * @param tqparent The tqparent widget * @param name The name of the file list */ LogViewerList( TQWidget * tqparent = 0, const char* name = 0 ); /** * Destructor */ virtual ~LogViewerList(); LogViewerItem* firstChild() const { return static_cast( KListView::firstChild() ); } }; /** * @short Shows the logs that are collected by the logger * @author Daniel Faust * @version 0.3 */ class LogViewer : public KDialog { Q_OBJECT TQ_OBJECT public: /** * Default Constructor */ LogViewer( Logger* _logger, TQWidget* tqparent=0, const char* name = 0, bool modal = true, WFlags f = 0 ); /** * Default Destructor */ virtual ~LogViewer(); private: Logger* logger; LogViewerList* lLogs; KPushButton* pOk; KPushButton* pReload; private slots: void refillLogs(); void updateProcess( int id ); public slots: /** get notification when a job has been removed */ void processRemoved( int id ); }; #endif // LOGVIEWER_H