1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-23 19:25:54 +01:00

Add shortcuts for enabling/disabling all item types

This commit is contained in:
Martin Tůma 2024-09-05 01:04:29 +02:00
parent 4697de6986
commit c0bca44810
2 changed files with 7 additions and 1 deletions

View File

@ -399,15 +399,18 @@ void GUI::createActions()
_showRoutesAction = new QAction(tr("Show routes"), this);
_showRoutesAction->setMenuRole(QAction::NoRole);
_showRoutesAction->setCheckable(true);
_showRoutesAction->setShortcut(SHOW_ROUTES_SHORTCUT);
connect(_showRoutesAction, &QAction::triggered, this, &GUI::showRoutes);
_showWaypointsAction = new QAction(tr("Show waypoints"), this);
_showWaypointsAction->setMenuRole(QAction::NoRole);
_showWaypointsAction->setCheckable(true);
_showWaypointsAction->setShortcut(SHOW_WAYPOINTS_SHORTCUT);
connect(_showWaypointsAction, &QAction::triggered, this,
&GUI::showWaypoints);
_showAreasAction = new QAction(tr("Show areas"), this);
_showAreasAction->setMenuRole(QAction::NoRole);
_showAreasAction->setCheckable(true);
_showAreasAction->setShortcut(SHOW_AREAS_SHORTCUT);
connect(_showAreasAction, &QAction::triggered, this, &GUI::showAreas);
_showWaypointIconsAction = new QAction(tr("Waypoint icons"), this);
_showWaypointIconsAction->setMenuRole(QAction::NoRole);

View File

@ -22,7 +22,7 @@
#define RELOAD_SHORTCUT QKeySequence(QKeySequence::Refresh)
#define PDF_EXPORT_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_E)
#define PNG_EXPORT_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_X)
#define SHOW_POI_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_P)
#define SHOW_POI_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_I)
#define SHOW_MAP_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_M)
#define NEXT_MAP_SHORTCUT QKeySequence(QKeySequence::Forward)
#define PREV_MAP_SHORTCUT QKeySequence(QKeySequence::Back)
@ -30,6 +30,9 @@
#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 SHOW_ROUTES_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_R)
#define SHOW_AREAS_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_A)
#define SHOW_WAYPOINTS_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_P)
#define FULLSCREEN_SHORTCUT (QKeySequence(QKeySequence::FullScreen).isEmpty() \
? QKeySequence(Qt::Key_F11) \
: QKeySequence(QKeySequence::FullScreen))