summaryrefslogtreecommitdiffstats
path: root/src/logviewer.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 19:09:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 19:09:31 +0000
commitf2cfda2a54780868dfe0af7bd652fcd4906547da (patch)
treec6ac23545528f5701818424f2af5f79ce3665e6c /src/logviewer.h
downloadsoundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.tar.gz
soundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.zip
Added KDE3 version of SoundKonverter
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1097614 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/logviewer.h')
-rwxr-xr-xsrc/logviewer.h111
1 files changed, 111 insertions, 0 deletions
diff --git a/src/logviewer.h b/src/logviewer.h
new file mode 100755
index 0000000..be3a8a3
--- /dev/null
+++ b/src/logviewer.h
@@ -0,0 +1,111 @@
+
+
+#ifndef LOGVIEWER_H
+#define LOGVIEWER_H
+
+#include <klistview.h>
+#include <kdialog.h>
+
+
+class KPushButton;
+class Logger;
+
+/**
+ * @short The items for the log viewer list
+ * @author Daniel Faust <[email protected]>
+ * @version 0.3
+ */
+class LogViewerItem : public KListViewItem
+{
+public:
+ /**
+ * Constructor
+ * @param parent The parent list view
+ * @param after The item, the new item should be placed after
+ * @param label1 The text for the first column
+ */
+ LogViewerItem( KListView* parent, LogViewerItem* after, QString label1 );
+
+ /**
+ * Constructor
+ * @param parent The parent list view item
+ * @param after The item, the new item should be placed after
+ * @param label1 The text for the first column
+ */
+ LogViewerItem( LogViewerItem* parent, LogViewerItem* after, QString label1 );
+
+ /**
+ * Destructor
+ */
+ virtual ~LogViewerItem();
+
+ virtual void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int alignment );
+
+ LogViewerItem* nextSibling() const { return static_cast<LogViewerItem*>( KListViewItem::nextSibling() ); }
+ LogViewerItem* firstChild() const { return static_cast<LogViewerItem*>( KListViewItem::firstChild() ); }
+
+ bool converting;
+};
+
+
+/**
+ * @short The log viewer list
+ * @author Daniel Faust <[email protected]>
+ * @version 0.3
+ */
+class LogViewerList : public KListView
+{
+ Q_OBJECT
+public:
+ /**
+ * Constructor
+ * @param parent The parent widget
+ * @param name The name of the file list
+ */
+ LogViewerList( QWidget * parent = 0, const char* name = 0 );
+
+ /**
+ * Destructor
+ */
+ virtual ~LogViewerList();
+
+ LogViewerItem* firstChild() const { return static_cast<LogViewerItem*>( KListView::firstChild() ); }
+};
+
+
+/**
+ * @short Shows the logs that are collected by the logger
+ * @author Daniel Faust <[email protected]>
+ * @version 0.3
+ */
+class LogViewer : public KDialog
+{
+ Q_OBJECT
+public:
+ /**
+ * Default Constructor
+ */
+ LogViewer( Logger* _logger, QWidget* parent=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