mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Add shortcuts for enabling/disabling all item types
This commit is contained in:
parent
4697de6986
commit
c0bca44810
@ -399,15 +399,18 @@ void GUI::createActions()
|
|||||||
_showRoutesAction = new QAction(tr("Show routes"), this);
|
_showRoutesAction = new QAction(tr("Show routes"), this);
|
||||||
_showRoutesAction->setMenuRole(QAction::NoRole);
|
_showRoutesAction->setMenuRole(QAction::NoRole);
|
||||||
_showRoutesAction->setCheckable(true);
|
_showRoutesAction->setCheckable(true);
|
||||||
|
_showRoutesAction->setShortcut(SHOW_ROUTES_SHORTCUT);
|
||||||
connect(_showRoutesAction, &QAction::triggered, this, &GUI::showRoutes);
|
connect(_showRoutesAction, &QAction::triggered, this, &GUI::showRoutes);
|
||||||
_showWaypointsAction = new QAction(tr("Show waypoints"), this);
|
_showWaypointsAction = new QAction(tr("Show waypoints"), this);
|
||||||
_showWaypointsAction->setMenuRole(QAction::NoRole);
|
_showWaypointsAction->setMenuRole(QAction::NoRole);
|
||||||
_showWaypointsAction->setCheckable(true);
|
_showWaypointsAction->setCheckable(true);
|
||||||
|
_showWaypointsAction->setShortcut(SHOW_WAYPOINTS_SHORTCUT);
|
||||||
connect(_showWaypointsAction, &QAction::triggered, this,
|
connect(_showWaypointsAction, &QAction::triggered, this,
|
||||||
&GUI::showWaypoints);
|
&GUI::showWaypoints);
|
||||||
_showAreasAction = new QAction(tr("Show areas"), this);
|
_showAreasAction = new QAction(tr("Show areas"), this);
|
||||||
_showAreasAction->setMenuRole(QAction::NoRole);
|
_showAreasAction->setMenuRole(QAction::NoRole);
|
||||||
_showAreasAction->setCheckable(true);
|
_showAreasAction->setCheckable(true);
|
||||||
|
_showAreasAction->setShortcut(SHOW_AREAS_SHORTCUT);
|
||||||
connect(_showAreasAction, &QAction::triggered, this, &GUI::showAreas);
|
connect(_showAreasAction, &QAction::triggered, this, &GUI::showAreas);
|
||||||
_showWaypointIconsAction = new QAction(tr("Waypoint icons"), this);
|
_showWaypointIconsAction = new QAction(tr("Waypoint icons"), this);
|
||||||
_showWaypointIconsAction->setMenuRole(QAction::NoRole);
|
_showWaypointIconsAction->setMenuRole(QAction::NoRole);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define RELOAD_SHORTCUT QKeySequence(QKeySequence::Refresh)
|
#define RELOAD_SHORTCUT QKeySequence(QKeySequence::Refresh)
|
||||||
#define PDF_EXPORT_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_E)
|
#define PDF_EXPORT_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_E)
|
||||||
#define PNG_EXPORT_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_X)
|
#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 SHOW_MAP_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_M)
|
||||||
#define NEXT_MAP_SHORTCUT QKeySequence(QKeySequence::Forward)
|
#define NEXT_MAP_SHORTCUT QKeySequence(QKeySequence::Forward)
|
||||||
#define PREV_MAP_SHORTCUT QKeySequence(QKeySequence::Back)
|
#define PREV_MAP_SHORTCUT QKeySequence(QKeySequence::Back)
|
||||||
@ -30,6 +30,9 @@
|
|||||||
#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 DOWNLOAD_DEM_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_D)
|
||||||
#define SHOW_TRACKS_SHORTCUT QKeySequence(Qt::CTRL | Qt::Key_T)
|
#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() \
|
#define FULLSCREEN_SHORTCUT (QKeySequence(QKeySequence::FullScreen).isEmpty() \
|
||||||
? QKeySequence(Qt::Key_F11) \
|
? QKeySequence(Qt::Key_F11) \
|
||||||
: QKeySequence(QKeySequence::FullScreen))
|
: QKeySequence(QKeySequence::FullScreen))
|
||||||
|
Loading…
Reference in New Issue
Block a user