Freeciv-3.2
Loading...
Searching...
No Matches
Functions | Variables
pages.cpp File Reference
#include <QAction>
#include <QApplication>
#include <QCheckBox>
#include <QDateTime>
#include <QFileDialog>
#include <QGridLayout>
#include <QHeaderView>
#include <QLineEdit>
#include <QPainter>
#include <QSplitter>
#include <QStackedWidget>
#include <QTableWidget>
#include <QTextEdit>
#include <QTreeWidget>
#include "game.h"
#include "rgbcolor.h"
#include "version.h"
#include "client_main.h"
#include "connectdlg_common.h"
#include "svgflag.h"
#include "colors.h"
#include "dialogs.h"
#include "fc_client.h"
#include "pages.h"
#include "plrdlg.h"
#include "qtg_cxxside.h"
#include "sidebar.h"
#include "sprite.h"
#include "voteinfo_bar.h"
#include "repodlgs_g.h"
#include "cityrep_g.h"

Go to the source code of this file.

Functions

const charscience_dialog_text (void)
 
const charget_bulb_tooltip (void)
 
const charget_global_warming_tooltip (void)
 
const charget_nuclear_winter_tooltip (void)
 
const charget_government_tooltip (void)
 
const charget_info_label_text_popup (void)
 
const charget_info_label_text (bool)
 
const chartext_happiness_cities (const struct city *pcity)
 
void toggle_units_report (bool)
 
void popup_shortcuts_dialog ()
 
static void center_next_enemy_city ()
 
static void center_next_player_city ()
 
static void center_next_player_capital ()
 
static struct terrainchar2terrain (char ch)
 
static void cycle_enemy_units ()
 
void qtg_real_set_client_page (enum client_pages page)
 
void qtg_set_rulesets (int num_rulesets, char **rulesets)
 
enum client_pages qtg_get_current_client_page ()
 
void update_start_page (void)
 
void server_scan_error (struct server_scan *scan, const char *message)
 

Variables

int last_center_capital = 0
 
int last_center_player_city = 0
 
int last_center_enemy_city = 0
 
static struct server_scanmeta_scan
 
static struct server_scanlan_scan
 
static bool holding_srv_list_mutex = false
 
static enum connection_state connection_status
 
int last_center_enemy = 0
 

Function Documentation

◆ center_next_enemy_city()

void center_next_enemy_city ( )
static

Centers next enemy city on view

Definition at line 2190 of file pages.cpp.

Referenced by fc_client::create_game_page().

◆ center_next_player_capital()

void center_next_player_capital ( )
static

Centers next enemy capital

Definition at line 2262 of file pages.cpp.

Referenced by fc_client::create_game_page().

◆ center_next_player_city()

void center_next_player_city ( )
static

Centers next player city on view

Definition at line 2226 of file pages.cpp.

Referenced by fc_client::create_game_page().

◆ char2terrain()

static struct terrain * char2terrain ( char  ch)
static

Helper function for drawing map of savegames. Converts stored map char in savefile to proper terrain.

Definition at line 87 of file pages.cpp.

◆ cycle_enemy_units()

void cycle_enemy_units ( )
static

Center on next enemy unit

Definition at line 2317 of file pages.cpp.

Referenced by fc_client::create_game_page().

◆ get_bulb_tooltip()

const char * get_bulb_tooltip ( void  )

Get a tooltip text for the info panel research indicator. See client_research_sprite().

Not re-entrant

Definition at line 1367 of file text.c.

Referenced by update_info_label().

◆ get_global_warming_tooltip()

const char * get_global_warming_tooltip ( void  )

Get a tooltip text for the info panel global warning indicator. See also client_warming_sprite().

Not re-entrant

Definition at line 1424 of file text.c.

Referenced by update_info_label().

◆ get_government_tooltip()

const char * get_government_tooltip ( void  )

Get a tooltip text for the info panel government indicator. See also government_by_number(...)->sprite.

Not re-entrant

Definition at line 1478 of file text.c.

Referenced by update_info_label().

◆ get_info_label_text()

const char * get_info_label_text ( bool  moreinfo)

Return the text for the label on the info panel. (This is traditionally shown to the left of the mapview.)

Clicking on this text should bring up the get_info_label_text_popup() text.

Not re-entrant

