Freeciv-3.1
Loading...
Searching...
No Matches
Macros | Functions | Variables
dialogs.cpp File Reference
#include <QApplication>
#include <QButtonGroup>
#include <QComboBox>
#include <QGroupBox>
#include <QHeaderView>
#include <QImage>
#include <QMessageBox>
#include <QMouseEvent>
#include <QPainter>
#include <QPainterPath>
#include <QRadioButton>
#include <QRect>
#include <QTableWidgetItem>
#include <QTextEdit>
#include <QVBoxLayout>
#include <QtMath>
#include "astring.h"
#include "actions.h"
#include "city.h"
#include "game.h"
#include "government.h"
#include "improvement.h"
#include "movement.h"
#include "nation.h"
#include "research.h"
#include "audio.h"
#include "chatline_common.h"
#include "client_main.h"
#include "control.h"
#include "helpdata.h"
#include "packhand.h"
#include "text.h"
#include "tilespec.h"
#include "dialogs.h"
#include "fc_client.h"
#include "gui_main.h"
#include "hudwidget.h"
#include "qtg_cxxside.h"
#include "sprite.h"

Go to the source code of this file.

Macros

#define BUTTON_WAIT   (ACTION_COUNT + 1)
 
#define BUTTON_CANCEL   (BUTTON_WAIT + 1)
 
#define BUTTON_COUNT   (BUTTON_CANCEL + 1)
 

Functions

void popdown_all_spaceships_dialogs ()
 
void popdown_players_report ()
 
void popdown_economy_report ()
 
void popdown_units_report ()
 
void popdown_science_report ()
 
void popdown_city_report ()
 
void popdown_endgame_report ()
 
static void spy_request_strike_bld_list (QVariant data1, QVariant data2)
 
static void diplomat_incite (QVariant data1, QVariant data2)
 
static void diplomat_incite_escape (QVariant data1, QVariant data2)
 
static void spy_request_sabotage_list (QVariant data1, QVariant data2)
 
static void spy_request_sabotage_esc_list (QVariant data1, QVariant data2)
 
static void spy_sabotage (QVariant data1, QVariant data2)
 
static void spy_steal (QVariant data1, QVariant data2)
 
static void spy_steal_esc (QVariant data1, QVariant data2)
 
static void spy_steal_something (QVariant data1, QVariant data2)
 
static void diplomat_steal (QVariant data1, QVariant data2)
 
static void diplomat_steal_esc (QVariant data1, QVariant data2)
 
static void spy_poison (QVariant data1, QVariant data2)
 
static void spy_poison_esc (QVariant data1, QVariant data2)
 
static void spy_steal_gold (QVariant data1, QVariant data2)
 
static void spy_steal_gold_esc (QVariant data1, QVariant data2)
 
static void spy_steal_maps (QVariant data1, QVariant data2)
 
static void spy_steal_maps_esc (QVariant data1, QVariant data2)
 
static void spy_nuke_city (QVariant data1, QVariant data2)
 
static void spy_nuke_city_esc (QVariant data1, QVariant data2)
 
static void nuke_city (QVariant data1, QVariant data2)
 
static void destroy_city (QVariant data1, QVariant data2)
 
static void diplomat_embassy (QVariant data1, QVariant data2)
 
static void spy_embassy (QVariant data1, QVariant data2)
 
static void spy_sabotage_unit (QVariant data1, QVariant data2)
 
static void spy_sabotage_unit_esc (QVariant data1, QVariant data2)
 
static void spy_investigate (QVariant data1, QVariant data2)
 
static void diplomat_investigate (QVariant data1, QVariant data2)
 
static void diplomat_sabotage (QVariant data1, QVariant data2)
 
static void diplomat_sabotage_esc (QVariant data1, QVariant data2)
 
static void diplomat_bribe (QVariant data1, QVariant data2)
 
static void caravan_marketplace (QVariant data1, QVariant data2)
 
static void caravan_establish_trade (QVariant data1, QVariant data2)
 
static void caravan_help_build (QVariant data1, QVariant data2)
 
static void unit_disband_recover (QVariant data1, QVariant data2)
 
static void capture_units (QVariant data1, QVariant data2)
 
static void nuke_units (QVariant data1, QVariant data2)
 
static void expel_unit (QVariant data1, QVariant data2)
 
static void bombard (QVariant data1, QVariant data2)
 
static void bombard2 (QVariant data1, QVariant data2)
 
static void bombard3 (QVariant data1, QVariant data2)
 
static void found_city (QVariant data1, QVariant data2)
 
static void transform_terrain (QVariant data1, QVariant data2)
 
static void cultivate (QVariant data1, QVariant data2)
 
static void plant (QVariant data1, QVariant data2)
 
static void pillage (QVariant data1, QVariant data2)
 
static void clean_pollution (QVariant data1, QVariant data2)
 
static void clean_fallout (QVariant data1, QVariant data2)
 
static void road (QVariant data1, QVariant data2)
 
static void base (QVariant data1, QVariant data2)
 
static void mine (QVariant data1, QVariant data2)
 
static void irrigate (QVariant data1, QVariant data2)
 
static void nuke (QVariant data1, QVariant data2)
 
static void attack (QVariant data1, QVariant data2)
 
static void suicide_attack (QVariant data1, QVariant data2)
 
static void paradrop (QVariant data1, QVariant data2)
 
static void paradrop_conquer (QVariant data1, QVariant data2)
 
static void paradrop_frighten (QVariant data1, QVariant data2)
 
