summaryrefslogtreecommitdiff
path: root/client/mainwindow.cc
diff options
context:
space:
mode:
authorLars Bisballe Jensen <larsbisballe@gmail.com>2011-10-13 15:00:11 +0200
committerLars Bisballe Jensen <larsbisballe@gmail.com>2011-10-13 15:00:11 +0200
commit75e5e02f9cf72058c512601b54b065650fd4001c (patch)
tree91a74ac8bbf1443c6ce5faefe304c5230600e597 /client/mainwindow.cc
parentaec554542f0be3b8c14c615fbb7d64b592d50f27 (diff)
Added AboutBox that show when clicking Pracro button in status bar
Diffstat (limited to 'client/mainwindow.cc')
-rw-r--r--client/mainwindow.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc
index 6bf0543..7db7076 100644
--- a/client/mainwindow.cc
+++ b/client/mainwindow.cc
@@ -41,6 +41,7 @@
#include <QEvent>
#include <QCloseEvent>
+#include "aboutbox.h"
#include "messagebox.h"
#include "macrodrawer.h"
@@ -102,7 +103,14 @@ MainWindow::MainWindow(QString patientid, QString course, QString templ,
setWindowIcon(QIcon(":/icons/icon.png"));
QStatusBar *status = statusBar();
- status->addPermanentWidget(new QLabel("Pracro v."VERSION));
+ //status->addPermanentWidget(new QLabel("Pracro v."VERSION));
+
+ aboutButton = new QPushButton("Pracro v."VERSION, status);
+ aboutButton->setIcon(QIcon(":icons/icon.png"));
+ connect(aboutButton, SIGNAL(clicked()), this, SLOT(showAbout()));
+
+ status->addPermanentWidget(aboutButton);
+
if(dbg_enabled()) {
status->addPermanentWidget(new Dbg());
}
@@ -133,6 +141,12 @@ MainWindow::~MainWindow()
{
}
+void MainWindow::showAbout()
+{
+ AboutBox aboutBox(this, Qt::Dialog);
+ aboutBox.exec();
+}
+
bool MainWindow::hasOpen(void *me)
{
Entities::iterator i = entities.begin();