diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 5 | ||||
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 5 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 2 | ||||
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 9 |
4 files changed, 20 insertions, 1 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 3de08b003..fc5f6dfef 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -1,5 +1,6 @@ #include <QtDebug> #include <QFileDialog> +#include <QShortcut> #include "divelogimportdialog.h" #include "mainwindow.h" #include "ui_divelogimportdialog.h" @@ -44,6 +45,10 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDi connect(ui->cnsCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports())); connect(ui->CSVstopdepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports())); connect(ui->stopdepthCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports())); + QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this); + connect(close, SIGNAL(activated()), this, SLOT(close())); + QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this); + connect(quit, SIGNAL(activated()), parent, SLOT(close())); } DiveLogImportDialog::~DiveLogImportDialog() diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index a5b3d617c..bbe62c47a 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -12,6 +12,7 @@ #include <QTimer> #include <QFileDialog> #include <QMessageBox> +#include <QShortcut> struct product { const char *product; @@ -80,6 +81,10 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) : connect(timer, SIGNAL(timeout()), this, SLOT(updateProgressBar())); updateState(INITIAL); memset(&data, 0, sizeof(data)); + QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this); + connect(close, SIGNAL(activated()), this, SLOT(close())); + QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this); + connect(quit, SIGNAL(activated()), parent, SLOT(close())); } void DownloadFromDCWidget::updateProgressBar() diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 5bc89c12d..481244e91 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -1084,7 +1084,7 @@ void MainWindow::on_actionImportDiveLog_triggered() } if (csvFiles.size()) { - DiveLogImportDialog *diveLogImport = new DiveLogImportDialog(&csvFiles); + DiveLogImportDialog *diveLogImport = new DiveLogImportDialog(&csvFiles, this); diveLogImport->show(); process_dives(true, false); refreshDisplay(); diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 87cd6006e..0f062265b 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -14,6 +14,7 @@ #include <QSettings> #include <QXmlStreamReader> #include <qdesktopservices.h> +#include <QShortcut> #include "dive.h" #include "divelist.h" @@ -323,6 +324,10 @@ SubsurfaceWebServices::SubsurfaceWebServices(QWidget *parent, Qt::WindowFlags f) ui.progressBar->setRange(0, 1); ui.progressBar->setValue(-1); ui.saveUidLocal->setChecked(prefs.save_userid_local); + QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this); + connect(close, SIGNAL(activated()), this, SLOT(close())); + QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this); + connect(quit, SIGNAL(activated()), parent, SLOT(close())); } void SubsurfaceWebServices::buttonClicked(QAbstractButton *button) @@ -648,6 +653,10 @@ DivelogsDeWebServices::DivelogsDeWebServices(QWidget *parent, Qt::WindowFlags f) ui.password->setText(s.value("divelogde_pass").toString()); ui.saveUidLocal->hide(); hideUpload(); + QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this); + connect(close, SIGNAL(activated()), this, SLOT(close())); + QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this); + connect(quit, SIGNAL(activated()), parent, SLOT(close())); } void DivelogsDeWebServices::startUpload() |