![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <menu.h>
Inheritance diagram for mr_menu:
Collaboration diagram for mr_menu:Public Member Functions | |
| mr_menu () | |
| Constructor for global menubar in gameview. More... | |
| void | setup_menus () |
| Initializes menu system, and add custom enum(munit) for most of options Notice that if you set option for QAction->setChecked(option) it will check/uncheck automatically without any intervention. More... | |
| void | menus_sensitive () |
| Enables/disables menu items and renames them depending on key in menu_list. More... | |
| void | update_airlift_menu () |
| Updates airlift menu. More... | |
| void | update_roads_menu () |
| Updates "build path" menu. More... | |
| void | update_bases_menu () |
| Updates "build bases" menu. More... | |
| void | set_tile_for_order (struct tile *ptile) |
| Sets given tile for delayed order. More... | |
| bool | shortcut_exists (const fc_shortcut &fcs, QString &where) |
| Returns string assigned to shortcut or empty string if doesnt exist. More... | |
Public Attributes | |
| QAction * | tileset_options = nullptr |
| QAction * | minimap_status = nullptr |
| QAction * | scale_fonts_status = nullptr |
| QAction * | lock_status = nullptr |
| QAction * | osd_status = nullptr |
| QAction * | btlog_status = nullptr |
| QAction * | chat_status = nullptr |
| QAction * | messages_status = nullptr |
| bool | delayed_order = false |
| bool | quick_airlifting = false |
| Unit_type_id | airlift_type_id = 0 |
Protected Member Functions | |
| bool | event (QEvent *event) override |
| Reimplemented virtual function. More... | |
Private Slots | |
| void | local_options () |
| Invoke dialog with interface (local) options. More... | |
| void | shortcut_options () |
| Invoke dialog with shortcut options. More... | |
| void | server_options () |
| Invoke dialog with server options. More... | |
| void | messages_options () |
| Invoke dialog with messages options. More... | |
| void | save_options_now () |
| Menu Save Options Now. More... | |
| void | save_game () |
| Menu Save Game. More... | |
| void | save_game_as () |
| Menu Save Game As... More... | |
| void | save_image () |
| Menu Save Map Image. More... | |
| void | tileset_custom_load () |
| Shows rulesets to load. More... | |
| void | load_new_tileset () |
| Slot for loading new tileset. More... | |
| void | add_modpacks () |
| Slot for loading modpack installer. More... | |
| void | show_tileset_options () |
| Slot for loading modpack installer. More... | |
| void | back_to_menu () |
| Back to Main Menu. More... | |
| void | quit_game () |
| Invoke popup for quiting game. More... | |
| void | slot_help (const QString &topic) |
| Actions "HELP_*". More... | |
| void | slot_build_path (int id) |
| Actions "BUILD_PATH_*". More... | |
| void | slot_build_base (int id) |
| Actions "BUILD_BASE_*". More... | |
| void | slot_build_city () |
| Action "BUILD_CITY". More... | |
| void | slot_auto_settler () |
| Action "AUTO_SETTLER". More... | |
| void | slot_build_road () |
| Action "BUILD_ROAD". More... | |
| void | slot_build_irrigation () |
| Action "BUILD_IRRIGATION". More... | |
| void | slot_cultivate () |
| Action "CULTIVATE". More... | |
| void | slot_build_mine () |
| Action "BUILD_MINE". More... | |
| void | slot_plant () |
| Action "PLANT". More... | |
| void | slot_conn_road () |
| Action "CONNECT WITH ROAD". More... | |
| void | slot_conn_rail () |
| Action "CONNECT WITH RAILROAD". More... | |
| void | slot_conn_irrigation () |
| Action "CONNECT WITH IRRIGATION". More... | |
| void | slot_transform () |
| Action "TRANSFROM TERRAIN". More... | |
| void | slot_clean_pollution () |
| Action "CLEAN POLLUTION and PARADROP". More... | |
| void | slot_clean_fallout () |
| Action "CLEAN FALLOUT". More... | |
| void | slot_unit_sentry () |
| Action "SENTRY". More... | |
| void | slot_unit_explore () |
| Action "EXPLORE". More... | |
| void | slot_unit_goto () |
| Action "GOTO". More... | |
| void | slot_airlift () |
| Action "GOTO/AIRLIFT TO CITY". More... | |
| void | slot_patrol () |
| Action "UNIT PATROL". More... | |
| void | slot_unsentry () |
| Action "UNSENTRY(WAKEUP) ALL UNITS". More... | |
| void | slot_load () |
| Action "LOAD INTO TRANSPORTER". More... | |
| void | slot_unload () |
| Action "UNLOAD FROM TRANSPORTED". More... | |
| void | slot_unload_all () |
| Action "UNLOAD ALL UNITS FROM TRANSPORTER". More... | |
| void | slot_set_home () |
| Action "SET HOMECITY". More... | |
| void | slot_upgrade () |
| Action "UPGRADE UNITS". More... | |
| void | slot_convert () |
| Action "CONVERT". More... | |
| void | slot_disband () |
| Action "DISBAND UNIT". More... | |
| void | slot_rename () |
| Action "RENAME UNIT". More... | |
| void | slot_unit_fortify () |
| Action "FORTIFY". More... | |
| void | slot_unit_fortress () |
| Action "BUILD FORTRESS". More... | |
| void | slot_unit_airbase () |
| Action "BUILD AIRBASE". More... | |
| void | slot_pillage () |
| Action "PILLAGE". More... | |
| void | slot_action () |
| Do... More... | |
| void | slot_set_citybar () |
| Action "Citybar changed". More... | |
| void | slot_center_view () |
| Action "CENTER VIEW". More... | |
| void | slot_show_new_turn_text () |
| Action "Show/Dont show new turn info". More... | |
| void | slot_battlelog () |
| Action "Show/Dont battle log". More... | |
| void | slot_fullscreen () |
| Action "SET FULLSCREEN". More... | |
| void | slot_lock () |
| Action "Lock interface". More... | |
| void | slot_city_outlines () |
| Action "SHOW CITY OUTLINES". More... | |
| void | slot_city_output () |
| Action "SHOW CITY OUTPUT". More... | |
| void | slot_map_grid () |
| Action "SHOW MAP GRID". More... | |
| void | slot_borders () |
| Action "SHOW BORDERS". More... | |
| void | slot_native_tiles () |
| Action "SHOW NATIVE TILES". More... | |
| void | slot_city_growth () |
| Action "SHOW CITY GROWTH". More... | |
| void | slot_city_production () |
| Action "SHOW CITY PRODUCTION". More... | |
| void | slot_city_buycost () |
| Action "SHOW BUY COST". More... | |
| void | slot_city_traderoutes () |
| Action "SHOW CITY TRADEROUTES". More... | |
| void | slot_city_names () |
| Action "SHOW CITY NAMES". More... | |
| void | zoom_scale_fonts () |
| Action "SCALE FONTS WHEN SCALING MAP". More... | |
| void | slot_select_one () |
| Action "SELECT ONE UNITS/DESELECT OTHERS". More... | |
| void | slot_select_all_tile () |
| Action "SELECT ALL UNITS ON TILE". More... | |
| void | slot_select_same_tile () |
| Action "SELECT SAME TYPE ON TILE". More... | |
| void | slot_select_same_continent () |
| Action "SELLECT SAME UNITS ON CONTINENT". More... | |
| void | slot_select_same_everywhere () |
| Action "SELECT SAME TYPE EVERYWHERE". More... | |
| void | slot_done_moving () |
| Action "DONE MOVING". More... | |
| void | slot_wait () |
| Action "WAIT". More... | |
| void | slot_unit_filter () |
| Shows units filter. More... | |
| void | slot_orders_clear () |
| Clears delayed orders. More... | |
| void | slot_execute_orders () |
| Executes stored orders. More... | |
| void | slot_delayed_goto () |
| Delayed goto. More... | |
| void | slot_trade_add_all () |
| Adds all cities to trade planning. More... | |
| void | slot_trade_city () |
| Adds one city to trade planning. More... | |
| void | slot_calculate () |
| Trade calculation slot. More... | |
| void | slot_clear_trade () |
| Slot for clearing trade routes. More... | |
| void | slot_autocaravan () |
| Sends automatic caravan. More... | |
| void | slot_rally () |
| Sets/unset rally point. More... | |
| void | slot_quickairlift_set () |
| Slot for setting quick airlift. More... | |
| void | slot_quickairlift () |
| Slot for quick airlifting. More... | |
| void | slot_action_vs_unit () |
| Slot for choosing default action vs unit. More... | |
| void | slot_action_vs_city () |
| Slot for choosing default action vs city. More... | |
| void | slot_show_map () |
| Changes tab to mapview. More... | |
| void | slot_popup_tax_rates () |
| Action "NATIONAL BUDGET". More... | |
| void | slot_popup_mult_rates () |
| Action "MULTIPLERS RATES". More... | |
| void | slot_show_research_tab () |
| Slot for showing research tab. More... | |
| void | slot_spaceship () |
| Slot for showing spaceship. More... | |
| void | slot_demographics () |
| Action "SHOW DEMOGRAPGHICS REPORT". More... | |
| void | slot_achievements () |
| Action "SHOW ACHIEVEMENTS REPORT". More... | |
| void | slot_endgame () |
| Action "SHOW ENDGAME REPORT". More... | |
| void | slot_top_five () |
| Action "SHOW TOP FIVE CITIES". More... | |
| void | slot_traveler () |
| Action "SHOW WONDERS REPORT". More... | |
Private Member Functions | |
| void | clear_menus () |
| Clears all menus, making sure them and their actions are deleted. More... | |
| void | nonunit_sensitivity () |
| struct tile * | find_last_unit_pos (struct unit *punit, int pos) |
| Predicts last unit position. More... | |
Private Attributes | |
| QMenu * | airlift_menu = nullptr |
| QMenu * | bases_menu = nullptr |
| QMenu * | menu = nullptr |
| QMenu * | multiplayer_menu = nullptr |
| QMenu * | roads_menu = nullptr |
| QMenu * | citybar_submenu = nullptr |
| QActionGroup * | airlift_type = nullptr |
| QActionGroup * | action_vs_city = nullptr |
| QActionGroup * | action_vs_unit = nullptr |
| QActionGroup * | action_citybar = nullptr |
| QMenu * | action_unit_menu = nullptr |
| QMenu * | action_city_menu = nullptr |
| QMultiHash< munit, QAction * > | menu_list |
| std::vector< qfc_delayed_unit_item > | units_list |
| bool | initialized = false |
| mr_menu::mr_menu | ( | ) |
|
privateslot |
Slot for loading modpack installer.
Definition at line 2684 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
private |
Clears all menus, making sure them and their actions are deleted.
Definition at line 1270 of file menu.cpp.
Referenced by setup_menus().
|
overrideprotected |
Predicts last unit position.
Definition at line 494 of file menu.cpp.
Referenced by slot_execute_orders().
|
privateslot |
Slot for loading new tileset.
Definition at line 2689 of file menu.cpp.
Referenced by tileset_custom_load().
|
privateslot |
Invoke dialog with interface (local) options.
Definition at line 2768 of file menu.cpp.
Referenced by setup_menus().
| void mr_menu::menus_sensitive | ( | ) |
Enables/disables menu items and renames them depending on key in menu_list.
Disable first all sensitive menus
Definition at line 1519 of file menu.cpp.
Referenced by real_menus_update().
|
privateslot |
Invoke dialog with messages options.
Definition at line 2786 of file menu.cpp.
Referenced by setup_menus().
|
private |
Definition at line 1458 of file menu.cpp.
Referenced by menus_sensitive().
|
privateslot |
Invoke popup for quiting game.
Definition at line 2796 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Invoke dialog with server options.
Definition at line 2778 of file menu.cpp.
Referenced by setup_menus().
| void mr_menu::set_tile_for_order | ( | struct tile * | ptile | ) |
Sets given tile for delayed order.
Definition at line 1288 of file menu.cpp.
Referenced by map_view::shortcut_pressed().
| void mr_menu::setup_menus | ( | ) |
Initializes menu system, and add custom enum(munit) for most of options Notice that if you set option for QAction->setChecked(option) it will check/uncheck automatically without any intervention.
Definition at line 542 of file menu.cpp.
Referenced by real_menus_init().
| bool mr_menu::shortcut_exists | ( | const fc_shortcut & | fcs, |
| QString & | where | ||
| ) |
Returns string assigned to shortcut or empty string if doesnt exist.
Definition at line 1298 of file menu.cpp.
Referenced by fc_shortcuts_dialog::shortcut_exists().
|
privateslot |
Invoke dialog with shortcut options.
Definition at line 2773 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Slot for loading modpack installer.
Definition at line 2675 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "SHOW ACHIEVEMENTS REPORT".
Definition at line 2601 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
Slot for choosing default action vs city.
Definition at line 2251 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Slot for choosing default action vs unit.
Definition at line 2240 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "GOTO/AIRLIFT TO CITY".
Definition at line 2340 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
|
privateslot |
Action "Show/Dont battle log".
Definition at line 2444 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
Actions "BUILD_BASE_*".
Definition at line 2740 of file menu.cpp.
Referenced by update_bases_menu().
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Actions "BUILD_PATH_*".
Definition at line 2722 of file menu.cpp.
Referenced by update_roads_menu().
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Action "SHOW CITY PRODUCTION".
Definition at line 2518 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "SHOW CITY TRADEROUTES".
Definition at line 2523 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
Action "CLEAN POLLUTION and PARADROP".
Definition at line 1959 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Slot for clearing trade routes.
Definition at line 2182 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "CONNECT WITH IRRIGATION".
Definition at line 1981 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "CONNECT WITH RAILROAD".
Definition at line 1997 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Action "SHOW DEMOGRAPGHICS REPORT".
Definition at line 2593 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
|
privateslot |
Action "SHOW ENDGAME REPORT".
Definition at line 2609 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Action "LOAD INTO TRANSPORTER".
Definition at line 2325 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Slot for setting quick airlift.
Definition at line 2227 of file menu.cpp.
Referenced by update_airlift_menu().
|
privateslot |
|
privateslot |
|
privateslot |
Action "SELECT ALL UNITS ON TILE".
Definition at line 2538 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "SELECT ONE UNITS/DESELECT OTHERS".
Definition at line 2546 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "SELLECT SAME UNITS ON CONTINENT".
Definition at line 2554 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "SELECT SAME TYPE EVERYWHERE".
Definition at line 2562 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "SELECT SAME TYPE ON TILE".
Definition at line 2570 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Action "Show/Dont show new turn info".
Definition at line 2436 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Slot for showing research tab.
Definition at line 1915 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
Action "SHOW TOP FIVE CITIES".
Definition at line 2614 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Adds all cities to trade planning.
Definition at line 2172 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Adds one city to trade planning.
Definition at line 2167 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
Action "SHOW WONDERS REPORT".
Definition at line 2619 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Action "UNLOAD FROM TRANSPORTED".
Definition at line 2350 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "UNLOAD ALL UNITS FROM TRANSPORTER".
Definition at line 2360 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
Action "UNSENTRY(WAKEUP) ALL UNITS".
Definition at line 2365 of file menu.cpp.
Referenced by setup_menus().
|
privateslot |
|
privateslot |
|
privateslot |
| void mr_menu::update_airlift_menu | ( | ) |
| void mr_menu::update_bases_menu | ( | ) |
Updates "build bases" menu.
Definition at line 1410 of file menu.cpp.
Referenced by real_menus_update().
| void mr_menu::update_roads_menu | ( | ) |
Updates "build path" menu.
Definition at line 1361 of file menu.cpp.
Referenced by real_menus_update().
|
privateslot |
Action "SCALE FONTS WHEN SCALING MAP".
Definition at line 2472 of file menu.cpp.
Referenced by setup_menus().
|
private |
Definition at line 170 of file menu.h.
Referenced by setup_menus().
|
private |
Definition at line 168 of file menu.h.
Referenced by setup_menus(), and slot_set_citybar().
|
private |
Definition at line 169 of file menu.h.
Referenced by setup_menus().
|
private |
Definition at line 166 of file menu.h.
Referenced by setup_menus().
|
private |
Definition at line 167 of file menu.h.
Referenced by setup_menus().
|
private |
Definition at line 159 of file menu.h.
Referenced by setup_menus(), and update_airlift_menu().
|
private |
Definition at line 165 of file menu.h.
Referenced by setup_menus(), and update_airlift_menu().
| Unit_type_id mr_menu::airlift_type_id = 0 |
Definition at line 194 of file menu.h.
Referenced by setup_menus(), slot_quickairlift_set(), and update_airlift_menu().
|
private |
Definition at line 160 of file menu.h.
Referenced by setup_menus(), and update_bases_menu().
| QAction* mr_menu::btlog_status = nullptr |
Definition at line 189 of file menu.h.
Referenced by setup_menus(), and slot_battlelog().
|
private |
Definition at line 164 of file menu.h.
Referenced by setup_menus().
| bool mr_menu::delayed_order = false |
Definition at line 192 of file menu.h.
Referenced by setup_menus(), map_view::shortcut_pressed(), slot_delayed_goto(), and slot_orders_clear().
|
private |
Definition at line 173 of file menu.h.
Referenced by menus_sensitive(), setup_menus(), update_airlift_menu(), update_bases_menu(), and update_roads_menu().
| QAction* mr_menu::lock_status = nullptr |
Definition at line 187 of file menu.h.
Referenced by setup_menus().
|
private |
Definition at line 161 of file menu.h.
Referenced by clear_menus(), and setup_menus().
|
private |
Definition at line 171 of file menu.h.
Referenced by clear_menus(), menus_sensitive(), nonunit_sensitivity(), and setup_menus().
| QAction* mr_menu::minimap_status = nullptr |
Definition at line 185 of file menu.h.
Referenced by city_dialog::hideEvent(), setup_menus(), city_dialog::showEvent(), and minimap_view::update_menu().
|
private |
Definition at line 162 of file menu.h.
Referenced by menus_sensitive(), and setup_menus().
| QAction* mr_menu::osd_status = nullptr |
Definition at line 188 of file menu.h.
Referenced by setup_menus(), and slot_show_new_turn_text().
| bool mr_menu::quick_airlifting = false |
Definition at line 193 of file menu.h.
Referenced by setup_menus(), map_view::shortcut_pressed(), and slot_quickairlift().
|
private |
Definition at line 163 of file menu.h.
Referenced by setup_menus(), and update_roads_menu().
| QAction* mr_menu::scale_fonts_status = nullptr |
Definition at line 186 of file menu.h.
Referenced by setup_menus(), and zoom_scale_fonts().
| QAction* mr_menu::tileset_options = nullptr |
Definition at line 184 of file menu.h.
Referenced by event(), and setup_menus().
|
private |
Definition at line 172 of file menu.h.
Referenced by find_last_unit_pos(), set_tile_for_order(), slot_delayed_goto(), slot_execute_orders(), and slot_orders_clear().