summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-05-21 15:41:46 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-21 22:20:48 +0900
commit51e5030c06862b54cb5aa030693dbcb9eec8c01f (patch)
treea553f5bdd07c72b5c69a19a28ed4322ae5a147f8 /qt-ui
parent19e22e1bb76d942ae17a5515c5d635a7d63f70e9 (diff)
downloadsubsurface-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.cpp5
-rw-r--r--qt-ui/mainwindow.cpp2
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();
}