Freeciv-3.1
Loading...
Searching...
No Matches
Typedefs | Functions
diplodlg.cpp File Reference
#include <QApplication>
#include <QCloseEvent>
#include <QGridLayout>
#include <QHeaderView>
#include <QLabel>
#include <QMenu>
#include <QSpinBox>
#include <QPainter>
#include <QPushButton>
#include "government.h"
#include "player.h"
#include "client_main.h"
#include "colors.h"
#include "diplodlg.h"
#include "fc_client.h"
#include "gui_main.h"
#include "sidebar.h"

Go to the source code of this file.

Typedefs

typedef advancep_advance
 
typedef cityp_city
 

Functions

int client_player_number (void)
 
struct playerplayer_by_number (const int player_id)
 
void handle_diplomacy_accept_treaty (int counterpart, bool I_accepted, bool other_accepted)
 
void handle_diplomacy_init_meeting (int counterpart, int initiated_from)
 
void handle_diplomacy_create_clause (int counterpart, int giver, enum clause_type type, int value)
 
void handle_diplomacy_cancel_meeting (int counterpart, int initiated_from)
 
void handle_diplomacy_remove_clause (int counterpart, int giver, enum clause_type type, int value)
 
void close_all_diplomacy_dialogs (void)
 

Typedef Documentation

◆ p_advance

typedef advance* p_advance

Definition at line 48 of file diplodlg.cpp.

◆ p_city

typedef city* p_city

Definition at line 49 of file diplodlg.cpp.

Function Documentation

◆ client_player_number()

int client_player_number ( void  )

Returns number of player attached to client.

Definition at line 1354 of file client_main.c.

Referenced by diplo_wdg::diplo_wdg(), editbar_player_pov_combobox_changed(), editor_apply_tool(), and key_editor_toggle_fogofwar().

◆ close_all_diplomacy_dialogs()

void close_all_diplomacy_dialogs ( void  )

Close all open diplomacy dialogs.

Called when the client disconnects from game.

Definition at line 1088 of file diplodlg.cpp.

◆ handle_diplomacy_accept_treaty()

void handle_diplomacy_accept_treaty ( int  counterpart,
bool  I_accepted,
bool  other_accepted 
)

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

Definition at line 903 of file diplodlg.cpp.

◆ handle_diplomacy_cancel_meeting()

void handle_diplomacy_cancel_meeting ( int  counterpart,
int  initiated_from 
)

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

Definition at line 1041 of file diplodlg.cpp.

◆ handle_diplomacy_create_clause()

void handle_diplomacy_create_clause ( int  counterpart,
int  giver,
enum clause_type  type,
int  value 
)

Update the diplomacy dialog by adding a clause.

Definition at line 1016 of file diplodlg.cpp.

◆ handle_diplomacy_init_meeting()

void handle_diplomacy_init_meeting ( int  counterpart,
int  initiated_from 
)

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

Definition at line 929 of file diplodlg.cpp.

◆ handle_diplomacy_remove_clause()

void handle_diplomacy_remove_clause ( int  counterpart,
int  giver,
enum clause_type  type,
int  value 
)

Update the diplomacy dialog by removing a clause.

Definition at line 1061 of file diplodlg.cpp.

◆ player_by_number()

struct player * player_by_number ( const int  player_id)

Return struct player pointer for the given player index.

You can retrieve players that are not in the game (with IDs larger than player_count). An out-of-range player request will return NULL.

Definition at line 840 of file player.c.

Referenced by diplo_dlg::add_widget(), aifill(), diplo_wdg::all_advances(), api_find_player(), begin_phase(), button_press_callback(), bvplayers_str(), city_from_great_wonder(), client_aitoggle_player(), conn_list_selection(), connect_list_right_button(), connection_list_event(), diplo_wdg::diplo_wdg(), diplomacy_dialog_city_callback(), diplomacy_dialog_city_callback(), diplomacy_dialog_tech_callback(), diplomacy_dialog_tech_callback(), editbar_player_pov_combobox_changed(), editor_apply_tool(), editor_grab_applied_player(), editor_unit_virtual_create(), end_phase(), endgame_report_dialog_player(), find_diplomacy_dialog(), get_diplomacy_dialog(), get_info_label_text(), get_player_or_user_name(), diplo_wdg::give_advance(), diplo_wdg::give_city(), great_wonder_owner(), handle_city_info(), handle_city_short_info(), handle_diplomacy_accept_treaty_req(), handle_diplomacy_cancel_meeting_req(), handle_diplomacy_cancel_pact(), handle_diplomacy_create_clause(), handle_diplomacy_create_clause_req(), handle_diplomacy_init_meeting(), handle_diplomacy_init_meeting_req(), handle_diplomacy_remove_clause(), handle_diplomacy_remove_clause_req(), handle_edit_city_create(), handle_edit_player(), handle_edit_player_remove(), handle_edit_player_vision(), handle_edit_tile(), handle_edit_tile_extra(), handle_edit_toggle_fogofwar(), handle_edit_unit_create(), handle_edit_unit_remove(), handle_nation_select_req(), handle_player_diplstate(), handle_player_ready(), handle_spaceship_info(), handle_tile_info(), handle_unit_short_info(), imgcolor_player(), kill_unit(), left_button_press_callback(), mapimg_checkplayers(), object_extract(), objtype_get_object_from_id(), player_by_name_prefix(), player_name_by_number(), players_ai_skill_callback(), players_ai_skill_callback(), players_ai_toggle_callback(), players_ai_toggle_callback(), players_intel_callback(), players_intel_callback(), players_intel_wonder_callback(), players_intel_wonder_callback(), players_sship_callback(), players_sship_callback(), players_vision_callback(), players_vision_callback(), players_war_callback(), players_war_callback(), plrdlg_sort_func(), popup_diplomacy_dialog(), property_page_create_objects(), research_iter_player_valid(), research_name_translation(), research_player_iter_init(), research_pretty_name(), research_rule_name(), right_button_press_callback(), sg_load_map_owner(), sg_load_map_owner(), sg_load_player_city(), sg_load_player_city(), sg_load_player_unit(), sg_load_player_unit(), sg_load_player_vision(), sg_load_player_vision(), sg_load_player_vision_city(), sg_load_player_vision_city(), diplo_wdg::show_menu(), shuffled_player(), start_command(), texai_city_info_recv(), texai_unit_info_recv(), toggle_goto_nations_cities_dialog_callback(), unpackage_short_unit(), unpackage_unit(), update_players_menu(), and endgame_report::update_report().