static void paradrop_frighten_conquer (QVariant data1, QVariant data2)
 
static void paradrop_enter (QVariant data1, QVariant data2)
 
static void paradrop_enter_conquer (QVariant data1, QVariant data2)
 
static void disembark1 (QVariant data1, QVariant data2)
 
static void disembark2 (QVariant data1, QVariant data2)
 
static void enter_hut (QVariant data1, QVariant data2)
 
static void enter_hut2 (QVariant data1, QVariant data2)
 
static void frighten_hut (QVariant data1, QVariant data2)
 
static void frighten_hut2 (QVariant data1, QVariant data2)
 
static void regular_move (QVariant data1, QVariant data2)
 
static void convert_unit (QVariant data1, QVariant data2)
 
static void fortify (QVariant data1, QVariant data2)
 
static void disband_unit (QVariant data1, QVariant data2)
 
static void homeless (QVariant data1, QVariant data2)
 
static void join_city (QVariant data1, QVariant data2)
 
static void unit_home_city (QVariant data1, QVariant data2)
 
static void unit_upgrade (QVariant data1, QVariant data2)
 
static void airlift (QVariant data1, QVariant data2)
 
static void conquer_city (QVariant data1, QVariant data2)
 
static void conquer_city2 (QVariant data1, QVariant data2)
 
static void conquer_extras (QVariant data1, QVariant data2)
 
static void conquer_extras2 (QVariant data1, QVariant data2)
 
static void heal_unit (QVariant data1, QVariant data2)
 
static void heal_unit2 (QVariant data1, QVariant data2)
 
static void transport_board (QVariant data1, QVariant data2)
 
static void transport_embark (QVariant data1, QVariant data2)
 
static void transport_embark2 (QVariant data1, QVariant data2)
 
static void transport_embark3 (QVariant data1, QVariant data2)
 
static void transport_alight (QVariant data1, QVariant data2)
 
static void transport_unload (QVariant data1, QVariant data2)
 
static void keep_moving (QVariant data1, QVariant data2)
 
static void pillage_something (QVariant data1, QVariant data2)
 
static void action_entry (choice_dialog *cd, action_id act, const struct act_prob *act_probs, const char *custom, QVariant data1, QVariant data2)
 
static const QHash< action_id, pfcn_voidaf_map_init (void)
 
void popup_notify_goto_dialog (const char *headline, const char *lines, const struct text_tag_list *tags, struct tile *ptile)
 
void popup_connect_msg (const char *headline, const char *message)
 
void popup_notify_dialog (const char *caption, const char *headline, const char *lines)
 
void popup_races_dialog (struct player *pplayer)
 
void popdown_races_dialog (void)
 
void unit_select_dialog_popup (struct tile *ptile)
 
void unit_select_dialog_update_real (void *unused)
 
void update_nationset_combo ()
 
void races_update_pickable (bool nationset_change)
 
void races_toggles_set_sensitive (void)
 
void popup_revolution_dialog (struct government *gov)
 
bool try_default_unit_action (QVariant q1, QVariant q2)
 
bool try_default_city_action (QVariant q1, QVariant q2)
 
static void act_sel_wait (QVariant data1, QVariant data2)
 
void revolution_response (struct government *gov)
 
static void diplomat_queue_handle_primary (int actor_unit_id)
 
static void diplomat_queue_handle_secondary (int actor_id)
 
void action_selection_no_longer_in_progress_gui_specific (int actor_id)
 
void popup_action_selection (struct unit *actor_unit, struct city *target_city, struct unit *target_unit, struct tile *target_tile, struct extra_type *target_extra, const struct act_prob *act_probs)
 
static action_id get_non_targeted_action_id (action_id tgt_action_id)
 
static action_id get_production_targeted_action_id (action_id tgt_action_id)
 
static void action_entry_update (Choice_dialog_button *button, action_id act, const struct act_prob *act_probs, const char *custom, QVariant data1, QVariant data2)
 
static void spy_steal_shared (QVariant data1, QVariant data2, action_id act_id)
 
void popup_incite_dialog (struct unit *actor, struct city *tcity, int cost, const struct action *paction)
 
void popup_bribe_dialog (struct unit *actor, struct unit *tunit, int cost, const struct action *paction)
 
void popup_sabotage_dialog (struct unit *actor, struct city *tcity, const struct action *paction)
 
void popup_pillage_dialog (struct unit *punit, bv_extras extras)
 
void popup_disband_dialog (struct unit_list *punits)
 
void popup_tileset_suggestion_dialog (void)
 
void popup_soundset_suggestion_dialog (void)
 
void popup_musicset_suggestion_dialog (void)
 
bool popup_theme_suggestion_dialog (const char *theme_name)
 
void restart_notify_dialogs ()
 
void popdown_all_game_dialogs (void)
 
int action_selection_actor_unit (void)
 
int action_selection_target_city (void)
 
int action_selection_target_tile (void)
 
int action_selection_target_extra (void)
 
int action_selection_target_unit (void)
 
void action_selection_refresh (struct unit *actor_unit, struct city *target_city, struct unit *target_unit, struct tile *target_tile, struct extra_type *target_extra, const struct act_prob *act_probs)
 
void action_selection_close (void)
 
void show_tech_gained_dialog (Tech_type_id tech)
 
void show_tileset_error (bool fatal, const char *tset_name, const char *msg)
 
void popup_upgrade_dialog (struct unit_list *punits)
 
bool qtg_handmade_scenario_warning ()
 
