![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "gui_main.h"#include <QApplication>#include "log.h"#include "client_main.h"#include "clinet.h"#include "fc_client.h"#include "fonts.h"#include "helpdlg.h"#include "hudwidget.h"#include "mapview_g.h"#include "messagewin.h"#include "options.h"#include "page_game.h"#include "page_pregame.h"#include "qtg_cxxside.h"#include "themes_common.h"#include "tileset/sprite.h"#include "tileset/tilespec.h"#include "unitselect.h"#include "views/view_map.h"#include "views/view_map_common.h"#include "widgets/report_widget.h"
Include dependency graph for gui_main.cpp:Go to the source code of this file.
Macros | |
| #define | option_var_set_callback(var, callback) |
Functions | |
| void | real_science_report_dialog_update (void *) |
| Update the science report. More... | |
| void | city_font_update () |
| Updates city font. More... | |
| static void | apply_help_font (struct option *poption) |
| Applies help font. More... | |
| static void | apply_notify_font (struct option *poption) |
| Applies help font. More... | |
| static void | apply_titlebar (struct option *poption) |
| Shows/Hides titlebar. More... | |
| class fc_client * | king () |
| Return fc_client instance. More... | |
| int | main (int argc, char **argv) |
| Entry point for whole freeciv client program. More... | |
| void | ui_main () |
| The main loop for the UI. More... | |
| void | options_extra_init () |
| Extra initializers for client options. More... | |
| void | ui_exit () |
| Do any necessary UI-specific cleanup. More... | |
| void | real_conn_list_dialog_update (void *unused) |
| Update the connected users list at pregame state. More... | |
| void | sound_bell () |
| Make a bell noise (beep). More... | |
| void | add_net_input (QIODevice *sock) |
| Wait for data on the given socket. More... | |
| void | real_focus_units_changed () |
| Called when the set of units in focus (get_units_in_focus()) changes. More... | |
| void | gui_qt_apply_font (struct option *poption) |
| Change the given font. More... | |
| void | editgui_tileset_changed () |
| Stub for editor function. More... | |
| void | editgui_refresh () |
| Stub for editor function. More... | |
| void | editgui_popup_properties (const struct tile_list *tiles, int objtype) |
| Stub for editor function. More... | |
| void | editgui_popdown_all () |
| Stub for editor function. More... | |
| void | editgui_notify_object_changed (int objtype, int object_id, bool removal) |
| Stub for editor function. More... | |
| void | editgui_notify_object_created (int tag, int id) |
| Stub for editor function. More... | |
| void | gui_update_font (const QString &font_name, const QFont &font) |
| Updates a gui font style. More... | |
| void | gui_update_allfonts () |
| void | popup_quit_dialog () |
| Open dialog to confirm that user wants to quit client. More... | |
Variables | |
| const bool | gui_use_transliteration = false |
| const char *const | gui_character_encoding = "UTF-8" |
| const char * | client_string = "gui-qt" |
| static fc_client * | freeciv_qt |
| #define option_var_set_callback | ( | var, | |
| callback | |||
| ) |
| void add_net_input | ( | QIODevice * | sock | ) |
Wait for data on the given socket.
Call input_from_server() when data is ready to be read.
This function is called after the client succesfully has connected to the server.
Definition at line 147 of file gui_main.cpp.
Referenced by make_connection().
|
static |
Applies help font.
Definition at line 212 of file gui_main.cpp.
Referenced by gui_qt_apply_font(), and options_extra_init().
|
static |
|
static |
Shows/Hides titlebar.
Definition at line 166 of file gui_main.cpp.
Referenced by options_extra_init().
| void city_font_update | ( | ) |
| void editgui_notify_object_changed | ( | int | objtype, |
| int | object_id, | ||
| bool | removal | ||
| ) |
Stub for editor function.
Definition at line 265 of file gui_main.cpp.
Referenced by city_packet_common(), handle_city_remove(), handle_edit_startpos(), handle_edit_startpos_full(), handle_game_info(), handle_player_info(), handle_player_remove(), handle_research_info(), handle_scenario_description(), handle_scenario_info(), handle_tile_info(), handle_unit_packet_common(), and handle_unit_remove().
| void editgui_notify_object_created | ( | int | tag, |
| int | id | ||
| ) |
Stub for editor function.
Definition at line 272 of file gui_main.cpp.
Referenced by handle_edit_object_created(), and handle_edit_startpos().
| void editgui_popdown_all | ( | ) |
Stub for editor function.
Definition at line 260 of file gui_main.cpp.
Referenced by client_game_free(), and client_game_reset().
| void editgui_popup_properties | ( | const struct tile_list * | tiles, |
| int | objtype | ||
| ) |
Stub for editor function.
Definition at line 255 of file gui_main.cpp.
Referenced by popup_properties().
| void editgui_refresh | ( | ) |
Stub for editor function.
Definition at line 250 of file gui_main.cpp.
Referenced by editor_apply_tool(), editor_apply_tool_to_selection(), editor_grab_applied_player(), editor_grab_tool(), handle_player_info(), handle_player_remove(), and handle_research_info().
| void editgui_tileset_changed | ( | ) |
Stub for editor function.
Definition at line 245 of file gui_main.cpp.
Referenced by client_state().
| void gui_qt_apply_font | ( | struct option * | poption | ) |
Change the given font.
Definition at line 195 of file gui_main.cpp.
Referenced by options_extra_init(), and fcFont::setSizeAll().
| void gui_update_allfonts | ( | ) |
Definition at line 284 of file gui_main.cpp.
Referenced by allfont_changed_callback().
| void gui_update_font | ( | const QString & | font_name, |
| const QFont & | font | ||
| ) |
Updates a gui font style.
Definition at line 277 of file gui_main.cpp.
Referenced by apply_notify_font(), and font_changed_callback().
| class fc_client* king | ( | ) |
Return fc_client instance.
Definition at line 58 of file gui_main.cpp.
Referenced by action_selection_actor_unit(), action_selection_close(), action_selection_refresh(), action_selection_target_city(), action_selection_target_extra(), action_selection_target_tile(), action_selection_target_unit(), mr_menu::add_modpacks(), add_net_input(), apply_help_font(), apply_notify_font(), fc_shortcuts_dialog::apply_option(), apply_titlebar(), mr_menu::back_to_menu(), choice_dialog::choice_dialog(), city_dialog::city_rename(), city_report::city_report(), mr_menu::clear_menus(), close_all_diplomacy_dialogs(), help_dialog::closeEvent(), fc_game_tab_widget::current_changed(), fc_client::current_page(), eco_report::disband_units(), units_view::disband_units(), city_widget::display_list_menu(), draw_calculated_trade_routes(), enable_interface(), fc_game_tab_widget::event(), get_current_client_page(), gui_load_theme(), gui_qt_apply_font(), handle_authentication_req(), handle_diplomacy_init_meeting(), city_dialog::hideEvent(), help_dialog::hideEvent(), move_widget::mouseMoveEvent(), resizable_widget::mouseMoveEvent(), move_widget::mousePressEvent(), resizable_widget::mousePressEvent(), close_widget::mousePressEvent(), resizable_widget::mouseReleaseEvent(), hud_units::moveEvent(), hud_battle_log::moveEvent(), option_dialog_popup(), plr_report::plr_report(), popdown_all_game_dialogs(), popup_action_selection(), popup_bribe_dialog(), popup_combat_info(), popup_connect_msg(), popup_disband_dialog(), popup_incite_dialog(), popup_multiplier_dialog(), popup_musicset_suggestion_dialog(), popup_newcity_dialog(), popup_notify_goto_dialog(), popup_quit_dialog(), popup_races_dialog(), popup_revolution_dialog(), popup_shortcuts_dialog(), popup_soundset_suggestion_dialog(), popup_tileset_suggestion_dialog(), popup_upgrade_dialog(), qload_lua_script(), queen(), real_conn_list_dialog_update(), real_menus_init(), real_menus_update(), real_output_window_append(), real_set_client_page(), pageGame::removeRepoDlg(), minimap_view::resizeEvent(), city_dialog::save_cma(), mr_menu::save_game_as(), mr_menu::save_image(), city_dialog::save_worklist(), eco_report::sell_buildings(), eco_report::sell_redundant(), server_scan_error(), chat_widget::set_chat_visible(), fc_shortcuts::set_shortcut(), mr_menu::setup_menus(), fc_shortcuts_dialog::shortcut_exists(), map_view::shortcut_pressed(), map_view::shortcut_released(), show_new_turn_info(), city_dialog::showEvent(), help_dialog::showEvent(), mr_menu::slot_autocaravan(), mr_menu::slot_battlelog(), mr_menu::slot_calculate(), mr_menu::slot_clear_trade(), mr_menu::slot_fullscreen(), mr_menu::slot_lock(), mr_menu::slot_rally(), mr_menu::slot_rename(), mr_menu::slot_show_new_turn_text(), mr_menu::slot_trade_add_all(), mr_menu::slot_trade_city(), mr_menu::slot_unit_filter(), sound_bell(), spy_steal_shared(), page_load::start_from_save(), tileset_changed(), map_view::timer_event(), top_bar_right_click_diplomacy(), top_bar_right_click_science(), hud_units::update_actions(), map_view::update_cursor(), minimap_view::update_menu(), hud_battle_log::update_size(), update_start_page(), pageGame::updateInfoLabel(), pageGame::updateSidebarTooltips(), units_view::upgrade_units(), version_message(), voteinfo_gui_update(), choice_dialog::~choice_dialog(), city_widget::~city_widget(), and plr_widget::~plr_widget().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Entry point for whole freeciv client program.
Definition at line 63 of file gui_main.cpp.
| void options_extra_init | ( | ) |
Extra initializers for client options.
Definition at line 92 of file gui_main.cpp.
Referenced by options_init().
| void popup_quit_dialog | ( | ) |
Open dialog to confirm that user wants to quit client.
Definition at line 293 of file gui_main.cpp.
Referenced by fc_client::closeEvent(), and mr_menu::quit_game().
| void real_conn_list_dialog_update | ( | void * | unused | ) |
Update the connected users list at pregame state.
Definition at line 121 of file gui_main.cpp.
Referenced by conn_list_dialog_update().
| void real_focus_units_changed | ( | ) |
Called when the set of units in focus (get_units_in_focus()) changes.
Standard updates like update_unit_info_label() are handled in the platform- independent code, so some clients will not need to do anything here.
Definition at line 155 of file gui_main.cpp.
Referenced by focus_units_changed().
| void real_science_report_dialog_update | ( | void * | unused | ) |
Update the science report.
Definition at line 660 of file view_research.cpp.
Referenced by gui_qt_apply_font().
| void sound_bell | ( | ) |
Make a bell noise (beep).
This provides low-level sound alerts even if there is no real sound support.
Definition at line 134 of file gui_main.cpp.
Referenced by none_audio_play().
| void ui_exit | ( | ) |
Do any necessary UI-specific cleanup.
Definition at line 116 of file gui_main.cpp.
Referenced by client_exit().
| void ui_main | ( | ) |
The main loop for the UI.
This is called from main(), and when it exits the client will exit.
Definition at line 69 of file gui_main.cpp.
Referenced by client_main().
| const char* client_string = "gui-qt" |
Definition at line 48 of file gui_main.cpp.
Referenced by client_main().
|
static |
Definition at line 49 of file gui_main.cpp.
| const char* const gui_character_encoding = "UTF-8" |
Definition at line 47 of file gui_main.cpp.
Referenced by client_main().
| const bool gui_use_transliteration = false |
Definition at line 46 of file gui_main.cpp.
Referenced by client_main().