Freeciv-3.3
Loading...
Searching...
No Matches
Functions
qtg_cxxside.h File Reference
#include "fc_types.h"
#include "tilespec.h"
#include "canvas.h"
#include "pages.h"

Go to the source code of this file.

Functions

void setup_gui_funcs ()
 
void qtg_ui_init ()
 
int qtg_ui_main (int argc, char *argv[])
 
void qtg_ui_exit ()
 
enum gui_type qtg_get_gui_type ()
 
void qtg_insert_client_build_info (char *outbuf, size_t outlen)
 
void qtg_version_message (const char *vertext)
 
void qtg_real_output_window_append (const char *astring, const struct text_tag_list *tags, int conn_id)
 
bool qtg_is_view_supported (enum ts_type type)
 
void qtg_tileset_type_set (enum ts_type type)
 
struct spriteqtg_load_gfxfile (const char *filename, bool svgflag)
 
struct spriteqtg_load_gfxnumber (int num)
 
struct spriteqtg_create_sprite (int width, int height, struct color *pcolor)
 
void qtg_get_sprite_dimensions (struct sprite *sprite, int *width, int *height)
 
struct spriteqtg_crop_sprite (struct sprite *source, int x, int y, int width, int height, struct sprite *mask, int mask_offset_x, int mask_offset_y, float scale, bool smooth)
 
void qtg_free_sprite (struct sprite *s)
 
struct colorqtg_color_alloc (int r, int g, int b)
 
void qtg_color_free (struct color *pcolor)
 
struct canvasqtg_canvas_create (int width, int height)
 
void qtg_canvas_free (struct canvas *store)
 
void qtg_canvas_set_zoom (struct canvas *store, float zoom)
 
bool qtg_has_zoom_support ()
 
void qtg_canvas_mapview_init (struct canvas *store)
 