bool qtg_request_transport (struct unit *pcargo, struct tile *ptile)
 
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)
 

Variables

static bool is_showing_pillage_dialog = false
 
static races_dialograce_dialog
 
static bool is_race_dialog_open = false
 
static bool is_more_user_input_needed = FALSE
 
static bool did_not_decide = false
 
char forced_tileset_name [512]
 
static const QHash< action_id, pfcn_voidaf_map = af_map_init()
 

Macro Definition Documentation

◆ BUTTON_CANCEL

#define BUTTON_CANCEL   (BUTTON_WAIT + 1)

Definition at line 69 of file dialogs.cpp.

◆ BUTTON_COUNT

#define BUTTON_COUNT   (BUTTON_CANCEL + 1)

Definition at line 70 of file dialogs.cpp.

◆ BUTTON_WAIT

#define BUTTON_WAIT   (ACTION_COUNT + 1)

Definition at line 68 of file dialogs.cpp.

Function Documentation

◆ act_sel_wait()

static void act_sel_wait ( QVariant  data1,
QVariant  data2 
)
static

Delay selection of what action to take.

Definition at line 1890 of file dialogs.cpp.

Referenced by popup_action_selection().

◆ action_entry()

static void action_entry ( choice_dialog cd,
action_id  act,
const struct act_prob act_probs,
const char *  custom,
QVariant  data1,
QVariant  data2 
)
static

Show the user the action if it is enabled.

Definition at line 2297 of file dialogs.cpp.

Referenced by action_selection_refresh(), and popup_action_selection().

◆ action_entry_update()

static void action_entry_update ( Choice_dialog_button button,
action_id  act,
const struct act_prob act_probs,
const char *  custom,
QVariant  data1,
QVariant  data2 
)
static

Update an existing button.

Definition at line 2330 of file dialogs.cpp.

Referenced by action_selection_refresh().

◆ action_selection_actor_unit()

int action_selection_actor_unit ( void  )

Returns the id of the actor unit currently handled in action selection dialog when the action selection dialog is open. Returns IDENTITY_NUMBER_ZERO if no action selection dialog is open.

Definition at line 3997 of file dialogs.cpp.

Referenced by action_selection_refresh().

◆ action_selection_close()

void action_selection_close ( void  )

Closes the action selection dialog

Definition at line 4202 of file dialogs.cpp.

◆ action_selection_no_longer_in_progress_gui_specific()

void action_selection_no_longer_in_progress_gui_specific ( int  actor_id)

Let the non shared client code know that the action selection process no longer is in progress for the specified unit.

This allows the client to clean up any client specific assumptions.

Definition at line 1971 of file dialogs.cpp.

◆ action_selection_refresh()

void action_selection_refresh ( struct unit actor_unit,
struct city target_city,
struct unit target_unit,
struct tile target_tile,
struct extra_type target_extra,
const struct act_prob act_probs 
)

Updates the action selection dialog with new information.

Definition at line 4079 of file dialogs.cpp.

◆ action_selection_target_city()

int action_selection_target_city ( void  )

Returns id of the target city of the actions currently handled in action selection dialog when the action selection dialog is open and it has a city target. Returns IDENTITY_NUMBER_ZERO if no action selection dialog is open or no city target is present in the action selection dialog.

Definition at line 4014 of file dialogs.cpp.

◆ action_selection_target_extra()

int action_selection_target_extra ( void  )

Returns id of the target extra of the actions currently handled in action selection dialog when the action selection dialog is open and it has an extra target. Returns EXTRA_NONE if no action selection dialog is open or no extra target is present in the action selection dialog.

Definition at line 4048 of file dialogs.cpp.

Referenced by base(), clean_fallout(), clean_pollution(), irrigate(), mine(), pillage(), and road().

◆ action_selection_target_tile()

int action_selection_target_tile ( void  )

Returns id of the target tile of the actions currently handled in action selection dialog when the action selection dialog is open and it has a tile target. Returns TILE_INDEX_NONE if no action selection dialog is open.

Definition at line 4031 of file dialogs.cpp.

◆ action_selection_target_unit()

int action_selection_target_unit ( void  )

Returns id of the target unit of the actions currently handled in action selection dialog when the action selection dialog is open and it has a unit target. Returns IDENTITY_NUMBER_ZERO if no action selection dialog is open or no unit target is present in the action selection dialog.

Definition at line 4065 of file dialogs.cpp.

◆ af_map_init()

static const QHash< action_id, pfcn_void > af_map_init ( void  )
static

Initialize a mapping between an action and the function to call if the action's button is pushed.

Definition at line 196 of file dialogs.cpp.

◆ airlift()

static void airlift ( QVariant  data1,
QVariant  data2 
)
static

◆ attack()

static void attack ( QVariant  data1,
QVariant  data2 
)
static

◆ base()

static void base ( QVariant  data1,
QVariant  data2 
)
static

◆ bombard()

static void bombard ( QVariant  data1,
QVariant  data2 
)
static

Action "Bombard" for choice dialog

Definition at line 2667 of file dialogs.cpp.

Referenced by af_map_init().

◆ bombard2()

static void bombard2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Bombard 2" for choice dialog

Definition at line 2679 of file dialogs.cpp.

Referenced by af_map_init().

◆ bombard3()

static void bombard3 ( QVariant  data1,
QVariant  data2 
)
static

Action "Bombard 3" for choice dialog

Definition at line 2691 of file dialogs.cpp.

Referenced by af_map_init().

◆ capture_units()

