1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Added some more shortcuts

This commit is contained in:
Martin Tůma 2021-09-02 12:55:32 +02:00
parent 3709a3feb5
commit d50ab8607e
2 changed files with 4 additions and 0 deletions

View File

@ -355,6 +355,7 @@ void GUI::createActions(TreeNode<MapAction*> &mapActions,
_showTracksAction = new QAction(tr("Show tracks"), this); _showTracksAction = new QAction(tr("Show tracks"), this);
_showTracksAction->setMenuRole(QAction::NoRole); _showTracksAction->setMenuRole(QAction::NoRole);
_showTracksAction->setCheckable(true); _showTracksAction->setCheckable(true);
_showTracksAction->setShortcut(SHOW_TRACKS_SHORTCUT);
connect(_showTracksAction, &QAction::triggered, this, &GUI::showTracks); connect(_showTracksAction, &QAction::triggered, this, &GUI::showTracks);
_showRoutesAction = new QAction(tr("Show routes"), this); _showRoutesAction = new QAction(tr("Show routes"), this);
_showRoutesAction->setMenuRole(QAction::NoRole); _showRoutesAction->setMenuRole(QAction::NoRole);
@ -408,6 +409,7 @@ void GUI::createActions(TreeNode<MapAction*> &mapActions,
_downloadDEMAction = new QAction(tr("Download DEM data"), this); _downloadDEMAction = new QAction(tr("Download DEM data"), this);
_downloadDEMAction->setMenuRole(QAction::NoRole); _downloadDEMAction->setMenuRole(QAction::NoRole);
_downloadDEMAction->setEnabled(false); _downloadDEMAction->setEnabled(false);
_downloadDEMAction->setShortcut(DOWNLOAD_DEM_SHORTCUT);
connect(_downloadDEMAction, &QAction::triggered, this, &GUI::downloadDEM); connect(_downloadDEMAction, &QAction::triggered, this, &GUI::downloadDEM);
// Graph actions // Graph actions

View File

@ -28,6 +28,8 @@
#define PREV_MAP_SHORTCUT QKeySequence(QKeySequence::Back) #define PREV_MAP_SHORTCUT QKeySequence(QKeySequence::Back)
#define SHOW_GRAPHS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_G) #define SHOW_GRAPHS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_G)
#define STATISTICS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_S) #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() \ #define FULLSCREEN_SHORTCUT (QKeySequence(QKeySequence::FullScreen).isEmpty() \
? QKeySequence(Qt::Key_F11) \ ? QKeySequence(Qt::Key_F11) \
: QKeySequence(QKeySequence::FullScreen)) : QKeySequence(QKeySequence::FullScreen))