summaryrefslogtreecommitdiff
path: root/client/mainwindow.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-12-21 10:41:15 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2012-12-21 10:41:15 +0100
commitfc0e7683878ac10eb9a4675f61e6443a13ced946 (patch)
tree317a57f0b1f7a1654d39c6bed4378c46934777cb /client/mainwindow.cc
parent01ea1cb9ca4547c406ce0ed72b3f5f6ce18d91d9 (diff)
Implemented new shortcut key system. Fade in/out shortcut tooltips. Close pcpviewer on window close due to commit/nocommit/discard actions.
Diffstat (limited to 'client/mainwindow.cc')
-rw-r--r--client/mainwindow.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc
index 9436f41..bd8055e 100644
--- a/client/mainwindow.cc
+++ b/client/mainwindow.cc
@@ -122,10 +122,13 @@ MainWindow::MainWindow(QString patientid, QString title, QString course,
QToolBar *toolbar = addToolBar("controls");
toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
QAction *close_commit = toolbar->addAction(tr("Close and commit"));
+ close_commit->setShortcut(QKeySequence(tr("Ctrl+Alt+S")));
close_commit->setIcon(QPixmap(":icons/icon_close_commit.png"));
QAction *close_no_commit = toolbar->addAction(tr("Close no commit"));
close_no_commit->setIcon(QPixmap(":icons/icon_close_no_commit.png"));
+ close_no_commit->setShortcut(QKeySequence(tr("Ctrl+Alt+X")));
+
/*
QAction *close_discard = toolbar->addAction("Close discard");
close_discard->setIcon(QPixmap(":icons/icon_discard.png"));
@@ -233,6 +236,11 @@ void MainWindow::closeDiscard()
void MainWindow::closeEvent(QCloseEvent *event)
{
+ if(closing) {
+ emit isClosing();
+ return;
+ }
+
if(hasOpen(NULL)) {
MessageBox::warning(this, "Close first.", "Close open macros first.");
event->ignore();