static void capture_units ( QVariant  data1,
QVariant  data2 
)
static

Action capture units for choice dialog

Definition at line 2643 of file dialogs.cpp.

Referenced by af_map_init().

◆ caravan_establish_trade()

static void caravan_establish_trade ( QVariant  data1,
QVariant  data2 
)
static

Action establish trade for choice dialog

Definition at line 1736 of file dialogs.cpp.

Referenced by af_map_init().

◆ caravan_help_build()

static void caravan_help_build ( QVariant  data1,
QVariant  data2 
)
static

Action help build wonder for choice dialog

Definition at line 1751 of file dialogs.cpp.

Referenced by af_map_init().

◆ caravan_marketplace()

static void caravan_marketplace ( QVariant  data1,
QVariant  data2 
)
static

Action enter market place for choice dialog

Definition at line 1721 of file dialogs.cpp.

Referenced by af_map_init().

◆ clean_fallout()

static void clean_fallout ( QVariant  data1,
QVariant  data2 
)
static

Action "Clean Fallout" for choice dialog

Definition at line 2799 of file dialogs.cpp.

Referenced by af_map_init().

◆ clean_pollution()

static void clean_pollution ( QVariant  data1,
QVariant  data2 
)
static

Action "Clean Pollution" for choice dialog

Definition at line 2779 of file dialogs.cpp.

Referenced by af_map_init().

◆ conquer_city()

static void conquer_city ( QVariant  data1,
QVariant  data2 
)
static

Action "Conquer City" for choice dialog

Definition at line 1832 of file dialogs.cpp.

Referenced by af_map_init(), api_edit_unit_move(), api_edit_unit_teleport(), tolua_server_edit_unit_move01(), and tolua_server_edit_unit_teleport01().

◆ conquer_city2()

static void conquer_city2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Conquer City 2" for choice dialog

Definition at line 1847 of file dialogs.cpp.

Referenced by af_map_init().

◆ conquer_extras()

static void conquer_extras ( QVariant  data1,
QVariant  data2 
)
static

Action "Conquer Extras" for choice dialog

Definition at line 1862 of file dialogs.cpp.

Referenced by af_map_init().

◆ conquer_extras2()

static void conquer_extras2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Conquer Extras 2" for choice dialog

Definition at line 1876 of file dialogs.cpp.

Referenced by af_map_init().

◆ convert_unit()

static void convert_unit ( QVariant  data1,
QVariant  data2 
)
static

Action Convert Unit for choice dialog

Definition at line 2385 of file dialogs.cpp.

Referenced by af_map_init().

◆ cultivate()

static void cultivate ( QVariant  data1,
QVariant  data2 
)
static

Action "Cultivate" for choice dialog

Definition at line 2729 of file dialogs.cpp.

Referenced by af_map_init().

◆ destroy_city()

static void destroy_city ( QVariant  data1,
QVariant  data2 
)
static

Action destroy city for choice dialog

Definition at line 3295 of file dialogs.cpp.

Referenced by af_map_init().

◆ diplomat_bribe()

static void diplomat_bribe ( QVariant  data1,
QVariant  data2 
)
static

Action bribe unit for choice dialog

Definition at line 2411 of file dialogs.cpp.

Referenced by af_map_init().

◆ diplomat_embassy()

static void diplomat_embassy ( QVariant  data1,
QVariant  data2 
)
static

Action establish embassy for choice dialog

Definition at line 3385 of file dialogs.cpp.

Referenced by af_map_init().

◆ diplomat_incite()

static void diplomat_incite ( QVariant  data1,
QVariant  data2 
)
static

Action incite revolt for choice dialog

Definition at line 3490 of file dialogs.cpp.

Referenced by af_map_init().

◆ diplomat_incite_escape()

static void diplomat_incite_escape ( QVariant  data1,
QVariant  data2 
)
static

Action incite revolt and escape for choice dialog

Definition at line 3508 of file dialogs.cpp.

Referenced by af_map_init().

◆ diplomat_investigate()

static void diplomat_investigate ( QVariant  data1,
QVariant  data2 
)
static

Action Investigate City Spend Unit for choice dialog

Definition at line 3415 of file dialogs.cpp.

Referenced by af_map_init().

◆ diplomat_queue_handle_primary()

static void diplomat_queue_handle_primary ( int  actor_unit_id)
static

Move the queue of units that need user input forward unless the current unit will need more input.

Definition at line 1918 of file dialogs.cpp.

◆ diplomat_queue_handle_secondary()

static void diplomat_queue_handle_secondary ( int  actor_id)
static

Move the queue of units that need user input forward since the current unit doesn't require the extra input any more.

Definition at line 1958 of file dialogs.cpp.

◆ diplomat_sabotage()

static void diplomat_sabotage ( QVariant  data1,
QVariant  data2 
)
static

Action sabotage for choice dialog

Definition at line 3430 of file dialogs.cpp.

Referenced by af_map_init().

◆ diplomat_sabotage_esc()

static void diplomat_sabotage_esc ( QVariant  data1,
QVariant  data2 
)
static

Action sabotage and escape for choice dialog

Definition at line 3445 of file dialogs.cpp.

Referenced by af_map_init().

◆ diplomat_steal()

static void diplomat_steal ( QVariant  data1,
QVariant  data2 
)
static

Action steal with diplomat for choice dialog

Definition at line 3460 of file dialogs.cpp.

Referenced by af_map_init().

◆ diplomat_steal_esc()

static void diplomat_steal_esc ( QVariant  data1,
QVariant  data2 
)
static

