From b4a04074c240f8c337dd1423950e1da7eb66f9f4 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Fri, 25 Apr 2014 19:39:40 +0200 Subject: Closing shortcuts for shift times windows Adding the ability to close the shift times window, also Quit subsurface with this window in front. See #489 Signed-off-by: Gehad elrobey Signed-off-by: Dirk Hohndel --- qt-ui/simplewidgets.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index d100eb762..475276875 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include "exif.h" #include "../dive.h" #include "../file.h" @@ -181,6 +182,10 @@ ShiftTimesDialog::ShiftTimesDialog(QWidget *parent) : QDialog(parent) connect(ui.buttonBox, SIGNAL(clicked(QAbstractButton *)), this, SLOT(buttonClicked(QAbstractButton *))); connect(ui.timeEdit, SIGNAL(timeChanged(const QTime)), this, SLOT(changeTime())); connect(ui.backwards, SIGNAL(toggled(bool)), this, SLOT(changeTime())); + QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this); + connect(close, SIGNAL(activated()), this, SLOT(close())); + QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this); + connect(quit, SIGNAL(activated()), parent, SLOT(close())); } void ShiftImageTimesDialog::buttonClicked(QAbstractButton *button) -- cgit v1.2.3-70-g09d2