Freeciv-3.3
|
#include <cityrep.h>
Public Slots | |
void | display_header_menu (const QPoint &) |
void | hide_columns () |
void | city_doubleclick (const QModelIndex &index) |
void | city_view () |
void | clear_worlist () |
void | cities_selected (const QItemSelection &sl, const QItemSelection &ds) |
void | display_list_menu (const QPoint &) |
void | buy () |
void | center () |
void | select_all () |
void | select_none () |
void | invert_selection () |
void | select_coastal () |
void | select_building_something () |
void | select_same_island () |
Public Member Functions | |
city_widget (city_report *ctr) | |
~city_widget () | |
city_model * | get_model () const |
void | update_model () |
void | update_city (struct city *pcity) |
Data Fields | |
QList< city * > | selected_cities |
Private Types | |
enum | menu_labels { CHANGE_PROD_NOW = 1 , CHANGE_PROD_NEXT , CHANGE_PROD_LAST , CHANGE_PROD_BEF_LAST , CMA , SELL , WORKLIST_ADD , WORKLIST_CHANGE , SELECT_IMPR , SELECT_WONDERS , SELECT_SUPP_UNITS , SELECT_PRES_UNITS , SELECT_AVAIL_UNITS , SELECT_AVAIL_IMPR , SELECT_AVAIL_WONDERS , BUY } |
Private Member Functions | |
void | restore_selection () |
void | select_city (struct city *pcity) |
void | gen_cma_labels (QMap< QString, int > &list) |
void | gen_select_labels (QMenu *menu) |
void | gen_worklist_labels (QMap< QString, int > &list) |
void | gen_production_labels (menu_labels which, QMap< QString, cid > &list, bool append_units, bool append_wonders, TestCityFunc test_func, bool global=false) |
void | fill_data (menu_labels which, QMap< QString, cid > &custom_labels, QMenu *menu) |
void | fill_production_menus (city_widget::menu_labels what, QMap< QString, cid > &custom_labels, TestCityFunc test_func, QMenu *menu) |
Private Attributes | |
city_model * | list_model |
QSortFilterProxyModel * | filter_model |
city_item_delegate * | c_i_d |
city_report * | cr |
|
private |
city_widget::city_widget | ( | city_report * | ctr | ) |
Constructor for city widget
Definition at line 355 of file cityrep.cpp.
city_widget::~city_widget | ( | ) |
Destructor for city widget
Definition at line 1212 of file cityrep.cpp.
|
slot |
Buys current item in city
Definition at line 437 of file cityrep.cpp.
Referenced by display_list_menu().
|
slot |
|
slot |
Slot for selecting items in city widget, they are stored in selected_cities until deselected
Definition at line 1178 of file cityrep.cpp.
Referenced by city_widget().
|
slot |
Slot for double clicking row
Definition at line 395 of file cityrep.cpp.
Referenced by city_widget().
|
slot |
Shows first selected city
Definition at line 403 of file cityrep.cpp.
Referenced by city_doubleclick(), and display_list_menu().
|
slot |
Clears worklist for selected cities
Definition at line 422 of file cityrep.cpp.
Referenced by display_list_menu().
Displays right click menu on city row
Definition at line 466 of file cityrep.cpp.
Referenced by city_widget().
|
private |
Fills menu actions
Definition at line 754 of file cityrep.cpp.
Referenced by display_list_menu(), fill_production_menus(), and gen_select_labels().
|
private |
Fills menu items that can be produced or sold
Definition at line 733 of file cityrep.cpp.
Referenced by display_list_menu().
Creates menu labels and id of available cma, stored in list
Definition at line 943 of file cityrep.cpp.
Referenced by display_list_menu().
|
private |
Creates menu labels and id about available production targets
Definition at line 1031 of file cityrep.cpp.
Referenced by display_list_menu(), fill_production_menus(), and gen_select_labels().
|
private |
Creates menu labels for selecting cities
Definition at line 954 of file cityrep.cpp.
Referenced by display_list_menu().
Creates menu labels and info of available worklists, stored in list
Definition at line 1020 of file cityrep.cpp.
Referenced by display_list_menu().
city_model * city_widget::get_model | ( | ) | const |
Returns used model
Definition at line 1204 of file cityrep.cpp.
|
slot |
Hides columns for city widget, depending on stored data (bool spec->show)
Definition at line 1163 of file cityrep.cpp.
Referenced by city_widget().
|
slot |
Inverts selection on report
Definition at line 791 of file cityrep.cpp.
Referenced by gen_select_labels().
|
private |
Restores last selection
Definition at line 327 of file cityrep.cpp.
Referenced by update_city(), and update_model().
|
slot |
Selects all cities on report
Definition at line 775 of file cityrep.cpp.
Referenced by gen_select_labels().
|
slot |
Selects cities building units or buildings or wonders depending on data stored in QAction
Definition at line 902 of file cityrep.cpp.
Referenced by gen_select_labels().
Marks given city selected
Definition at line 818 of file cityrep.cpp.
Referenced by display_list_menu().
|
slot |
Selects coastal cities on report
Definition at line 844 of file cityrep.cpp.
Referenced by gen_select_labels().
|
slot |
Selects no cities on report
Definition at line 783 of file cityrep.cpp.
Referenced by gen_select_labels().
|
slot |
Selects same cities on the same island
Definition at line 871 of file cityrep.cpp.
Referenced by gen_select_labels().
Updates single city
Definition at line 1089 of file cityrep.cpp.
Referenced by city_report::update_city().
void city_widget::update_model | ( | ) |
Updates whole model
Definition at line 1098 of file cityrep.cpp.
Referenced by city_report::update_report().
|
private |
Definition at line 140 of file cityrep.h.
Referenced by city_widget(), and ~city_widget().
|
private |
Definition at line 141 of file cityrep.h.
Referenced by city_widget().
|
private |
Definition at line 139 of file cityrep.h.
Referenced by city_widget(), invert_selection(), restore_selection(), select_building_something(), select_city(), select_coastal(), select_same_island(), update_model(), and ~city_widget().
|
private |
Definition at line 138 of file cityrep.h.
Referenced by city_widget(), display_header_menu(), gen_production_labels(), get_model(), hide_columns(), update_city(), update_model(), and ~city_widget().
Definition at line 164 of file cityrep.h.
Referenced by buy(), center(), cities_selected(), city_view(), clear_worlist(), display_list_menu(), gen_production_labels(), gen_select_labels(), invert_selection(), restore_selection(), and select_same_island().