Action "Steal Tech Escape Expected" for choice dialog

Definition at line 3475 of file dialogs.cpp.

Referenced by af_map_init().

◆ disband_unit()

static void disband_unit ( QVariant  data1,
QVariant  data2 
)
static

Action Disband Unit for choice dialog

Definition at line 2359 of file dialogs.cpp.

Referenced by af_map_init().

◆ disembark1()

static void disembark1 ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Disembark" for choice dialog

Definition at line 2541 of file dialogs.cpp.

Referenced by af_map_init().

◆ disembark2()

static void disembark2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Disembark 2" for choice dialog

Definition at line 2556 of file dialogs.cpp.

Referenced by af_map_init().

◆ enter_hut()

static void enter_hut ( QVariant  data1,
QVariant  data2 
)
static

◆ enter_hut2()

static void enter_hut2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Enter Hut 2" for choice dialog

Definition at line 2586 of file dialogs.cpp.

Referenced by af_map_init().

◆ expel_unit()

static void expel_unit ( QVariant  data1,
QVariant  data2 
)
static

Action expel unit for choice dialog

Definition at line 2655 of file dialogs.cpp.

Referenced by af_map_init().

◆ fortify()

static void fortify ( QVariant  data1,
QVariant  data2 
)
static

Action "Fortify" for choice dialog

Definition at line 2371 of file dialogs.cpp.

Referenced by af_map_init().

◆ found_city()

static void found_city ( QVariant  data1,
QVariant  data2 
)
static

Action build city for choice dialog

Definition at line 2703 of file dialogs.cpp.

Referenced by af_map_init().

◆ frighten_hut()

static void frighten_hut ( QVariant  data1,
QVariant  data2 
)
static

◆ frighten_hut2()

static void frighten_hut2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Frighten Hut 2" for choice dialog

Definition at line 2616 of file dialogs.cpp.

Referenced by af_map_init().

◆ get_non_targeted_action_id()

static action_id get_non_targeted_action_id ( action_id  tgt_action_id)
static

Get the non targeted version of an action so it, if enabled, can appear in the target selection dialog.

Definition at line 2254 of file dialogs.cpp.

Referenced by popup_sabotage_dialog(), spy_sabotage(), spy_steal_shared(), and spy_steal_something().

◆ get_production_targeted_action_id()

static action_id get_production_targeted_action_id ( action_id  tgt_action_id)
static

Get the production targeted version of an action so it, if enabled, can appear in the target selection dialog.

Definition at line 2277 of file dialogs.cpp.

Referenced by popup_sabotage_dialog(), and spy_sabotage().

◆ heal_unit()

static void heal_unit ( QVariant  data1,
QVariant  data2 
)
static

Action "Heal Unit" for choice dialog

Definition at line 2453 of file dialogs.cpp.

Referenced by af_map_init().

◆ heal_unit2()

static void heal_unit2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Heal Unit 2" for choice dialog

Definition at line 2464 of file dialogs.cpp.

Referenced by af_map_init().

◆ homeless()

static void homeless ( QVariant  data1,
QVariant  data2 
)
static

Action "Unit Make Homeless" for choice dialog

Definition at line 2397 of file dialogs.cpp.

Referenced by af_map_init(), and transfer_city_units().

◆ irrigate()

static void irrigate ( QVariant  data1,
QVariant  data2 
)
static

Action "Build Irrigation" for choice dialog

Definition at line 2882 of file dialogs.cpp.

Referenced by af_map_init().

◆ join_city()

static void join_city ( QVariant  data1,
QVariant  data2 
)
static

Action join city for choice dialog

Definition at line 3038 of file dialogs.cpp.

Referenced by af_map_init().

◆ keep_moving()

static void keep_moving ( QVariant  data1,
QVariant  data2 
)
static

Empty action for choice dialog (just do nothing)

Definition at line 1898 of file dialogs.cpp.

Referenced by popup_action_selection().

◆ mine()

static void mine ( QVariant  data1,
QVariant  data2 
)
static

Action "Build Mine" for choice dialog

Definition at line 2861 of file dialogs.cpp.

Referenced by af_map_init().

◆ nuke()

static void nuke ( QVariant  data1,
QVariant  data2 
)
static

Action "Explode Nuclear" for choice dialog

Definition at line 2903 of file dialogs.cpp.

Referenced by adv_data_phase_init(), and af_map_init().

◆ nuke_city()

static void nuke_city ( QVariant  data1,
QVariant  data2 
)
static

Action "Nuke City" for choice dialog

Definition at line 3280 of file dialogs.cpp.

Referenced by af_map_init().

◆ nuke_units()

static void nuke_units ( QVariant  data1,
QVariant  data2 
)
static

Action "Nuke Units" for choice dialog

Definition at line 2631 of file dialogs.cpp.

Referenced by adv_data_phase_init(), and af_map_init().

◆ paradrop()

static void paradrop ( QVariant  data1,
QVariant  data2 
)
static

Action "Paradrop Unit" for choice dialog

Definition at line 2948 of file dialogs.cpp.

Referenced by af_map_init().

◆ paradrop_conquer()

static void paradrop_conquer ( QVariant  data1,
QVariant  data2 
)
static

Action "Paradrop Unit Conquer" for choice dialog

Definition at line 2963 of file dialogs.cpp.

Referenced by af_map_init().

◆ paradrop_enter()

static void paradrop_enter ( QVariant  data1,
QVariant  data2 
)
static

Action "Paradrop Unit Enter" for choice dialog

