From 51e5030c06862b54cb5aa030693dbcb9eec8c01f Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Wed, 21 May 2014 15:41:46 +0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/divelogexportdialog.cpp | 5 +++++ qt-ui/mainwindow.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 #include +#include #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(); } -- cgit v1.2.3-70-g09d2