Freeciv-3.3
|
#include <stdio.h>
#include <QApplication>
#include <QLibraryInfo>
#include <QMessageBox>
#include <QScrollBar>
#include <QStyleFactory>
#include "fc_cmdline.h"
#include "fciconv.h"
#include "log.h"
#include "client_main.h"
#include "editgui_g.h"
#include "gui_properties.h"
#include "options.h"
#include "sprite.h"
#include "svgflag.h"
#include "themes_common.h"
#include "tilespec.h"
#include "fc_client.h"
#include "fonts.h"
#include "gui_main.h"
#include "helpdlg.h"
#include "hudwidget.h"
#include "qtg_cxxside.h"
Go to the source code of this file.
Macros | |
#define | option_var_set_callback(var, callback) |
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 |
static QApplication * | qapp = nullptr |
Change the given font.
Definition at line 419 of file gui_main.cpp.
Referenced by qtg_options_extra_init().
Applies fullscreen changes
Definition at line 484 of file gui_main.cpp.
Referenced by qtg_options_extra_init().
Applies help font
Definition at line 448 of file gui_main.cpp.
Referenced by apply_font(), and qtg_options_extra_init().
Applies help font
Definition at line 469 of file gui_main.cpp.
Referenced by qtg_options_extra_init().
Change sidebar position
Definition at line 411 of file gui_main.cpp.
Referenced by qtg_options_extra_init().
Shows/Hides titlebar
Definition at line 382 of file gui_main.cpp.
Referenced by qtg_options_extra_init().
|
extern |
QApplication * current_app | ( | ) |
Return the running QApplication.
Definition at line 227 of file gui_main.cpp.
Referenced by close_all_diplomacy_dialogs(), message_dlg::message_dlg(), city_production_delegate::paint(), qtg_gui_load_theme(), qtg_real_output_window_append(), qtg_version_message(), and fc_client::quit().
Return fc_client instance
Definition at line 82 of file gui_main.cpp.
Referenced by apply_font(), fc_client::apply_fullscreen(), apply_fullscreen(), apply_help_font(), apply_notify_font(), apply_sidebar(), apply_titlebar(), fc_client::browse_saves(), fc_client::browse_scenarios(), fc_game_tab_widget::current_changed(), popup_quit_dialog(), qtg_add_idle_callback(), qtg_add_net_input(), qtg_real_conn_list_dialog_update(), qtg_real_focus_units_changed(), qtg_remove_net_input(), qtg_sound_bell(), fc_game_tab_widget::resizeEvent(), fc_client::switch_page(), fc_client::toggle_unit_sel_widget(), fc_client::update_buttons(), fc_client::update_sidebar_position(), and fc_client::update_start_page().
Entry point for whole freeciv client program.
Definition at line 96 of file gui_main.cpp.
Migrate Qt client specific options from freeciv-2.5 options
Definition at line 155 of file gui_main.cpp.
Referenced by qtg_ui_main().
Search for gui-specific command line options, that are not handled by Qt (QApplication). Returns true iff program is to be executed, and not to exit after showing the results from option parsing.
Definition at line 132 of file gui_main.cpp.
Referenced by qtg_ui_main().
Open dialog to confirm that user wants to quit client.
Definition at line 563 of file gui_main.cpp.
Print extra usage information, including one line help on each option, to stderr.
Definition at line 107 of file gui_main.cpp.
Referenced by parse_options().
Enqueue a callback to be called during an idle moment. The 'callback' function should be called sometimes soon, and passed the 'data' pointer as its data.
Definition at line 370 of file gui_main.cpp.
Referenced by setup_gui_funcs().
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 has successfully connected to the server.
Definition at line 306 of file gui_main.cpp.
Referenced by setup_gui_funcs().
Stub for editor function
Definition at line 516 of file gui_main.cpp.
Referenced by setup_gui_funcs().
Stub for editor function
Definition at line 523 of file gui_main.cpp.
Referenced by setup_gui_funcs().
void qtg_editgui_popdown_all | ( | ) |
Stub for editor function
Definition at line 510 of file gui_main.cpp.
Referenced by setup_gui_funcs().
Stub for editor function
Definition at line 504 of file gui_main.cpp.
Referenced by setup_gui_funcs().
void qtg_editgui_refresh | ( | ) |
Stub for editor function
Definition at line 498 of file gui_main.cpp.
Referenced by setup_gui_funcs().
void qtg_editgui_tileset_changed | ( | ) |
Stub for editor function
Definition at line 492 of file gui_main.cpp.
Referenced by setup_gui_funcs().
enum gui_type qtg_get_gui_type | ( | ) |
Returns gui type of the client
Definition at line 547 of file gui_main.cpp.
Referenced by setup_gui_funcs().
Updates a gui font style.
Definition at line 529 of file gui_main.cpp.
Referenced by apply_notify_font(), and setup_gui_funcs().
Insert build information to help
Definition at line 585 of file gui_main.cpp.
Referenced by setup_gui_funcs().
void qtg_options_extra_init | ( | ) |
Extra initializers for client options.
Definition at line 235 of file gui_main.cpp.
Referenced by setup_gui_funcs().
Update the connected users list at pregame state.
Definition at line 281 of file gui_main.cpp.
Referenced by setup_gui_funcs().
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 354 of file gui_main.cpp.
Referenced by setup_gui_funcs().
void qtg_remove_net_input | ( | ) |
Stop waiting for any server network data. See add_net_input().
This function is called if the client disconnects from the server.
Definition at line 316 of file gui_main.cpp.
Referenced by setup_gui_funcs().
Set one of the unit icons (specified by idx) in the information area based on punit.
punit is the unit the information should be taken from. Use nullptr to clear the icon.
idx specified which icon should be modified. Use idx == -1 to indicate the icon for the active unit. Or idx in [0..num_units_below-1] for secondary (inactive) units on the same tile.
Definition at line 332 of file gui_main.cpp.
Referenced by setup_gui_funcs().
Most clients use an arrow (e.g., sprites.right_arrow) to indicate when the units_below will not fit. This function is called to activate or deactivate the arrow.
Is disabled by default.
Definition at line 344 of file gui_main.cpp.
Referenced by setup_gui_funcs().
void qtg_setup_gui_properties | ( | ) |
Define properties of this gui.
Definition at line 606 of file gui_main.cpp.
Referenced by setup_gui_funcs().
void qtg_sound_bell | ( | ) |
Make a bell noise (beep). This provides low-level sound alerts even if there is no real sound support.
Definition at line 293 of file gui_main.cpp.
Referenced by setup_gui_funcs().
void qtg_ui_exit | ( | ) |
Do any necessary UI-specific cleanup
Definition at line 271 of file gui_main.cpp.
Referenced by setup_gui_funcs().
void qtg_ui_init | ( | ) |
Do any necessary pre-initialization of the UI, if necessary.
Definition at line 90 of file gui_main.cpp.
Referenced by setup_gui_funcs().
The main loop for the UI. This is called from main(), and when it exits the client will exit.
Definition at line 168 of file gui_main.cpp.
Referenced by setup_gui_funcs().
Called when the tileset is changed to reset the unit pixmap table.
Definition at line 555 of file gui_main.cpp.
|
extern |
Restarts all notify dialogs
Definition at line 4121 of file dialogs.cpp.
Referenced by apply_notify_font().
Definition at line 67 of file gui_main.cpp.
|
static |
Definition at line 68 of file gui_main.cpp.
Referenced by gui(), qtg_ui_exit(), and qtg_ui_main().
Definition at line 66 of file gui_main.cpp.
Definition at line 65 of file gui_main.cpp.
|
static |
Definition at line 69 of file gui_main.cpp.
Referenced by current_app(), fc_client::fc_main(), main(), popup_quit_dialog(), qtg_real_output_window_append(), qtg_ui_exit(), qtg_ui_main(), and fc_client::quit().