summaryrefslogtreecommitdiff
path: root/client/mainwindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mainwindow.cc')
-rw-r--r--client/mainwindow.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc
index f7cb173..e8a7f51 100644
--- a/client/mainwindow.cc
+++ b/client/mainwindow.cc
@@ -42,10 +42,25 @@
#include <QAction>
#include <QEvent>
#include <QCloseEvent>
+#include <QLabel>
#include "macrodrawer.h"
#include "macrowindow.h"
+#include "debug.h"
+
+class Dbg : public QLabel {
+public:
+ Dbg() {
+ setText("dbg");
+ }
+
+ void mousePressEvent(QMouseEvent *)
+ {
+ dbg_toggle();
+ }
+};
+
MainWindow::MainWindow(QString cpr, QString templ, QString host,
quint16 port, QString user)
: QMainWindow(0, Qt::WindowContextHelpButtonHint),
@@ -63,6 +78,7 @@ MainWindow::MainWindow(QString cpr, QString templ, QString host,
QStatusBar *status = statusBar();
status->addPermanentWidget(new QLabel("Pracro v."VERSION));
+ status->addPermanentWidget(new Dbg());
QToolBar *toolbar = addToolBar("controls");
toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
@@ -171,6 +187,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
event->accept();
if(viewer) viewer->close();
+ dbg_free();
} else {
event->ignore();
}