Definition at line 3008 of file dialogs.cpp.

Referenced by af_map_init().

◆ paradrop_enter_conquer()

static void paradrop_enter_conquer ( QVariant  data1,
QVariant  data2 
)
static

Action "Paradrop Unit Enter Conquer" for choice dialog

Definition at line 3023 of file dialogs.cpp.

Referenced by af_map_init().

◆ paradrop_frighten()

static void paradrop_frighten ( QVariant  data1,
QVariant  data2 
)
static

Action "Paradrop Unit Frighten" for choice dialog

Definition at line 2978 of file dialogs.cpp.

Referenced by af_map_init().

◆ paradrop_frighten_conquer()

static void paradrop_frighten_conquer ( QVariant  data1,
QVariant  data2 
)
static

Action "Paradrop Unit Frighten Conquer" for choice dialog

Definition at line 2993 of file dialogs.cpp.

Referenced by af_map_init().

◆ pillage()

static void pillage ( QVariant  data1,
QVariant  data2 
)
static

Action "Pillage" for choice dialog

Definition at line 2759 of file dialogs.cpp.

Referenced by af_map_init().

◆ pillage_something()

static void pillage_something ( QVariant  data1,
QVariant  data2 
)
static

Action pillage for choice dialog

Definition at line 3651 of file dialogs.cpp.

Referenced by popup_pillage_dialog().

◆ plant()

static void plant ( QVariant  data1,
QVariant  data2 
)
static

Action "Plant" for choice dialog

Definition at line 2744 of file dialogs.cpp.

Referenced by af_map_init().

◆ popdown_all_game_dialogs()

void popdown_all_game_dialogs ( void  )

This function is called when the client disconnects or the game is over. It should close all dialog windows for that game.

Definition at line 3958 of file dialogs.cpp.

◆ popdown_all_spaceships_dialogs()

void popdown_all_spaceships_dialogs ( )
extern

Close all spaceships dialogs

Definition at line 174 of file spaceshipdlg.cpp.

Referenced by popdown_all_game_dialogs().

◆ popdown_city_report()

void popdown_city_report ( )
extern

Closes city report

Definition at line 1340 of file cityrep.cpp.

Referenced by popdown_all_game_dialogs().

◆ popdown_economy_report()

void popdown_economy_report ( )
extern

Closes economy report

Definition at line 1818 of file repodlgs.cpp.

Referenced by popdown_all_game_dialogs().

◆ popdown_endgame_report()

void popdown_endgame_report ( )
extern

Removes endgame report

Definition at line 1756 of file repodlgs.cpp.

Referenced by popdown_all_game_dialogs().

◆ popdown_players_report()

void popdown_players_report ( void  )
extern

Closes players report

Definition at line 1159 of file plrdlg.cpp.

Referenced by popdown_all_game_dialogs().

◆ popdown_races_dialog()

void popdown_races_dialog ( void  )

Close the nation selection dialog. This should allow the user to (at least) select a unit to activate.

Definition at line 1221 of file dialogs.cpp.

◆ popdown_science_report()

void popdown_science_report ( )
extern

Closes science report

Definition at line 1836 of file repodlgs.cpp.

Referenced by popdown_all_game_dialogs().

◆ popdown_units_report()

void popdown_units_report ( )
extern

Closes units report

Definition at line 1854 of file repodlgs.cpp.

Referenced by popdown_all_game_dialogs().

◆ popup_action_selection()

void popup_action_selection ( struct unit actor_unit,
struct city target_city,
struct unit target_unit,
struct tile target_tile,
struct extra_type target_extra,
const struct act_prob act_probs 
)

Popup a dialog that allows the player to select what action a unit should take.

Definition at line 1981 of file dialogs.cpp.

◆ popup_bribe_dialog()

void popup_bribe_dialog ( struct unit actor,
struct unit tunit,
int  cost,
const struct action paction 
)

Popup a dialog asking a diplomatic unit if it wishes to bribe the given enemy unit.

Definition at line 3604 of file dialogs.cpp.

◆ popup_connect_msg()

void popup_connect_msg ( const char *  headline,
const char *  message 
)

Popup a dialog to display connection message from server.

Definition at line 1182 of file dialogs.cpp.

◆ popup_disband_dialog()

void popup_disband_dialog ( struct unit_list *  punits)

Pops up a dialog to confirm disband of the unit(s).

Definition at line 3842 of file dialogs.cpp.

◆ popup_incite_dialog()

void popup_incite_dialog ( struct unit actor,
struct city tcity,
int  cost,
const struct action paction 
)

Popup a window asking a diplomatic unit if it wishes to incite the given enemy city.

Definition at line 3542 of file dialogs.cpp.

◆ popup_musicset_suggestion_dialog()

void popup_musicset_suggestion_dialog ( void  )

Ruleset (modpack) has suggested loading certain musicset. Confirm from user and load.

Definition at line 3908 of file dialogs.cpp.

◆ popup_notify_dialog()

void popup_notify_dialog ( const char *  caption,
const char *  headline,
const char *  lines 
)

Popup a generic dialog to display some generic information.

Definition at line 1196 of file dialogs.cpp.

◆ popup_notify_goto_dialog()

void popup_notify_goto_dialog ( const char *  headline,
const char *  lines,
const struct text_tag_list *  tags,
struct tile ptile 
)

Popup a dialog to display information about an event that has a specific location. The user should be given the option to goto that location.

Definition at line 1170 of file dialogs.cpp.

