From d50ab8607e2b8d2030fe5bd2beb268f5586070c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 2 Sep 2021 12:55:32 +0200 Subject: [PATCH] Added some more shortcuts --- src/GUI/gui.cpp | 2 ++ src/GUI/keys.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/GUI/gui.cpp b/src/GUI/gui.cpp index 8b602262..af350a62 100644 --- a/src/GUI/gui.cpp +++ b/src/GUI/gui.cpp @@ -355,6 +355,7 @@ void GUI::createActions(TreeNode &mapActions, _showTracksAction = new QAction(tr("Show tracks"), this); _showTracksAction->setMenuRole(QAction::NoRole); _showTracksAction->setCheckable(true); + _showTracksAction->setShortcut(SHOW_TRACKS_SHORTCUT); connect(_showTracksAction, &QAction::triggered, this, &GUI::showTracks); _showRoutesAction = new QAction(tr("Show routes"), this); _showRoutesAction->setMenuRole(QAction::NoRole); @@ -408,6 +409,7 @@ void GUI::createActions(TreeNode &mapActions, _downloadDEMAction = new QAction(tr("Download DEM data"), this); _downloadDEMAction->setMenuRole(QAction::NoRole); _downloadDEMAction->setEnabled(false); + _downloadDEMAction->setShortcut(DOWNLOAD_DEM_SHORTCUT); connect(_downloadDEMAction, &QAction::triggered, this, &GUI::downloadDEM); // Graph actions diff --git a/src/GUI/keys.h b/src/GUI/keys.h index c37f42d4..309e1e99 100644 --- a/src/GUI/keys.h +++ b/src/GUI/keys.h @@ -28,6 +28,8 @@ #define PREV_MAP_SHORTCUT QKeySequence(QKeySequence::Back) #define SHOW_GRAPHS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_G) #define STATISTICS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_S) +#define DOWNLOAD_DEM_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_D) +#define SHOW_TRACKS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_T) #define FULLSCREEN_SHORTCUT (QKeySequence(QKeySequence::FullScreen).isEmpty() \ ? QKeySequence(Qt::Key_F11) \ : QKeySequence(QKeySequence::FullScreen))