summaryrefslogtreecommitdiff
path: root/client/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'client/debug.h')
-rw-r--r--client/debug.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/client/debug.h b/client/debug.h
index e0de223..ebafce5 100644
--- a/client/debug.h
+++ b/client/debug.h
@@ -27,6 +27,34 @@
*/
#ifndef __PRACRO_DEBUG_H__
+#include <QDialog>
+#include <QListWidget>
+#include <QCloseEvent>
+#include <QTimer>
+
+typedef enum {
+ _debug,
+ _error,
+ _warn,
+ _log
+} debug_class;
+
+class DebugWindow : public QDialog {
+ Q_OBJECT
+public:
+ DebugWindow();
+
+ void log(const char *func, const char *file, const int line,
+ debug_class cl, const char *ch, QString &msg);
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private:
+ QListWidget *lst;
+ QTimer timer;
+};
+
void dbg_init();
void dbg_free();
@@ -36,12 +64,6 @@ void dbg_hide();
bool dbg_enabled();
-typedef enum {
- _debug,
- _error,
- _warn,
- _log
-} debug_class;
void dbg_log(const char *func, const char *file, const int line,
debug_class cl, const char *ch, const char *fmt, ...)