◆ popup_pillage_dialog()

void popup_pillage_dialog ( struct unit punit,
bv_extras  extras 
)

Popup a dialog asking the unit which improvement they would like to pillage.

Definition at line 3763 of file dialogs.cpp.

◆ popup_races_dialog()

void popup_races_dialog ( struct player pplayer)

Popup the nation selection dialog.

Definition at line 1207 of file dialogs.cpp.

◆ popup_revolution_dialog()

void popup_revolution_dialog ( struct government gov)

Popup a dialog asking if the player wants to start a revolution.

Definition at line 1283 of file dialogs.cpp.

◆ popup_sabotage_dialog()

void popup_sabotage_dialog ( struct unit actor,
struct city tcity,
const struct action paction 
)

Popup a dialog asking a diplomatic unit if it wishes to sabotage the given enemy city.

Definition at line 3701 of file dialogs.cpp.

◆ popup_soundset_suggestion_dialog()

void popup_soundset_suggestion_dialog ( void  )

Ruleset (modpack) has suggested loading certain soundset. Confirm from user and load.

Definition at line 3883 of file dialogs.cpp.

◆ popup_theme_suggestion_dialog()

bool popup_theme_suggestion_dialog ( const char *  theme_name)

Tileset (modpack) has suggested loading certain theme. Confirm from user and load.

Definition at line 3933 of file dialogs.cpp.

◆ popup_tileset_suggestion_dialog()

void popup_tileset_suggestion_dialog ( void  )

Ruleset (modpack) has suggested loading certain tileset. Confirm from user and load.

Definition at line 3852 of file dialogs.cpp.

◆ popup_upgrade_dialog()

void popup_upgrade_dialog ( struct unit_list *  punits)

Popup dialog for upgrade units

Definition at line 4264 of file dialogs.cpp.

Referenced by unit_upgrade().

◆ 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 4750 of file dialogs.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 4800 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 4759 of file dialogs.cpp.

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

◆ races_toggles_set_sensitive()

void races_toggles_set_sensitive ( void  )

In the nation selection dialog, make already-taken nations unavailable. This information is contained in the packet_nations_used packet.

Definition at line 1273 of file dialogs.cpp.

◆ races_update_pickable()

void races_update_pickable ( bool  nationset_change)

The server has changed the set of selectable nations.

Definition at line 1262 of file dialogs.cpp.

◆ regular_move()

static void regular_move ( QVariant  data1,
QVariant  data2 
)
static

Action "Unit Move" for choice dialog

Definition at line 3526 of file dialogs.cpp.

Referenced by af_map_init().

◆ restart_notify_dialogs()

void restart_notify_dialogs ( )

Restarts all notify dialogs

Definition at line 3942 of file dialogs.cpp.

Referenced by apply_notify_font().

◆ revolution_response()

void revolution_response ( struct government gov)

Starts revolution with targeted government as target or anarchy otherwise

Definition at line 1905 of file dialogs.cpp.

Referenced by popup_revolution_dialog().

◆ road()

static void road ( QVariant  data1,
QVariant  data2 
)
static

◆ show_tech_gained_dialog()

void show_tech_gained_dialog ( Tech_type_id  tech)

Player has gained a new tech.

Definition at line 4216 of file dialogs.cpp.

◆ show_tileset_error()

void show_tileset_error ( bool  fatal,
const char *  tset_name,
const char *  msg 
)

Show tileset error dialog.

Definition at line 4223 of file dialogs.cpp.

◆ spy_embassy()

static void spy_embassy ( QVariant  data1,
QVariant  data2 
)
static

Action establish embassy for choice dialog

Definition at line 3370 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_investigate()

static void spy_investigate ( QVariant  data1,
QVariant  data2 
)
static

Action investigate city for choice dialog

Definition at line 3400 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_nuke_city()

static void spy_nuke_city ( QVariant  data1,
QVariant  data2 
)
static

Action suitcase nuke for choice dialog

Definition at line 3250 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_nuke_city_esc()

static void spy_nuke_city_esc ( QVariant  data1,
QVariant  data2 
)
static

Action suitcase nuke escape for choice dialog

Definition at line 3265 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_poison()

static void spy_poison ( QVariant  data1,
QVariant  data2 
)
static

Action Poison City for choice dialog

Definition at line 3220 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_poison_esc()

static void spy_poison_esc ( QVariant  data1,
QVariant  data2 
)
static

Action Poison City Escape for choice dialog

Definition at line 3235 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_request_sabotage_esc_list()

static void spy_request_sabotage_esc_list ( QVariant  data1,
QVariant  data2 
)
static

Action request sabotage (and escape) list for choice dialog

Definition at line 3201 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_request_sabotage_list()

static void spy_request_sabotage_list ( QVariant  data1,
QVariant  data2 
)
static

Action request sabotage list for choice dialog

Definition at line 3183 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_request_strike_bld_list()

static void spy_request_strike_bld_list ( QVariant  data1,
QVariant  data2 
)
static

Action request "Surgical Strike Building" list for choice dialog

Definition at line 3166 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_sabotage()

static void spy_sabotage ( QVariant  data1,
QVariant  data2 
)
static

Action sabotage with spy for choice dialog

Definition at line 3671 of file dialogs.cpp.

Referenced by popup_sabotage_dialog().

◆ spy_sabotage_unit()

static void spy_sabotage_unit ( QVariant  data1,
QVariant  data2 
)
static

Action sabotage unit for choice dialog

Definition at line 2429 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_sabotage_unit_esc()

