diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2014-05-21 15:41:46 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-21 22:20:48 +0900 |
commit | 51e5030c06862b54cb5aa030693dbcb9eec8c01f (patch) | |
tree | a553f5bdd07c72b5c69a19a28ed4322ae5a147f8 /qt-ui | |
parent | 19e22e1bb76d942ae17a5515c5d635a7d63f70e9 (diff) | |
download | subsurface-51e5030c06862b54cb5aa030693dbcb9eec8c01f.tar.gz |
Shortcuts for the exporting window.
Add the ability to close the exporting window, also Quit Subsurface with
this window in front, for consistency.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelogexportdialog.cpp | 5 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp index 73f90678f..06d1757c9 100644 --- a/qt-ui/divelogexportdialog.cpp +++ b/qt-ui/divelogexportdialog.cpp @@ -1,5 +1,6 @@ #include <QFileDialog> #include <QString> +#include <QShortcut> #include "mainwindow.h" #include "divelogexportdialog.h" @@ -12,6 +13,10 @@ DiveLogExportDialog::DiveLogExportDialog(QWidget *parent) : ui(new Ui::DiveLogExportDialog) { ui->setupUi(this); + QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this); + connect(quit, SIGNAL(activated()), parent, SLOT(close())); + QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this); + connect(close, SIGNAL(activated()), this, SLOT(close())); } DiveLogExportDialog::~DiveLogExportDialog() diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index d70e7b31e..b00d5e814 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -1198,6 +1198,6 @@ void MainWindow::on_profScaled_clicked(bool triggered) void MainWindow::on_actionExport_triggered() { - DiveLogExportDialog *diveLogExport = new DiveLogExportDialog(); + DiveLogExportDialog *diveLogExport = new DiveLogExportDialog(this); diveLogExport->show(); } |