summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
}