static void spy_sabotage_unit_esc ( QVariant  data1,
QVariant  data2 
)
static

Action Sabotage Unit Escape for choice dialog

Definition at line 2441 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_steal()

static void spy_steal ( QVariant  data1,
QVariant  data2 
)
static

Action "Targeted Steal Tech" for choice dialog

Definition at line 3127 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_steal_esc()

static void spy_steal_esc ( QVariant  data1,
QVariant  data2 
)
static

Action "Targeted Steal Tech Escape Expected" for choice dialog

Definition at line 3135 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_steal_gold()

static void spy_steal_gold ( QVariant  data1,
QVariant  data2 
)
static

Action steal gold for choice dialog

Definition at line 3310 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_steal_gold_esc()

static void spy_steal_gold_esc ( QVariant  data1,
QVariant  data2 
)
static

Action steal gold escape for choice dialog

Definition at line 3325 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_steal_maps()

static void spy_steal_maps ( QVariant  data1,
QVariant  data2 
)
static

Action steal maps for choice dialog

Definition at line 3340 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_steal_maps_esc()

static void spy_steal_maps_esc ( QVariant  data1,
QVariant  data2 
)
static

Action steal maps escape for choice dialog

Definition at line 3355 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_steal_shared()

static void spy_steal_shared ( QVariant  data1,
QVariant  data2,
action_id  act_id 
)
static

Action steal tech with spy for choice dialog

Definition at line 3053 of file dialogs.cpp.

Referenced by spy_steal(), and spy_steal_esc().

◆ spy_steal_something()

static void spy_steal_something ( QVariant  data1,
QVariant  data2 
)
static

Action steal given tech for choice dialog

Definition at line 3143 of file dialogs.cpp.

Referenced by spy_steal_shared().

◆ suicide_attack()

static void suicide_attack ( QVariant  data1,
QVariant  data2 
)
static

Action "Suicide Attack" for choice dialog

Definition at line 2933 of file dialogs.cpp.

Referenced by af_map_init().

◆ transform_terrain()

static void transform_terrain ( QVariant  data1,
QVariant  data2 
)
static

Action "Transform Terrain" for choice dialog

Definition at line 2714 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_alight()

static void transport_alight ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Alight" for choice dialog

Definition at line 2530 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_board()

static void transport_board ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Board" for choice dialog

Definition at line 2475 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_embark()

static void transport_embark ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Embark" for choice dialog

Definition at line 2486 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_embark2()

static void transport_embark2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Embark 2" for choice dialog

Definition at line 2497 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_embark3()

static void transport_embark3 ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Embark 3" for choice dialog

Definition at line 2508 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_unload()

static void transport_unload ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Unload" for choice dialog

Definition at line 2519 of file dialogs.cpp.

Referenced by af_map_init().

◆ try_default_city_action()

bool try_default_city_action ( QVariant  q1,
QVariant  q2 
)

Try to pick up default city action

Definition at line 1550 of file dialogs.cpp.

Referenced by popup_action_selection().

◆ try_default_unit_action()

bool try_default_unit_action ( QVariant  q1,
QVariant  q2 
)

Try to pick up default unit action

Definition at line 1532 of file dialogs.cpp.

Referenced by popup_action_selection().

◆ unit_disband_recover()

static void unit_disband_recover ( QVariant  data1,
QVariant  data2 
)
static

Action Disband Unit Recover for choice dialog

Definition at line 1766 of file dialogs.cpp.

Referenced by af_map_init().

◆ unit_home_city()

static void unit_home_city ( QVariant  data1,
QVariant  data2 
)
static

Action Home City for choice dialog

Definition at line 1781 of file dialogs.cpp.

Referenced by af_map_init().

◆ unit_select_dialog_popup()

void unit_select_dialog_popup ( struct tile ptile)

Popup a dialog window to select units on a particular tile.

Definition at line 1232 of file dialogs.cpp.

◆ unit_select_dialog_update_real()

void unit_select_dialog_update_real ( void *  unused)

Update the dialog window to select units on a particular tile.

Definition at line 1244 of file dialogs.cpp.

◆ unit_upgrade()

static void unit_upgrade ( QVariant  data1,
QVariant  data2 
)
static

Action "Upgrade Unit" for choice dialog

Definition at line 1796 of file dialogs.cpp.

Referenced by af_map_init().

◆ update_nationset_combo()

void update_nationset_combo ( )

Updates nationset combobox

Definition at line 1252 of file dialogs.cpp.

Referenced by option_gui_update().

Variable Documentation

◆ af_map

const QHash<action_id, pfcn_void> af_map = af_map_init()
static

Definition at line 305 of file dialogs.cpp.

Referenced by action_entry(), try_default_city_action(), and try_default_unit_action().

◆ did_not_decide

bool did_not_decide = false
static

Definition at line 187 of file dialogs.cpp.

Referenced by action_selection_close(), and diplomat_queue_handle_primary().

◆ forced_tileset_name

char forced_tileset_name[512]
extern

Definition at line 136 of file client_main.c.

Referenced by popup_tileset_suggestion_dialog().

◆ is_more_user_input_needed

bool is_more_user_input_needed = FALSE
static

◆ is_race_dialog_open

bool is_race_dialog_open = false
static

◆ is_showing_pillage_dialog

bool is_showing_pillage_dialog = false
static

Definition at line 176 of file dialogs.cpp.

Referenced by pillage_something(), and popup_pillage_dialog().

◆ race_dialog

races_dialog* race_dialog
static