aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/uidebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/uidebug.h')
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/uidebug.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/uidebug.h b/SQLiteStudio3/guiSQLiteStudio/uidebug.h
new file mode 100644
index 0000000..d1b04b7
--- /dev/null
+++ b/SQLiteStudio3/guiSQLiteStudio/uidebug.h
@@ -0,0 +1,36 @@
+#ifndef UIDEBUG_H
+#define UIDEBUG_H
+
+#include "guiSQLiteStudio_global.h"
+#include <QtDebug>
+
+class GUI_API_EXPORT MsgHandlerThreadProxy : public QObject
+{
+ Q_OBJECT
+
+ public:
+ explicit MsgHandlerThreadProxy(QObject* parent = 0);
+
+ public slots:
+ void debug(const QString& msg);
+ void warn(const QString& msg);
+ void critical(const QString& msg);
+ void fatal(const QString& msg);
+
+ signals:
+ void debugRequested(const QString& msg);
+ void warnRequested(const QString& msg);
+ void criticalRequested(const QString& msg);
+ void fatalRequested(const QString& msg);
+
+ private slots:
+ void print(const QString& txt);
+};
+
+GUI_API_EXPORT void uiMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg);
+GUI_API_EXPORT void setUiDebug(bool enabled, bool useUiConsole = true);
+GUI_API_EXPORT void showUiDebugConsole();
+GUI_API_EXPORT bool isDebugEnabled();
+GUI_API_EXPORT bool isDebugConsoleEnabled();
+
+#endif // UIDEBUG_H