Definition at line 917 of file text.c.

Referenced by update_info_label(), and fc_client::update_sidebar_tooltips().

◆ get_info_label_text_popup()

const char * get_info_label_text_popup ( void  )

Return the text for the popup label on the info panel. (This is traditionally done as a popup whenever the regular info text is clicked on.)

Not re-entrant

Definition at line 969 of file text.c.

Referenced by show_info_popup(), show_info_popup(), and fc_client::update_sidebar_tooltips().

◆ get_nuclear_winter_tooltip()

const char * get_nuclear_winter_tooltip ( void  )

Get a tooltip text for the info panel nuclear winter indicator. See also client_cooling_sprite().

Not re-entrant

Definition at line 1451 of file text.c.

Referenced by update_info_label().

◆ popup_shortcuts_dialog()

void popup_shortcuts_dialog ( )
extern

Popups shortcut dialog

Definition at line 756 of file shortcuts.cpp.

Referenced by mr_menu::shortcut_options().

◆ qtg_get_current_client_page()

enum client_pages qtg_get_current_client_page ( )

Returns current client page

Definition at line 122 of file pages.cpp.

Referenced by apply_notify_font(), qtg_real_conn_list_dialog_update(), and setup_gui_funcs().

◆ qtg_real_set_client_page()

void qtg_real_set_client_page ( enum client_pages  page)

Sets the "page" that the client should show. See also pages_g.h.

Definition at line 104 of file pages.cpp.

Referenced by qtg_close_connection_dialog(), qtg_real_conn_list_dialog_update(), and setup_gui_funcs().

◆ qtg_set_rulesets()

void qtg_set_rulesets ( int  num_rulesets,
char **  rulesets 
)

Set the list of available rulesets. The default ruleset should be "default", and if the user changes this then set_ruleset() should be called.

Definition at line 114 of file pages.cpp.

Referenced by setup_gui_funcs().

◆ science_dialog_text()

const char * science_dialog_text ( void  )

Returns the text to display in the science dialog.

Not re-entrant

Definition at line 741 of file text.c.

Referenced by real_science_report_dialog_update(), science_report_update(), show_new_turn_info(), science_report::update_report(), and fc_client::update_sidebar_tooltips().

◆ server_scan_error()

void server_scan_error ( struct server_scan scan,
const char message 
)

Callback function for when there's an error in the server scan.

Definition at line 983 of file pages.cpp.

◆ text_happiness_cities()

const char * text_happiness_cities ( const struct city pcity)

Describe city factors that affect happiness.

Not re-entrant

Definition at line 1900 of file text.c.

Referenced by show_happiness_popup(), show_happiness_popup(), city_dialog::update_citizens(), and fc_client::update_sidebar_tooltips().

◆ toggle_units_report()

void toggle_units_report ( bool  x)
extern

Toggles units report, bool used for compatibility with sidebar callback

Definition at line 1870 of file repodlgs.cpp.

Referenced by fc_client::create_game_page(), and mr_menu::slot_show_units_report().

◆ update_start_page()

void update_start_page ( void  )

Update the start page.

Definition at line 130 of file pages.cpp.

Variable Documentation

◆ connection_status

enum connection_state connection_status
static

Definition at line 78 of file pages.cpp.

◆ holding_srv_list_mutex

bool holding_srv_list_mutex = false
static

Definition at line 77 of file pages.cpp.

◆ lan_scan

struct server_scan * lan_scan
static

Definition at line 76 of file pages.cpp.

◆ last_center_capital

int last_center_capital = 0

Definition at line 68 of file pages.cpp.

Referenced by qtg_start_turn().

◆ last_center_enemy

int last_center_enemy = 0

Definition at line 81 of file pages.cpp.

Referenced by cycle_enemy_units(), and qtg_start_turn().

◆ last_center_enemy_city

int last_center_enemy_city = 0

Definition at line 70 of file pages.cpp.

Referenced by center_next_enemy_city(), and qtg_start_turn().

◆ last_center_player_city

int last_center_player_city = 0

Definition at line 69 of file pages.cpp.

Referenced by center_next_player_capital(), center_next_player_city(), and qtg_start_turn().

◆ meta_scan

struct server_scan* meta_scan
static

Definition at line 76 of file pages.cpp.