Freeciv-3.2
|
#include <fc_client.h>
Public Slots | |
void | switch_page (int i) |
void | popup_client_options () |
void | update_info_label () |
void | quit () |
Signals | |
void | keyCaught (QKeyEvent *e) |
Protected Slots | |
void | slot_selection_changed (const QItemSelection &, const QItemSelection &) |
Protected Member Functions | |
void | timerEvent (QTimerEvent *) |
void | closeEvent (QCloseEvent *event) |
Private Slots | |
void | send_fake_chat_message (const QString &message) |
void | server_input (int sock) |
void | closing () |
void | slot_lan_scan () |
void | slot_meta_scan () |
void | slot_connect () |
void | slot_disconnect () |
void | slot_pregame_observe () |
void | slot_pregame_start () |
void | update_network_lists () |
void | start_page_menu (QPoint) |
void | slot_pick_nation () |
void | start_new_game () |
void | start_scenario () |
void | start_from_save () |
void | browse_saves () |
void | browse_scenarios () |
void | clear_status_bar () |
void | state_preview (int) |
Additional Inherited Members | |
Private Types inherited from listener< chat_listener > | |
typedef chat_listener | type_t |
Static Private Member Functions inherited from chat_listener | |
static void | update_word_list () |
Static Private Member Functions inherited from listener< chat_listener > | |
static void | invoke (_member_fct_ function) |
static void | invoke (_member_fct_ function, _arg1_t_ arg) |
static void | invoke (_member_fct_ function, _arg1_t_ arg1, _arg2_t_ arg2) |
Static Private Attributes inherited from chat_listener | |
static const int | HISTORY_END = -1 |
Definition at line 168 of file fc_client.h.
fc_client::fc_client | ( | ) |
Constructor
Somehow freeciv-client-common asks to switch to page when all widgets haven't been created yet by Qt, even constructor finished job, so we null all Qt objects, so while switching we will know if they were created. After adding new QObjects null them here.
Definition at line 70 of file fc_client.cpp.
Referenced by qtg_ui_main().
fc_client::~fc_client | ( | ) |
Destructor
Definition at line 244 of file fc_client.cpp.
int fc_client::add_game_tab | ( | QWidget * | widget | ) |
Inserts tab widget to game view page
Definition at line 811 of file pages.cpp.
Referenced by create_game_page().
Add notifier for server input
Definition at line 449 of file fc_client.cpp.
Referenced by qtg_add_net_input().
void fc_client::apply_fullscreen | ( | ) |
Apply current fullscreen option
Definition at line 426 of file fc_client.cpp.
Referenced by apply_fullscreen(), and switch_page().
Browse scenarios directory
Definition at line 865 of file pages.cpp.
Referenced by create_scenario_page().
|
private |
Return whether chatline should be active on page.
Definition at line 323 of file fc_client.cpp.
|
privatevirtual |
Appends text to chat window
Reimplemented from chat_listener.
Definition at line 306 of file fc_client.cpp.
|
private |
This function updates the list of servers every so often.
Definition at line 1045 of file pages.cpp.
Referenced by slot_lan_scan(), and slot_meta_scan().
|
privateslot |
Clears status bar or shows next message in queue if exists
Definition at line 467 of file pages.cpp.
Referenced by clear_status_bar(), and set_status_bar().
|
protected |
Closes main window
Definition at line 483 of file fc_client.cpp.
|
privateslot |
Called when fc_client is going to quit
Definition at line 290 of file fc_client.cpp.
Referenced by fc_main().
|
private |
|
private |
|
private |
|
private |
|
private |
enum client_pages fc_client::current_page | ( | ) |
Returns currently open page
Definition at line 441 of file fc_client.cpp.
Referenced by slot_selection_changed(), update_info_label(), and update_sidebar_tooltips().
Definition at line 581 of file fc_client.cpp.
Referenced by ~fc_client().
Free the server scans.
Definition at line 996 of file pages.cpp.
Referenced by handle_authentication_req(), switch_page(), and update_network_lists().
bool fc_client::event | ( | QEvent * | event | ) |
Event handler
Definition at line 468 of file fc_client.cpp.
void fc_client::fc_main | ( | QApplication * | qapp | ) |
Main part of gui-qt. This is not called simply 'fc_client::main()', since SDL includes would sometimes cause 'main' to be considered an macro that expands to 'SDL_main'
Definition at line 260 of file fc_client.cpp.
Referenced by qtg_ui_main().
choice_dialog * fc_client::get_diplo_dialog | ( | ) |
Get current diplo dialog
Definition at line 4847 of file dialogs.cpp.
Returns index on game tab page of given report dialog
Definition at line 632 of file fc_client.cpp.
Finds not used index on game_view_tab and returns it
Definition at line 597 of file fc_client.cpp.
void fc_client::handle_authentication_req | ( | enum authentication_type | type, |
const char * | message | ||
) |
|
private |
Initializes layouts for all pages
Definition at line 153 of file fc_client.cpp.
Referenced by fc_client().
bool fc_client::is_closing | ( | ) |
Returns status if fc_client is being closed
Definition at line 282 of file fc_client.cpp.
Referenced by remove_repo_dlg().
Checks if given report is opened, if you create new report as tab on game page, figure out some original string and put in in repodlg.h as comment to that QWidget class.
Definition at line 616 of file fc_client.cpp.
void fc_client::popdown_tile_info | ( | ) |
Popdowns information label tile
Definition at line 577 of file mapctrl.cpp.
Referenced by popup_tile_info().
void fc_client::popdown_unit_sel | ( | ) |
Closes unit selection widget.
Definition at line 859 of file fc_client.cpp.
|
slot |
Popups client options
Definition at line 882 of file fc_client.cpp.
Referenced by create_main_page().
Popups information label tile
Definition at line 552 of file mapctrl.cpp.
|
slot |
|
private |
void fc_client::reload_sidebar_icons | ( | ) |
Removes report dialog string from the list marking it as closed
Definition at line 871 of file fc_client.cpp.
void fc_client::remove_server_source | ( | ) |
Removes notifier
Definition at line 494 of file fc_client.cpp.
Referenced by qtg_remove_net_input().
Slot to send fake chat messages. Do not use in new code.
Definition at line 298 of file fc_client.cpp.
Referenced by start_page_menu().
There is input from server
Definition at line 502 of file fc_client.cpp.
Referenced by add_server_source().
|
private |
Update network page connection state.
Definition at line 266 of file pages.cpp.
Referenced by handle_authentication_req(), slot_connect(), and switch_page().
void fc_client::set_diplo_dialog | ( | choice_dialog * | widget | ) |
Set current diplo dialog
Definition at line 4839 of file dialogs.cpp.
Sets application status bar for given time in milliseconds
Definition at line 451 of file pages.cpp.
Referenced by event(), handle_authentication_req(), init(), set_connection_state(), and slot_connect().
|
privateslot |
If on the network page, switch page to the login page (with new server and port). if on the login page, send connect and/or authentication requests to the server.
Definition at line 1620 of file pages.cpp.
Referenced by create_network_page().
|
privateslot |
Disconnect from server and return to MAIN PAGE
Definition at line 537 of file fc_client.cpp.
Referenced by create_load_page(), create_scenario_page(), and create_start_page().
|
privateslot |
Executes lan scan network
Definition at line 1079 of file pages.cpp.
Referenced by update_network_lists().
|
privateslot |
Executes metaserver scan network
Definition at line 1090 of file pages.cpp.
Referenced by update_network_lists().
|
privateslot |
Calls dialog selecting nations
Definition at line 2111 of file pages.cpp.
Referenced by create_start_page().
|
privateslot |
User clicked Observe button in START_PAGE
Definition at line 549 of file fc_client.cpp.
Referenced by create_start_page().
|
privateslot |
User clicked Start in START_PAGE
Definition at line 567 of file fc_client.cpp.
Referenced by create_start_page().
|
protectedslot |
Selection changed in some tableview on some page
Definition at line 1150 of file pages.cpp.
Referenced by create_load_page(), create_network_page(), and create_scenario_page().
|
privateslot |
Starts game from chosen save - chosen_file (save or scenario)
Definition at line 1132 of file pages.cpp.
Referenced by browse_saves(), and create_load_page().
|
privateslot |
spawn a server, if there isn't one, using the default settings.
Definition at line 1101 of file pages.cpp.
Referenced by create_main_page().
Context menu on some player, arg Qpoint specifies some pixel on screen
qvar = 0 -> selected label -> do nothing qvar = 1 -> selected player (stored in qvar2)
Definition at line 1973 of file pages.cpp.
Referenced by create_start_page().
|
privateslot |
Starts game from chosen scenario - chosen_file (save or scenario)
Definition at line 1114 of file pages.cpp.
Referenced by browse_scenarios(), and create_scenario_page().
State of preview has been changed
Definition at line 847 of file pages.cpp.
Referenced by create_load_page().
Switch from one client page to another. Argument is int cause QSignalMapper doesn't want to work with enum Because chat widget is in 2 layouts we need to switch between them here (addWidget removes it from previous layout automatically)
Definition at line 338 of file fc_client.cpp.
Referenced by create_main_page(), create_network_page(), slot_disconnect(), start_from_save(), and start_scenario().
|
protected |
Timer event handling
Definition at line 512 of file fc_client.cpp.
Shows/closes unit selection widget
Definition at line 831 of file fc_client.cpp.
|
private |
Updates observe button in case user started observing manually
Definition at line 1906 of file pages.cpp.
Referenced by update_start_page().
void fc_client::update_fonts | ( | ) |
Real update, updates only once per 300 ms.
Definition at line 999 of file mapview.cpp.
Referenced by switch_page(), and update_info_label().
Updates saves to load and updates in tableview = saves_load
Definition at line 1414 of file pages.cpp.
Referenced by switch_page().
Stop and restart the metaserver and lan server scans.
Definition at line 1026 of file pages.cpp.
Referenced by create_network_page(), and switch_page().
Gets scenarios list and updates it in TableWidget = scenarios_load
Definition at line 1445 of file pages.cpp.
Referenced by switch_page().
|
private |
Updates list of servers in network page in proper QTableViews
Definition at line 882 of file pages.cpp.
Referenced by check_server_scan().
void fc_client::update_sidebar_position | ( | ) |
void fc_client::update_sidebar_tooltips | ( | ) |
Updates sidebar tooltips
Definition at line 2134 of file pages.cpp.
Referenced by fc_game_tab_widget::resizeEvent(), switch_page(), and update_info_label().
void fc_client::update_start_page | ( | ) |
Updates start page (start page = client connected to server, but game not started)
Definition at line 1677 of file pages.cpp.
Referenced by qtg_real_conn_list_dialog_update().
void fc_client::update_unit_sel | ( | ) |
Update unit selection widget if open
Definition at line 847 of file fc_client.cpp.
void fc_client::write_settings | ( | ) |
Save qt-specific options
Definition at line 794 of file fc_client.cpp.
Referenced by popup_quit_dialog().
hud_battle_log* fc_client::battlelog_wdg |
Definition at line 272 of file fc_client.h.
Referenced by create_game_page(), fc_client(), and fc_game_tab_widget::resizeEvent().
|
private |
Definition at line 194 of file fc_client.h.
Referenced by create_main_page(), and fc_client().
|
private |
Definition at line 199 of file fc_client.h.
Referenced by fc_client().
|
private |
Definition at line 179 of file fc_client.h.
Referenced by fc_client(), init(), and switch_page().
QWidget* fc_client::central_wdg |
Definition at line 256 of file fc_client.h.
Referenced by browse_saves(), browse_scenarios(), fc_client(), init(), and switch_page().
|
private |
Definition at line 203 of file fc_client.h.
Referenced by create_start_page(), and fc_client().
|
private |
Definition at line 192 of file fc_client.h.
Referenced by create_network_page(), fc_client(), set_connection_state(), slot_connect(), and switch_page().
|
private |
Definition at line 188 of file fc_client.h.
Referenced by create_network_page(), fc_client(), slot_connect(), slot_selection_changed(), switch_page(), and update_server_list().
|
private |
Definition at line 174 of file fc_client.h.
Referenced by create_network_page(), and fc_client().
|
private |
Definition at line 190 of file fc_client.h.
Referenced by create_network_page(), fc_client(), slot_connect(), and switch_page().
|
private |
Definition at line 175 of file fc_client.h.
Referenced by create_network_page(), and fc_client().
|
private |
Definition at line 191 of file fc_client.h.
Referenced by create_network_page(), fc_client(), set_connection_state(), slot_connect(), and switch_page().
|
private |
Definition at line 189 of file fc_client.h.
Referenced by create_network_page(), fc_client(), slot_connect(), slot_selection_changed(), switch_page(), and update_server_list().
fc_corner* fc_client::corner_wid |
Definition at line 258 of file fc_client.h.
Referenced by apply_titlebar(), and init().
|
private |
Definition at line 352 of file fc_client.h.
Referenced by browse_saves(), browse_scenarios(), fc_client(), slot_selection_changed(), start_from_save(), start_scenario(), and switch_page().
QCursor* fc_client::fc_cursors[CURSOR_LAST][NUM_CURSOR_FRAMES] |
Definition at line 266 of file fc_client.h.
Referenced by create_cursors(), and delete_cursors().
|
private |
Definition at line 176 of file fc_client.h.
Referenced by create_game_page().
fc_game_tab_widget* fc_client::game_tab_widget |
Definition at line 259 of file fc_client.h.
Referenced by add_game_tab(), apply_fullscreen(), create_game_page(), fc_client(), gimme_index_of(), init(), reload_sidebar_icons(), and rm_game_tab().
goto_dialog* fc_client::gtd |
Definition at line 265 of file fc_client.h.
Referenced by create_game_page(), fc_client(), and qtg_real_focus_units_changed().
|
private |
Definition at line 218 of file fc_client.h.
Referenced by fc_client(), popdown_tile_info(), and popup_tile_info().
|
private |
Definition at line 207 of file fc_client.h.
Referenced by create_network_page(), fc_client(), and slot_selection_changed().
info_tab* fc_client::infotab |
Definition at line 261 of file fc_client.h.
Referenced by apply_font(), create_game_page(), fc_client(), fc_game_tab_widget::resizeEvent(), and switch_page().
bool fc_client::interface_locked |
Definition at line 273 of file fc_client.h.
Referenced by fc_client().
|
private |
Definition at line 213 of file fc_client.h.
Referenced by destroy_server_scans(), fc_client(), slot_lan_scan(), and update_network_lists().
|
private |
Definition at line 205 of file fc_client.h.
Referenced by create_network_page(), fc_client(), slot_selection_changed(), and update_server_list().
|
private |
Definition at line 185 of file fc_client.h.
Referenced by create_load_page(), and slot_selection_changed().
|
private |
Definition at line 184 of file fc_client.h.
Referenced by create_load_page(), and slot_selection_changed().
|
private |
Definition at line 172 of file fc_client.h.
bool fc_client::map_font_scale |
Definition at line 280 of file fc_client.h.
Referenced by fc_client().
float fc_client::map_scale |
Definition at line 279 of file fc_client.h.
Referenced by fc_client().
map_view* fc_client::mapview_wdg |
Definition at line 230 of file fc_client.h.
Referenced by create_game_page(), fc_game_tab_widget::current_changed(), fc_client(), popup_tile_info(), fc_game_tab_widget::resizeEvent(), switch_page(), and toggle_unit_sel_widget().
mr_menu* fc_client::menu_bar |
Definition at line 257 of file fc_client.h.
Referenced by apply_titlebar(), fc_client(), and init().
|
private |
Definition at line 212 of file fc_client.h.
Referenced by destroy_server_scans(), fc_client(), slot_meta_scan(), and update_network_lists().
minimap_view* fc_client::minimapview_wdg |
Definition at line 232 of file fc_client.h.
Referenced by create_game_page(), fc_game_tab_widget::resizeEvent(), and switch_page().
mr_idle fc_client::mr_idler |
Definition at line 255 of file fc_client.h.
Referenced by qtg_add_idle_callback().
messagewdg* fc_client::msgwdg |
Definition at line 260 of file fc_client.h.
Referenced by fc_client().
|
private |
Definition at line 197 of file fc_client.h.
Referenced by create_start_page(), and update_buttons().
|
private |
Definition at line 195 of file fc_client.h.
Referenced by create_start_page(), slot_pregame_observe(), and update_buttons().
|
private |
Definition at line 219 of file fc_client.h.
Referenced by fc_client(), get_diplo_dialog(), and set_diplo_dialog().
Definition at line 350 of file fc_client.h.
Referenced by gimme_index_of(), gimme_place(), is_repo_dlg_open(), and remove_repo_dlg().
|
private |
Definition at line 181 of file fc_client.h.
Referenced by chat_message_received(), create_start_page(), and fc_client().
|
private |
Definition at line 349 of file fc_client.h.
Referenced by current_page(), init(), and switch_page().
QMenu* fc_client::page_submenu_AI |
Definition at line 281 of file fc_client.h.
Referenced by start_page_menu().
QMenu* fc_client::page_submenu_team |
Definition at line 282 of file fc_client.h.
Referenced by start_page_menu().
Definition at line 173 of file fc_client.h.
Referenced by fc_client(), init(), and switch_page().
|
private |
Definition at line 178 of file fc_client.h.
Referenced by create_game_page(), create_load_page(), create_loading_page(), create_main_page(), create_network_page(), create_scenario_page(), create_start_page(), fc_client(), init(), and update_sidebar_position().
pregame_options* fc_client::pr_options |
Definition at line 267 of file fc_client.h.
Referenced by create_start_page(), update_buttons(), and update_start_page().
pregamevote* fc_client::pre_vote |
Definition at line 262 of file fc_client.h.
Referenced by create_start_page(), fc_client(), and switch_page().
fc_settings fc_client::qt_settings |
Definition at line 268 of file fc_client.h.
Referenced by read_settings(), and write_settings().
|
private |
Definition at line 354 of file fc_client.h.
Referenced by closing(), fc_client(), and is_closing().
qfc_rally_list fc_client::rallies |
Definition at line 270 of file fc_client.h.
|
private |
Definition at line 208 of file fc_client.h.
Referenced by create_load_page(), fc_client(), state_preview(), and update_load_page().
|
private |
Definition at line 209 of file fc_client.h.
Referenced by create_scenario_page(), fc_client(), and update_scenarios_page().
|
private |
Definition at line 183 of file fc_client.h.
Referenced by create_scenario_page(), slot_selection_changed(), and update_scenarios_page().
|
private |
Definition at line 182 of file fc_client.h.
Referenced by create_scenario_page(), fc_client(), slot_selection_changed(), and update_scenarios_page().
|
private |
Definition at line 353 of file fc_client.h.
|
private |
Definition at line 201 of file fc_client.h.
Referenced by add_server_source(), fc_client(), remove_server_source(), and server_input().
|
private |
Definition at line 186 of file fc_client.h.
Referenced by create_load_page(), slot_selection_changed(), state_preview(), and update_load_page().
fc_sidebar* fc_client::sidebar_wdg |
Definition at line 231 of file fc_client.h.
Referenced by create_game_page(), fc_game_tab_widget::current_changed(), fc_client(), reload_sidebar_icons(), fc_game_tab_widget::resizeEvent(), update_fonts(), and update_sidebar_position().
|
private |
Definition at line 196 of file fc_client.h.
Referenced by create_start_page(), and update_buttons().
|
private |
Definition at line 210 of file fc_client.h.
Referenced by create_start_page(), fc_client(), start_page_menu(), and update_start_page().
|
private |
Definition at line 216 of file fc_client.h.
Referenced by fc_client(), init(), and switch_page().
|
private |
Definition at line 217 of file fc_client.h.
Referenced by clear_status_bar(), fc_client(), init(), and set_status_bar().
|
private |
Definition at line 351 of file fc_client.h.
Referenced by clear_status_bar(), fc_client(), set_status_bar(), and ~fc_client().
|
private |
Definition at line 221 of file fc_client.h.
Referenced by create_game_page(), reload_sidebar_icons(), and update_sidebar_tooltips().
fc_sidewidget* fc_client::sw_cunit |
Definition at line 274 of file fc_client.h.
Referenced by create_game_page(), and reload_sidebar_icons().
fc_sidewidget* fc_client::sw_diplo |
Definition at line 278 of file fc_client.h.
Referenced by create_game_page(), and reload_sidebar_icons().
|
private |
Definition at line 223 of file fc_client.h.
Referenced by create_game_page(), reload_sidebar_icons(), update_info_label(), and update_sidebar_tooltips().
fc_sidewidget* fc_client::sw_endturn |
Definition at line 276 of file fc_client.h.
Referenced by create_game_page(), and reload_sidebar_icons().
fc_sidewidget* fc_client::sw_indicators |
Definition at line 277 of file fc_client.h.
Referenced by create_game_page(), and update_sidebar_tooltips().
|
private |
Definition at line 220 of file fc_client.h.
Referenced by create_game_page(), reload_sidebar_icons(), update_info_label(), and update_sidebar_tooltips().
fc_sidewidget* fc_client::sw_science |
Definition at line 275 of file fc_client.h.
Referenced by create_game_page(), reload_sidebar_icons(), and update_sidebar_tooltips().
|
private |
Definition at line 222 of file fc_client.h.
Referenced by create_game_page(), update_info_label(), and update_sidebar_tooltips().
trade_generator fc_client::trade_gen |
Definition at line 269 of file fc_client.h.
units_select* fc_client::unit_sel |
Definition at line 263 of file fc_client.h.
Referenced by fc_client(), popdown_unit_sel(), qtg_real_focus_units_changed(), toggle_unit_sel_widget(), and update_unit_sel().
hud_units* fc_client::unitinfo_wdg |
Definition at line 271 of file fc_client.h.
Referenced by create_game_page(), fc_client(), and fc_game_tab_widget::resizeEvent().
|
private |
Definition at line 214 of file fc_client.h.
Referenced by fc_client(), and update_info_label().
|
private |
Definition at line 206 of file fc_client.h.
Referenced by create_network_page(), fc_client(), slot_selection_changed(), and update_server_list().
xvote* fc_client::x_vote |
Definition at line 264 of file fc_client.h.
Referenced by create_game_page(), fc_client(), and fc_game_tab_widget::resizeEvent().