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>
This commit is contained in:
Gehad elrobey 2014-05-21 15:41:46 +03:00 committed by Dirk Hohndel
parent 19e22e1bb7
commit 51e5030c06
2 changed files with 6 additions and 1 deletions

View file

@ -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()

View file

@ -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();
}