|
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_dialog.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(); |
@@ -1027,6 +1029,7 @@ void MapEditorController::createActions() |
1027 | 1029 | 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"); |
1028 | 1030 | rotate_map_act = newAction("rotatemap", tr("Rotate map..."), this, SLOT(rotateMapClicked()), "tool-rotate.png", tr("Rotate the whole map"), "map_menu.html"); |
1029 | 1031 | map_notes_act = newAction("mapnotes", tr("Map notes..."), this, SLOT(mapNotesClicked()), nullptr, QString{}, "map_menu.html"); |
| 1032 | + map_info_act = newAction("mapinfo", tr("Map information..."), this, SLOT(mapInfoClicked()), "map-information.png", QString{}, "map_menu.html"); |
1030 | 1033 |
|
1031 | 1034 | template_window_act = newCheckAction("templatewindow", tr("Template setup window"), this, SLOT(showTemplateWindow(bool)), "templates.png", tr("Show/Hide the template window"), "templates_menu.html"); |
1032 | 1035 | //QAction* template_config_window_act = newCheckAction("templateconfigwindow", tr("Template configurations window"), this, SLOT(showTemplateConfigurationsWindow(bool)), "window-new", tr("Show/Hide the template configurations window")); |
@@ -1253,6 +1256,7 @@ void MapEditorController::createMenuAndToolbars() |
1253 | 1256 | map_menu->addAction(scale_map_act); |
1254 | 1257 | map_menu->addAction(rotate_map_act); |
1255 | 1258 | map_menu->addAction(map_notes_act); |
| 1259 | + map_menu->addAction(map_info_act); |
1256 | 1260 | map_menu->addSeparator(); |
1257 | 1261 | updateMapPartsUI(); |
1258 | 1262 | map_menu->addAction(mappart_add_act); |
@@ -2282,6 +2286,13 @@ void MapEditorController::mapNotesClicked() |
2282 | 2286 | } |
2283 | 2287 | } |
2284 | 2288 |
|
| 2289 | +void MapEditorController::mapInfoClicked() |
| 2290 | +{ |
| 2291 | + MapInformationDialog dialog(window, map); |
| 2292 | + dialog.setWindowModality(Qt::WindowModal); |
| 2293 | + dialog.exec(); |
| 2294 | +} |
| 2295 | + |
2285 | 2296 | void MapEditorController::createTemplateWindow() |
2286 | 2297 | { |
2287 | 2298 | Q_ASSERT(!template_dock_widget); |
|
0 commit comments