summaryrefslogtreecommitdiffstats
path: root/qt-ui/subsurfacewebservices.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-25 10:44:23 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-25 10:47:44 -0700
commit155eac11d2308df5158bcbd994b2ec5a851e4900 (patch)
tree9e8ed5feaa7ebefef592f905041119c8f69dabec /qt-ui/subsurfacewebservices.cpp
parent461872b7ea6d8864a5505dca4c7c355cfbd88bb3 (diff)
downloadsubsurface-155eac11d2308df5158bcbd994b2ec5a851e4900.tar.gz
Ctrl-W and -Q support for GPS, divelogs.de, divecomputer and CVS import
Getting closer to consistent behavior. See #489 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/subsurfacewebservices.cpp')
-rw-r--r--qt-ui/subsurfacewebservices.cpp9
1 files changed, 9 insertions, 0 deletions
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()