![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <diplodlg.h>
Inheritance diagram for diplo_wdg:
Collaboration diagram for diplo_wdg:Public Member Functions | |
| diplo_wdg (int id, int id2) | |
| Constructor for diplomacy widget. More... | |
| ~diplo_wdg () override | |
| Destructor for diplomacy widget. More... | |
| void | update_wdg () |
| Updates diplomacy widget - updates clauses and redraws pixmaps. More... | |
| void | set_index (int ind) |
| Sets index in QTabWidget. More... | |
| int | get_index () |
| Sets index in QTabWidget. More... | |
Public Attributes | |
| struct Treaty | treaty |
Protected Member Functions | |
| void | closeEvent (QCloseEvent *event) override |
| Received event about diplomacy widget being closed. More... | |
Private Slots | |
| void | all_advances () |
| Give all advances menu activated. More... | |
| void | dbl_click (QTableWidgetItem *item) |
| Double click on treaty list - it removes clicked clause from list. More... | |
| void | give_advance (int tech) |
| Give advance menu activated. More... | |
| void | give_city (int city_num) |
| Give city menu activated. More... | |
| void | give_embassy () |
| Give embassy menu activated. More... | |
| void | give_shared_vision () |
| Give shared vision menu activated. More... | |
| void | gold_changed1 (int val) |
| Gold changed on first spinner. More... | |
| void | gold_changed2 (int val) |
| Gold changed on second spinner. More... | |
| void | pact_allianze () |
| Create alliance menu activated. More... | |
| void | pact_ceasfire () |
| Ceasefire pact menu activated. More... | |
| void | pact_peace () |
| Peace pact menu activated. More... | |
| void | response_accept () |
| Button 'Accept treaty' has been clicked. More... | |
| void | response_cancel () |
| Button 'Cancel treaty' has been clicked. More... | |
| void | sea_map_clause () |
| Sea map menu activated. More... | |
| void | show_menu (int player) |
| Shows popup menu with available clauses to create. More... | |
| void | show_menu_p1 () |
| Show menu for first player. More... | |
| void | show_menu_p2 () |
| Show menu for second player. More... | |
| void | world_map_clause () |
| World map menu activated. More... | |
| void | restore_pixmap () |
| Restores original nations pixmap. More... | |
Private Attributes | |
| QGridLayout * | layout |
| QLabel * | plr1_accept |
| QLabel * | plr2_accept |
| QPushButton * | accept_treaty |
| QPushButton * | cancel_treaty |
| QSpinBox * | gold_edit1 |
| QSpinBox * | gold_edit2 |
| QTableWidget * | text_edit |
| int | player1 |
| int | player2 |
| int | active_menu |
| int | curr_player |
| bool | p1_accept |
| bool | p2_accept |
| int | index |
Definition at line 30 of file diplodlg.h.
| diplo_wdg::diplo_wdg | ( | int | id, |
| int | id2 | ||
| ) |
Constructor for diplomacy widget.
Definition at line 48 of file diplodlg.cpp.
|
overridedefault |
Destructor for diplomacy widget.
|
privateslot |
Give all advances menu activated.
Definition at line 556 of file diplodlg.cpp.
Referenced by show_menu().
|
overrideprotected |
Received event about diplomacy widget being closed.
Definition at line 261 of file diplodlg.cpp.
|
privateslot |
Double click on treaty list - it removes clicked clause from list.
Definition at line 239 of file diplodlg.cpp.
Referenced by diplo_wdg().
| int diplo_wdg::get_index | ( | ) |
Sets index in QTabWidget.
Definition at line 619 of file diplodlg.cpp.
Referenced by diplo_dlg::close_widget(), and diplo_dlg::~diplo_dlg().
|
privateslot |
Give advance menu activated.
Definition at line 532 of file diplodlg.cpp.
Referenced by show_menu().
|
privateslot |
|
privateslot |
Give embassy menu activated.
Definition at line 439 of file diplodlg.cpp.
Referenced by show_menu().
|
privateslot |
Give shared vision menu activated.
Definition at line 449 of file diplodlg.cpp.
Referenced by show_menu().
|
privateslot |
Gold changed on first spinner.
Definition at line 272 of file diplodlg.cpp.
Referenced by diplo_wdg().
|
privateslot |
Gold changed on second spinner.
Definition at line 281 of file diplodlg.cpp.
Referenced by diplo_wdg().
|
privateslot |
Create alliance menu activated.
Definition at line 459 of file diplodlg.cpp.
Referenced by show_menu().
|
privateslot |
Ceasefire pact menu activated.
Definition at line 469 of file diplodlg.cpp.
Referenced by show_menu().
|
privateslot |
|
privateslot |
Button 'Accept treaty' has been clicked.
Definition at line 685 of file diplodlg.cpp.
Referenced by diplo_wdg().
|
privateslot |
Button 'Cancel treaty' has been clicked.
Definition at line 695 of file diplodlg.cpp.
Referenced by closeEvent(), and diplo_wdg().
|
privateslot |
Restores original nations pixmap.
Definition at line 675 of file diplodlg.cpp.
Referenced by response_accept(), and response_cancel().
|
privateslot |
| void diplo_wdg::set_index | ( | int | ind | ) |
Sets index in QTabWidget.
Definition at line 614 of file diplodlg.cpp.
Referenced by diplo_dlg::add_widget().
|
privateslot |
Shows popup menu with available clauses to create.
Definition at line 290 of file diplodlg.cpp.
Referenced by show_menu_p1(), and show_menu_p2().
|
privateslot |
|
privateslot |
Show menu for second player.
Definition at line 604 of file diplodlg.cpp.
Referenced by diplo_wdg().
| void diplo_wdg::update_wdg | ( | ) |
Updates diplomacy widget - updates clauses and redraws pixmaps.
Definition at line 624 of file diplodlg.cpp.
Referenced by diplo_wdg(), handle_diplomacy_accept_treaty(), handle_diplomacy_create_clause(), handle_diplomacy_remove_clause(), and diplo_dlg::update_dlg().
|
privateslot |
|
private |
Definition at line 35 of file diplodlg.h.
Referenced by diplo_wdg().
|
private |
Definition at line 76 of file diplodlg.h.
|
private |
Definition at line 36 of file diplodlg.h.
Referenced by diplo_wdg().
|
private |
Definition at line 77 of file diplodlg.h.
Referenced by all_advances(), give_advance(), give_city(), give_embassy(), give_shared_vision(), pact_allianze(), pact_ceasfire(), pact_peace(), sea_map_clause(), show_menu(), and world_map_clause().
|
private |
Definition at line 37 of file diplodlg.h.
Referenced by diplo_wdg().
|
private |
Definition at line 38 of file diplodlg.h.
Referenced by diplo_wdg().
|
private |
Definition at line 80 of file diplodlg.h.
Referenced by get_index(), and set_index().
|
private |
Definition at line 32 of file diplodlg.h.
Referenced by diplo_wdg().
|
private |
Definition at line 78 of file diplodlg.h.
Referenced by diplo_wdg().
|
private |
Definition at line 79 of file diplodlg.h.
Referenced by diplo_wdg().
|
private |
Definition at line 74 of file diplodlg.h.
Referenced by all_advances(), diplo_wdg(), give_advance(), give_city(), gold_changed2(), show_menu(), and show_menu_p1().
|
private |
Definition at line 75 of file diplodlg.h.
Referenced by all_advances(), diplo_wdg(), give_advance(), give_city(), gold_changed1(), gold_changed2(), show_menu(), and show_menu_p2().
|
private |
Definition at line 33 of file diplodlg.h.
Referenced by diplo_wdg(), and update_wdg().
|
private |
Definition at line 34 of file diplodlg.h.
Referenced by diplo_wdg(), and update_wdg().
|
private |
Definition at line 39 of file diplodlg.h.
Referenced by diplo_wdg(), and update_wdg().
| struct Treaty diplo_wdg::treaty |
Definition at line 46 of file diplodlg.h.
Referenced by dbl_click(), diplo_wdg(), give_embassy(), give_shared_vision(), handle_diplomacy_accept_treaty(), handle_diplomacy_create_clause(), handle_diplomacy_remove_clause(), pact_allianze(), pact_ceasfire(), pact_peace(), response_accept(), response_cancel(), sea_map_clause(), update_wdg(), and world_map_clause().