Freeciv-3.2
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 <QWindow>
#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 "sex.h"
#include "audio.h"
#include "chatline_common.h"
#include "client_main.h"
#include "control.h"
#include "helpdata.h"
#include "packhand.h"
#include "svgflag.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_escape (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 wipe_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 bombard_lethal (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 (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_board2 (QVariant data1, QVariant data2)
 
static void transport_board3 (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_embark4 (QVariant data1, QVariant data2)
 
static void transport_deboard (QVariant data1, QVariant data2)
 
static void transport_unload (QVariant data1, QVariant data2)
 
static void transport_load (QVariant data1, QVariant data2)
 
static void transport_load2 (QVariant data1, QVariant data2)
 
static void transport_load3 (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)
 
static void popup_act_confirmation_dialog (QString hdr, QString body, struct act_confirmation_data *data)
 
void qtg_request_action_confirmation (const char *expl, struct act_confirmation_data *data)
 
void qtg_popup_image (const char *tag)
 

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 72 of file dialogs.cpp.

◆ BUTTON_COUNT

#define BUTTON_COUNT   (BUTTON_CANCEL + 1)

Definition at line 73 of file dialogs.cpp.

◆ BUTTON_WAIT

#define BUTTON_WAIT   (ACTION_COUNT + 1)

Definition at line 71 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 1911 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 2318 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 2351 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 4103 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 4308 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 1992 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 4185 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 4120 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 4154 of file dialogs.cpp.

Referenced by base(), clean(), 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 4137 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 4171 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 207 of file dialogs.cpp.

◆ airlift()

static void airlift ( QVariant  data1,
QVariant  data2 
)
static

Action "Airlift Unit" for choice dialog

Definition at line 1838 of file dialogs.cpp.

Referenced by af_map_init(), receive_packet_city_info_100(), and receive_packet_edit_city_100().

◆ 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 2766 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 2778 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 2790 of file dialogs.cpp.

Referenced by af_map_init().

◆ bombard_lethal()

static void bombard_lethal ( QVariant  data1,
QVariant  data2 
)
static

Action "Bombard Lethal" for choice dialog

Definition at line 2802 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 2742 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 1757 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 1772 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 1742 of file dialogs.cpp.

Referenced by af_map_init().

◆ clean()

static void clean ( QVariant  data1,
QVariant  data2 
)
static

Action "Clean" for choice dialog

Definition at line 2890 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 1853 of file dialogs.cpp.

Referenced by af_map_init(), api_edit_unit_move(), api_edit_unit_teleport(), tolua_server_edit_unit_move00(), and tolua_server_edit_unit_teleport00().

◆ conquer_city2()

static void conquer_city2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Conquer City 2" for choice dialog

Definition at line 1868 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 1883 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 1897 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 2406 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 2840 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 3386 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 2432 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 3491 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 3596 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 3614 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 3521 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 1939 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 1979 of file dialogs.cpp.

◆ diplomat_sabotage()

static void diplomat_sabotage ( QVariant  data1,
QVariant  data2 
)
static

Action sabotage for choice dialog

Definition at line 3536 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 3551 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 3566 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 3581 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 2380 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 2628 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 2643 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 2673 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 2754 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 2392 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 2814 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 2703 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 2275 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 2298 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 2474 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 2485 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 2418 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 2973 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 3129 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 1919 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 2952 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 2994 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 3371 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 2718 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 3039 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 3054 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 3099 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 3114 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 3069 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 3084 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 2870 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 3757 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 2855 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 4064 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 1338 of file cityrep.cpp.

Referenced by popdown_all_game_dialogs().

◆ popdown_economy_report()

void popdown_economy_report ( )
extern

Closes economy report

Definition at line 1826 of file repodlgs.cpp.

Referenced by popdown_all_game_dialogs().

◆ popdown_endgame_report()

void popdown_endgame_report ( )
extern

Removes endgame report

Definition at line 1762 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 1193 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 1242 of file dialogs.cpp.

◆ popdown_science_report()

void popdown_science_report ( )
extern

Closes science report

Definition at line 1844 of file repodlgs.cpp.

Referenced by popdown_all_game_dialogs().

◆ popdown_units_report()

void popdown_units_report ( )
extern

Closes units report

Definition at line 1862 of file repodlgs.cpp.

Referenced by popdown_all_game_dialogs().

◆ popup_act_confirmation_dialog()

static void popup_act_confirmation_dialog ( QString  hdr,
QString  body,
struct act_confirmation_data data 
)
static

Open dialog confirming that user wants to do the action.

Definition at line 4927 of file dialogs.cpp.

Referenced by qtg_request_action_confirmation().

◆ 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 2002 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 3710 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 1203 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 3948 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 3648 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 4014 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 1217 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 1191 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 3869 of file dialogs.cpp.

◆ popup_races_dialog()

void popup_races_dialog ( struct player pplayer)

Popup the nation selection dialog.

Definition at line 1228 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 1304 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 3807 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 3989 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 4039 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 3958 of file dialogs.cpp.

◆ popup_upgrade_dialog()

void popup_upgrade_dialog ( struct unit_list *  punits)

Popup dialog for upgrade units

Definition at line 4370 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 4856 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 4906 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 4967 of file dialogs.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 4949 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 4865 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 1294 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 1283 of file dialogs.cpp.

◆ regular_move()

static void regular_move ( QVariant  data1,
QVariant  data2 
)
static

Action "Unit Move" for choice dialog

Definition at line 3632 of file dialogs.cpp.

Referenced by af_map_init().

◆ restart_notify_dialogs()

void restart_notify_dialogs ( )

Restarts all notify dialogs

Definition at line 4048 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 1926 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 4322 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 4329 of file dialogs.cpp.

◆ spy_embassy()

static void spy_embassy ( QVariant  data1,
QVariant  data2 
)
static

Action establish embassy for choice dialog

Definition at line 3476 of file dialogs.cpp.

Referenced by af_map_init().

◆ spy_escape()

static void spy_escape ( QVariant  data1,
QVariant  data2 
)
static

Action Spy Escape for choice dialog

Definition at line 3461 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 3506 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 3341 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 3356 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 3311 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 3326 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 3292 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 3274 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 3257 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 3777 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 2450 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 2462 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 3218 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 3226 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 3401 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 3416 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 3431 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 3446 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 3144 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 3234 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 3024 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 2825 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 2496 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_board2()

static void transport_board2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Board 2" for choice dialog

Definition at line 2507 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_board3()

static void transport_board3 ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Board 3" for choice dialog

Definition at line 2518 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_deboard()

static void transport_deboard ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Deboard" for choice dialog

Definition at line 2617 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 2529 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 2540 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 2551 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_embark4()

static void transport_embark4 ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Embark 4" for choice dialog

Definition at line 2562 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_load()

static void transport_load ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Load" for choice dialog

Definition at line 2584 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_load2()

static void transport_load2 ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Load 2" for choice dialog

Definition at line 2595 of file dialogs.cpp.

Referenced by af_map_init().

◆ transport_load3()

static void transport_load3 ( QVariant  data1,
QVariant  data2 
)
static

Action "Transport Load 3" for choice dialog

Definition at line 2606 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 2573 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 1571 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 1553 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 1787 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 1802 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 1253 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 1265 of file dialogs.cpp.

◆ unit_upgrade()

static void unit_upgrade ( QVariant  data1,
QVariant  data2 
)
static

Action "Upgrade Unit" for choice dialog

Definition at line 1817 of file dialogs.cpp.

Referenced by af_map_init().

◆ update_nationset_combo()

void update_nationset_combo ( )

Updates nationset combobox

Definition at line 1273 of file dialogs.cpp.

Referenced by option_gui_update().

◆ wipe_units()

static void wipe_units ( QVariant  data1,
QVariant  data2 
)
static

Action "Wipe Units" for choice dialog

Definition at line 2730 of file dialogs.cpp.

Referenced by af_map_init().

Variable Documentation

◆ af_map

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

Definition at line 324 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 198 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 137 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 187 of file dialogs.cpp.

Referenced by pillage_something(), and popup_pillage_dialog().

◆ race_dialog

races_dialog* race_dialog
static