|
1 | 1 | /* |
2 | 2 | * Copyright 2012, 2013 Thomas Schöps |
3 | | - * Copyright 2012-2021 Kai Pastor |
| 3 | + * Copyright 2012-2023 Kai Pastor |
4 | 4 | * |
5 | 5 | * This file is part of OpenOrienteering. |
6 | 6 | * |
|
124 | 124 | #include "gui/map/map_dialog_scale.h" |
125 | 125 | #include "gui/map/map_editor_activity.h" |
126 | 126 | #include "gui/map/map_find_feature.h" |
| 127 | +#include "gui/map/map_information.h" |
127 | 128 | #include "gui/map/map_widget.h" |
128 | 129 | #include "gui/map/rotate_map_dialog.h" |
129 | 130 | #include "gui/symbols/symbol_replacement.h" |
@@ -462,6 +463,7 @@ void MapEditorController::setEditingInProgress(bool value) |
462 | 463 | scale_map_act->setEnabled(!editing_in_progress); |
463 | 464 | rotate_map_act->setEnabled(!editing_in_progress); |
464 | 465 | map_notes_act->setEnabled(!editing_in_progress); |
| 466 | + map_info_act->setEnabled(!editing_in_progress); |
465 | 467 |
|
466 | 468 | // Map menu, continued |
467 | 469 | const int num_parts = map->getNumParts(); |
@@ -1025,6 +1027,7 @@ void MapEditorController::createActions() |
1025 | 1027 | scale_map_act = newAction("scalemap", tr("Change map scale..."), this, SLOT(scaleMapClicked()), "tool-scale.png", tr("Change the map scale and adjust map objects and symbol sizes"), "map_menu.html"); |
1026 | 1028 | rotate_map_act = newAction("rotatemap", tr("Rotate map..."), this, SLOT(rotateMapClicked()), "tool-rotate.png", tr("Rotate the whole map"), "map_menu.html"); |
1027 | 1029 | map_notes_act = newAction("mapnotes", tr("Map notes..."), this, SLOT(mapNotesClicked()), nullptr, QString{}, "map_menu.html"); |
| 1030 | + map_info_act = newAction("mapinfo", tr("Map information..."), this, SLOT(mapInfoClicked()), "map-information.png", QString{}, "map_menu.html"); |
1028 | 1031 |
|
1029 | 1032 | template_window_act = newCheckAction("templatewindow", tr("Template setup window"), this, SLOT(showTemplateWindow(bool)), "templates.png", tr("Show/Hide the template window"), "templates_menu.html"); |
1030 | 1033 | //QAction* template_config_window_act = newCheckAction("templateconfigwindow", tr("Template configurations window"), this, SLOT(showTemplateConfigurationsWindow(bool)), "window-new", tr("Show/Hide the template configurations window")); |
@@ -1251,6 +1254,7 @@ void MapEditorController::createMenuAndToolbars() |
1251 | 1254 | map_menu->addAction(scale_map_act); |
1252 | 1255 | map_menu->addAction(rotate_map_act); |
1253 | 1256 | map_menu->addAction(map_notes_act); |
| 1257 | + map_menu->addAction(map_info_act); |
1254 | 1258 | map_menu->addSeparator(); |
1255 | 1259 | updateMapPartsUI(); |
1256 | 1260 | map_menu->addAction(mappart_add_act); |
@@ -2277,6 +2281,13 @@ void MapEditorController::mapNotesClicked() |
2277 | 2281 | } |
2278 | 2282 | } |
2279 | 2283 |
|
| 2284 | +void MapEditorController::mapInfoClicked() |
| 2285 | +{ |
| 2286 | + MapInformation dialog(window, map); |
| 2287 | + dialog.setWindowModality(Qt::WindowModal); |
| 2288 | + dialog.exec(); |
| 2289 | +} |
| 2290 | + |
2280 | 2291 | void MapEditorController::createTemplateWindow() |
2281 | 2292 | { |
2282 | 2293 | Q_ASSERT(!template_dock_widget); |
|
0 commit comments