diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2014-04-25 19:39:40 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-25 10:52:09 -0700 |
commit | b4a04074c240f8c337dd1423950e1da7eb66f9f4 (patch) | |
tree | 71eca161839d37e559c214a62a84b8f4561d7373 /qt-ui/simplewidgets.cpp | |
parent | 155eac11d2308df5158bcbd994b2ec5a851e4900 (diff) | |
download | subsurface-b4a04074c240f8c337dd1423950e1da7eb66f9f4.tar.gz |
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 <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 <QTime> #include <QFileDialog> #include <QDateTime> +#include <QShortcut> #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) |