void qtg_canvas_copy (struct canvas *dest, struct canvas *src, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
 
void qtg_canvas_put_sprite (struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite, int offset_x, int offset_y, int width, int height)
 
void qtg_canvas_put_sprite_full (struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite)
 
void qtg_canvas_put_sprite_full_scaled (struct canvas *pcanvas, int canvas_x, int canvas_y, int canvas_w, int canvas_h, struct sprite *sprite)
 
void qtg_canvas_put_sprite_fogged (struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *psprite, bool fog, int fog_x, int fog_y)
 
void qtg_canvas_put_rectangle (struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height)
 
void qtg_canvas_fill_sprite_area (struct canvas *pcanvas, struct sprite *psprite, struct color *pcolor, int canvas_x, int canvas_y)
 
void qtg_canvas_put_line (struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy)
 
void qtg_canvas_put_curved_line (struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy)
 
void qtg_get_text_size (int *width, int *height, enum client_font font, const char *text)
 
void qtg_canvas_put_text (struct canvas *pcanvas, int canvas_x, int canvas_y, enum client_font font, struct color *pcolor, const char *text)
 
void qtg_map_canvas_size_refresh (void)
 
void qtg_set_rulesets (int num_rulesets, char **rulesets)
 
void qtg_options_extra_init ()
 
void qtg_server_connect ()
 
void qtg_add_net_input (int sock)
 
void qtg_remove_net_input ()
 
void qtg_real_conn_list_dialog_update (void *unused)
 
void qtg_close_connection_dialog ()
 
void qtg_add_idle_callback (void(callback)(void *), void *data)
 
void qtg_sound_bell ()
 
void qtg_real_set_client_page (enum client_pages page)
 
enum client_pages qtg_get_current_client_page ()
 
void qtg_popup_combat_info (int attacker_unit_id, int defender_unit_id, int attacker_hp, int defender_hp, bool make_att_veteran, bool make_def_veteran)
 
void qtg_set_unit_icon (int idx, struct unit *punit)
 
void qtg_set_unit_icons_more_arrow (bool onoff)
 
void qtg_real_focus_units_changed (void)
 
void qtg_gui_update_font (const char *font_name, const char *font_value)
 
void qtg_editgui_refresh ()
 
void qtg_editgui_notify_object_created (int tag, int id)
 
void qtg_editgui_notify_object_changed (int objtype, int object_id, bool removal)
 
void qtg_editgui_popup_properties (const struct tile_list *tiles, int objtype)
 
void qtg_editgui_tileset_changed ()
 
void qtg_editgui_popdown_all ()
 
void qtg_update_timeout_label ()
 
void qtg_start_turn ()
 
void qtg_real_city_dialog_popup (struct city *pcity)
 
void qtg_real_city_dialog_refresh (struct city *pcity)
 
void qtg_popdown_city_dialog (struct city *pcity)
 
void qtg_popdown_all_city_dialogs ()
 
bool qtg_handmade_scenario_warning ()
 
void qtg_refresh_unit_city_dialogs (struct unit *punit)
 
bool qtg_city_dialog_is_open (struct city *pcity)
 
bool qtg_request_transport (struct unit *pcargo, struct tile *ptile)
 
void qtg_update_infra_dialog ()
 
void qtg_gui_load_theme (const char *directory, const char *theme_name)
 
void qtg_gui_clear_theme ()
 
char ** qtg_get_gui_specific_themes_directories (int *count)
 
char ** qtg_get_usable_themes_in_directory (const char *directory, int *count)
 
void qtg_init_meeting (struct treaty *ptreaty, struct player *they, struct player *initiator)
 
void qtg_recv_cancel_meeting (struct treaty *ptreaty, struct player *they, struct player *initiator)
 
void qtg_prepare_clause_updt (struct treaty *ptreaty, struct player *they)
 
void qtg_recv_create_clause (struct treaty *ptreaty, struct player *they)
 
void qtg_recv_remove_clause (struct treaty *ptreaty, struct player *they)
 
void qtg_recv_accept_treaty (struct treaty *ptreaty, struct player *they)
 
void qtg_request_action_confirmation (const char *expl, struct act_confirmation_data *data)
 
void qtg_real_science_report_dialog_update (void *unused)
 
void qtg_science_report_dialog_redraw ()
 
void qtg_science_report_dialog_popup (bool raise)
 
void qtg_real_economy_report_dialog_update (void *unused)
 
void qtg_real_units_report_dialog_update (void *unused)
 
void qtg_endgame_report_dialog_start (const struct packet_endgame_report *packet)
 
void qtg_endgame_report_dialog_player (const struct packet_endgame_player *packet)
 
void qtg_popup_image (const char *tag)
 
void qtg_setup_gui_properties ()
 

Function Documentation

◆ qtg_add_idle_callback()

void qtg_add_idle_callback ( void(callback)(void *)  ,
void data 
)

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().

◆ qtg_add_net_input()

void qtg_add_net_input ( int  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 has successfully connected to the server.

Definition at line 306 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_canvas_copy()

void qtg_canvas_copy ( struct canvas dest,
struct canvas src,
int  src_x,
int  src_y,
int  dest_x,
int  dest_y,
int  width,
int  height 
)

Copies an area from the source canvas to the destination canvas.

Definition at line 79 of file canvas.cpp.

Referenced by city_map::set_pixmap(), and setup_gui_funcs().

◆ qtg_canvas_create()

struct canvas * qtg_canvas_create ( int  width,
int  height 
)

◆ qtg_canvas_fill_sprite_area()

void qtg_canvas_fill_sprite_area ( struct canvas pcanvas,
struct sprite psprite,
struct color pcolor,
int  canvas_x,
int  canvas_y 
)

Fill the area covered by the sprite with the given color.

Definition at line 234 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_canvas_free()

void qtg_canvas_free ( struct canvas store)

◆ qtg_canvas_mapview_init()

void qtg_canvas_mapview_init ( struct canvas store)

Initialize canvas as mapview.

Definition at line 72 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_canvas_put_curved_line()

void qtg_canvas_put_curved_line ( struct canvas pcanvas,
struct color pcolor,
enum line_type  ltype,
int  start_x,
int  start_y,
int  dx,
int  dy 
)

Draw a 1-pixel-width colored curved line onto the canvas.

Definition at line 286 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_canvas_put_line()

void qtg_canvas_put_line ( struct canvas pcanvas,
struct color pcolor,
enum line_type  ltype,
int  start_x,
int  start_y,
int  dx,
int  dy 
)

Draw a 1-pixel-width colored line onto the canvas.

Definition at line 247 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_canvas_put_rectangle()

void qtg_canvas_put_rectangle ( struct canvas pcanvas,
struct color pcolor,
int  canvas_x,
int  canvas_y,
int  width,
int  height 
)

Draw a filled-in colored rectangle onto canvas.

Definition at line 205 of file canvas.cpp.

Referenced by qtg_canvas_fill_sprite_area(), and setup_gui_funcs().

◆ qtg_canvas_put_sprite()

void qtg_canvas_put_sprite ( struct canvas pcanvas,
int  canvas_x,
int  canvas_y,
struct sprite sprite,
int  offset_x,
int  offset_y,
int  width,
int  height 
)

Draw some or all of a sprite onto the canvas.

Definition at line 139 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_canvas_put_sprite_fogged()

void qtg_canvas_put_sprite_fogged ( struct canvas pcanvas,
int  canvas_x,
int  canvas_y,
struct sprite psprite,
bool  fog,
int  fog_x,
int  fog_y 
)

Draw a full sprite onto the canvas. If "fog" is specified draw it with fog.

Definition at line 188 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_canvas_put_sprite_full()

void qtg_canvas_put_sprite_full ( struct canvas pcanvas,
int  canvas_x,
int  canvas_y,
struct sprite sprite 
)

Draw a full sprite onto the canvas.

Definition at line 154 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_canvas_put_sprite_full_scaled()

void qtg_canvas_put_sprite_full_scaled ( struct canvas pcanvas,
int  canvas_x,
int  canvas_y,
int  canvas_w,
int  canvas_h,
struct sprite sprite 
)

Draw a full sprite onto the canvas, scaled to the canvas size.

Definition at line 168 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_canvas_put_text()

void qtg_canvas_put_text ( struct canvas pcanvas,
int  canvas_x,
int  canvas_y,
enum client_font  font,
struct color pcolor,
const char text 
)

Draw the text onto the canvas in the given color and font. The canvas position does not account for the ascent of the text; this function must take care of this manually. The text will not be nullptr but may be empty.

Definition at line 354 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_canvas_set_zoom()

void qtg_canvas_set_zoom ( struct canvas store,
float  zoom 
)

Set canvas zoom for future drawing operations.

Definition at line 56 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_city_dialog_is_open()

bool qtg_city_dialog_is_open ( struct city pcity)

Return whether the dialog for the given city is open.

Definition at line 3927 of file citydlg.cpp.

Referenced by qtg_real_city_dialog_refresh(), and setup_gui_funcs().

◆ qtg_close_connection_dialog()

void qtg_close_connection_dialog ( )

Close and destroy the dialog. But only if we don't have a local server running (that we started).

Definition at line 39 of file connectdlg.cpp.

Referenced by setup_gui_funcs().

◆ qtg_color_alloc()

struct color * qtg_color_alloc ( int  r,
int  g,
int  b 
)

Allocate a color (adjusting it for our colormap if necessary on paletted systems) and return a pointer to it.

Definition at line 33 of file colors.cpp.

Referenced by setup_gui_funcs().

◆ qtg_color_free()

void qtg_color_free ( struct color pcolor)

Free a previously allocated color. See qtg_color_alloc.

Definition at line 45 of file colors.cpp.

Referenced by setup_gui_funcs().

◆ qtg_create_sprite()

struct sprite * qtg_create_sprite ( int  width,
int  height,
struct color pcolor 
)

Create a new sprite with the given height, width and color.

Definition at line 181 of file sprite.cpp.

Referenced by city_production_delegate::paint(), and setup_gui_funcs().

◆ qtg_crop_sprite()

struct sprite * qtg_crop_sprite ( struct sprite source,
int  x,
int  y,
int  width,
int  height,
struct sprite mask,
int  mask_offset_x,
int  mask_offset_y,
float  scale,
bool  smooth 
)

Create a new sprite by cropping and taking only the given portion of the image.

source gives the sprite that is to be cropped.

x,y, width, height gives the rectangle to be cropped. The pixel at position of the source sprite will be at (0,0) in the new sprite, and the new sprite will have dimensions (width, height).

mask gives an additional mask to be used for clipping the new sprite. Only the transparency value of the mask is used in crop_sprite. The formula is: dest_trans = src_trans * mask_trans. Note that because the transparency is expressed as an integer it is common to divide it by 256 afterwards.

mask_offset_x, mask_offset_y is the offset of the mask relative to the origin of the source image. The pixel at (mask_offset_x,mask_offset_y) in the mask image will be used to clip pixel (0,0) in the source image which is pixel (-x,-y) in the new image.

Definition at line 104 of file sprite.cpp.

Referenced by setup_gui_funcs().

◆ qtg_editgui_notify_object_changed()

void qtg_editgui_notify_object_changed ( int  objtype,
int  object_id,
bool  removal 
)

Stub for editor function

Definition at line 516 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_editgui_notify_object_created()

void qtg_editgui_notify_object_created ( int  tag,
int  id 
)

Stub for editor function

Definition at line 523 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_editgui_popdown_all()

void qtg_editgui_popdown_all ( )

Stub for editor function

Definition at line 510 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_editgui_popup_properties()

void qtg_editgui_popup_properties ( const struct tile_list tiles,
int  objtype 
)

Stub for editor function

Definition at line 504 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_editgui_refresh()

void qtg_editgui_refresh ( )

Stub for editor function

Definition at line 498 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_editgui_tileset_changed()

void qtg_editgui_tileset_changed ( )

Stub for editor function

Definition at line 492 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_endgame_report_dialog_player()

void qtg_endgame_report_dialog_player ( const struct packet_endgame_player packet)

Received endgame report information about single player.

Definition at line 1791 of file repodlgs.cpp.

Referenced by setup_gui_funcs().

◆ qtg_endgame_report_dialog_start()

void qtg_endgame_report_dialog_start ( const struct packet_endgame_report packet)

Show a dialog with player statistics at endgame.

Definition at line 1753 of file repodlgs.cpp.

Referenced by setup_gui_funcs().

◆ qtg_free_sprite()

void qtg_free_sprite ( struct sprite s)

Free a sprite and all associated image data.

Definition at line 172 of file sprite.cpp.

Referenced by city_production_delegate::paint(), and setup_gui_funcs().

◆ 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_get_gui_specific_themes_directories()

char ** qtg_get_gui_specific_themes_directories ( int count)

Each gui has its own themes directories.

Returns an array containing these strings and sets array size in count. The caller is responsible for freeing the array and the paths.

Definition at line 120 of file themes.cpp.

Referenced by setup_gui_funcs().

◆ qtg_get_gui_type()

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().

◆ qtg_get_sprite_dimensions()

void qtg_get_sprite_dimensions ( struct sprite sprite,
int width,
int height 
)

Find the dimensions of the sprite.

Definition at line 163 of file sprite.cpp.

Referenced by setup_gui_funcs().

◆ qtg_get_text_size()

void qtg_get_text_size ( int width,
int height,
enum client_font  font,
const char text 
)

Return the size of the given text in the given font. This size should include the ascent and descent of the text. Either of width or height may be nullptr in which case those values simply shouldn't be filled out.

Definition at line 331 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_get_usable_themes_in_directory()

char ** qtg_get_usable_themes_in_directory ( const char directory,
int count 
)

Return an array of names of usable themes in the given directory. Array size is stored in count. The caller is responsible for freeing the array and the names.

Definition at line 145 of file themes.cpp.

Referenced by setup_gui_funcs().

◆ qtg_gui_clear_theme()

void qtg_gui_clear_theme ( )

Clears a theme (sets default system theme)

Definition at line 104 of file themes.cpp.

Referenced by qtg_gui_load_theme(), qtg_ui_main(), and setup_gui_funcs().

◆ qtg_gui_load_theme()

void qtg_gui_load_theme ( const char directory,
const char theme_name 
)

Loads a qt theme directory/theme_name

Definition at line 44 of file themes.cpp.

Referenced by setup_gui_funcs().

◆ qtg_gui_update_font()

void qtg_gui_update_font ( const char font_name,
const char font_value 
)

Updates a gui font style.

Definition at line 529 of file gui_main.cpp.

Referenced by apply_notify_font(), and setup_gui_funcs().

◆ qtg_handmade_scenario_warning()

bool qtg_handmade_scenario_warning ( )

Give a warning when user is about to edit scenario with manually set properties.

Definition at line 4929 of file dialogs.cpp.

Referenced by setup_gui_funcs().

◆ qtg_has_zoom_support()

bool qtg_has_zoom_support ( )

This gui has zoom support.

Definition at line 64 of file canvas.cpp.

Referenced by setup_gui_funcs().

◆ qtg_init_meeting()

void qtg_init_meeting ( struct treaty ptreaty,
struct player they,
struct player initiator 
)

Handle the start of a diplomacy meeting - usually by popping up a diplomacy dialog.

Definition at line 944 of file diplodlg.cpp.

Referenced by plr_report::req_meeeting(), and setup_gui_funcs().

◆ qtg_insert_client_build_info()

void qtg_insert_client_build_info ( char outbuf,
size_t  outlen 
)

Insert build information to help

Definition at line 585 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_is_view_supported()

bool qtg_is_view_supported ( enum ts_type  type)

Return whether the client supports given view type.

Definition at line 28 of file graphics.cpp.

Referenced by setup_gui_funcs().

◆ qtg_load_gfxfile()

struct sprite * qtg_load_gfxfile ( const char filename,
bool  svgflag 
)

Load the given graphics file into a sprite. This function loads an entire image file, which may later be broken up into individual sprites with crop_sprite().

Definition at line 67 of file sprite.cpp.

Referenced by setup_gui_funcs().

◆ qtg_load_gfxnumber()

struct sprite * qtg_load_gfxnumber ( int  num)

Creates a sprite with the number in it.

Definition at line 195 of file sprite.cpp.

Referenced by setup_gui_funcs().

◆ qtg_map_canvas_size_refresh()

void qtg_map_canvas_size_refresh ( void  )

Refresh map canvas size information

Definition at line 1459 of file mapview.cpp.

Referenced by setup_gui_funcs().

◆ qtg_options_extra_init()

void qtg_options_extra_init ( )

Extra initializers for client options.

Definition at line 235 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_popdown_all_city_dialogs()

void qtg_popdown_all_city_dialogs ( )

Close the dialogs for all cities.

Definition at line 3864 of file citydlg.cpp.

Referenced by unit_item::activate_and_close_dialog(), unit_item::mousePressEvent(), and setup_gui_funcs().

◆ qtg_popdown_city_dialog()

void qtg_popdown_city_dialog ( struct city pcity)

Close the dialog for the given city.

Definition at line 3852 of file citydlg.cpp.

Referenced by setup_gui_funcs().

◆ qtg_popup_combat_info()

void qtg_popup_combat_info ( int  attacker_unit_id,
int  defender_unit_id,
int  attacker_hp,
int  defender_hp,
bool  make_att_veteran,
bool  make_def_veteran 
)

Popup detailed information about battle or save information for some kind of statistics

Definition at line 4979 of file dialogs.cpp.

Referenced by setup_gui_funcs().

◆ qtg_popup_image()

void qtg_popup_image ( const char tag)

Popup image window

Definition at line 5040 of file dialogs.cpp.

Referenced by setup_gui_funcs().

◆ qtg_prepare_clause_updt()

void qtg_prepare_clause_updt ( struct treaty ptreaty,
struct player they 
)

Prepare to clause creation or removal.

Definition at line 1030 of file diplodlg.cpp.

Referenced by setup_gui_funcs().

◆ qtg_real_city_dialog_popup()

void qtg_real_city_dialog_popup ( struct city pcity)

Pop up (or bring to the front) a dialog for the given city. It may or may not be modal.

Definition at line 3824 of file citydlg.cpp.

Referenced by city_widget::city_view(), notify_goto::inspect_city(), city_dialog::next_city(), city_dialog::prev_city(), and setup_gui_funcs().

◆ qtg_real_city_dialog_refresh()

void qtg_real_city_dialog_refresh ( struct city pcity)

Refresh (update) all data for the given city's dialog.

Definition at line 3872 of file citydlg.cpp.

Referenced by qtg_refresh_unit_city_dialogs(), and setup_gui_funcs().

◆ qtg_real_conn_list_dialog_update()

void qtg_real_conn_list_dialog_update ( void unused)

Update the connected users list at pregame state.

Definition at line 281 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_real_economy_report_dialog_update()

void qtg_real_economy_report_dialog_update ( void unused)

Update the economy report.

Definition at line 1687 of file repodlgs.cpp.

Referenced by setup_gui_funcs().

◆ qtg_real_focus_units_changed()

void qtg_real_focus_units_changed ( void  )

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().

◆ qtg_real_output_window_append()

void qtg_real_output_window_append ( const char astring,
const struct text_tag_list tags,
int  conn_id 
)

Appends the string to the chat output window. The string should be inserted on its own line, although it will have no newline.

Definition at line 765 of file chatline.cpp.

Referenced by real_luaconsole_append(), and setup_gui_funcs().

◆ qtg_real_science_report_dialog_update()

void qtg_real_science_report_dialog_update ( void unused)

Update the science report.

Definition at line 1159 of file repodlgs.cpp.

Referenced by apply_font(), setup_gui_funcs(), and fc_client::switch_page().

◆ 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_real_units_report_dialog_update()

void qtg_real_units_report_dialog_update ( void unused)

Update the units report.

Definition at line 1734 of file repodlgs.cpp.

Referenced by setup_gui_funcs().

◆ qtg_recv_accept_treaty()

void qtg_recv_accept_treaty ( struct treaty ptreaty,
struct player they 
)

Update a player's acceptance status of a treaty (traditionally shown with the thumbs-up/thumbs-down sprite).

Definition at line 919 of file diplodlg.cpp.

Referenced by setup_gui_funcs().

◆ qtg_recv_cancel_meeting()

void qtg_recv_cancel_meeting ( struct treaty ptreaty,
struct player they,
struct player initiator 
)

Update the diplomacy dialog when the meeting is canceled (the dialog should be closed).

Definition at line 1062 of file diplodlg.cpp.

Referenced by setup_gui_funcs().

◆ qtg_recv_create_clause()

void qtg_recv_create_clause ( struct treaty ptreaty,
struct player they 
)

Update the diplomacy dialog by adding a clause.

Definition at line 1038 of file diplodlg.cpp.

Referenced by setup_gui_funcs().

◆ qtg_recv_remove_clause()

void qtg_recv_remove_clause ( struct treaty ptreaty,
struct player they 
)

Update the diplomacy dialog by removing a clause.

Definition at line 1082 of file diplodlg.cpp.

Referenced by setup_gui_funcs().

◆ qtg_refresh_unit_city_dialogs()

void qtg_refresh_unit_city_dialogs ( struct unit punit)

Update city dialogs when the given unit's status changes. This typically means updating both the unit's home city (if any) and the city in which it is present (if any).

Definition at line 3911 of file citydlg.cpp.

Referenced by setup_gui_funcs().

◆ qtg_remove_net_input()

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().

◆ qtg_request_action_confirmation()

void qtg_request_action_confirmation ( const char expl,
struct act_confirmation_data data 
)

Common code wants confirmation for an action.

Definition at line 5022 of file dialogs.cpp.

Referenced by setup_gui_funcs().

◆ qtg_request_transport()

bool qtg_request_transport ( struct unit pcargo,
struct tile ptile 
)

Unit wants to get into some transport on given tile.

Definition at line 4938 of file dialogs.cpp.

Referenced by unit_item::load_unit(), setup_gui_funcs(), and mr_menu::slot_board().

◆ qtg_science_report_dialog_popup()

void qtg_science_report_dialog_popup ( bool  raise)

Display the science report. Optionally raise it. Typically triggered by F6.

Definition at line 1660 of file repodlgs.cpp.

Referenced by setup_gui_funcs(), and mr_menu::slot_show_research_tab().

◆ qtg_science_report_dialog_redraw()

void qtg_science_report_dialog_redraw ( )

Resize and redraw the requirement tree.

Definition at line 1809 of file repodlgs.cpp.

Referenced by setup_gui_funcs().

◆ qtg_server_connect()

void qtg_server_connect ( )

Provide an interface for connecting to a Freeciv server.

Definition at line 77 of file connectdlg.cpp.

Referenced by 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().

◆ qtg_set_unit_icon()

void qtg_set_unit_icon ( int  idx,
struct unit punit 
)

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().

◆ qtg_set_unit_icons_more_arrow()

void qtg_set_unit_icons_more_arrow ( bool  onoff)

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().

◆ qtg_setup_gui_properties()

void qtg_setup_gui_properties ( )

Define properties of this gui.

Definition at line 606 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_sound_bell()

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().

◆ qtg_start_turn()

void qtg_start_turn ( )

New turn callback

Definition at line 1447 of file mapview.cpp.

Referenced by setup_gui_funcs().

◆ qtg_tileset_type_set()

void qtg_tileset_type_set ( enum ts_type  type)

Loading tileset of the specified type

Definition at line 44 of file graphics.cpp.

Referenced by setup_gui_funcs().

◆ qtg_ui_exit()

void qtg_ui_exit ( )

Do any necessary UI-specific cleanup

Definition at line 271 of file gui_main.cpp.

Referenced by setup_gui_funcs().

◆ qtg_ui_init()

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().

◆ qtg_ui_main()

int qtg_ui_main ( int  argc,
char argv[] 
)

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().

◆ qtg_update_infra_dialog()

void qtg_update_infra_dialog ( )

Refresh infra dialog

Definition at line 24 of file infradlg.cpp.

Referenced by setup_gui_funcs().

◆ qtg_update_timeout_label()

void qtg_update_timeout_label ( void  )

Update the timeout display. The timeout is the time until the turn ends, in seconds.

Definition at line 1086 of file mapview.cpp.

Referenced by setup_gui_funcs().

◆ qtg_version_message()

void qtg_version_message ( const char vertext)

Got version message from metaserver thread.

Definition at line 833 of file chatline.cpp.

Referenced by server_scan_error(), and setup_gui_funcs().

◆ setup_gui_funcs()

void setup_gui_funcs ( void  )

Setup the gui callback table.

Definition at line 29 of file qtg_cxxside.cpp.