![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <citydlg.h>
Inheritance diagram for city_dialog:
Collaboration diagram for city_dialog:Public Member Functions | |
| city_dialog (QWidget *parent=0) | |
| Constructor for city_dialog, sets layouts, policies ... More... | |
| ~city_dialog () override | |
| City dialog destructor. More... | |
| void | setup_ui (struct city *qcity) |
| Setups whole city dialog, public function. More... | |
| void | refresh () |
| Various refresh after getting new info/reply from server. More... | |
Public Attributes | |
| struct city * | pcity = nullptr |
| bool | dont_focus {false} |
| bool | present_units_exp = false |
Protected Member Functions | |
| void | showEvent (QShowEvent *event) override |
| Show event. More... | |
| void | hideEvent (QHideEvent *event) override |
| Hide event. More... | |
| bool | eventFilter (QObject *obj, QEvent *event) override |
| Event filter for catching keybaord events. More... | |
Private Slots | |
| void | next_city () |
| Changes city_dialog to next city after pushing next city button. More... | |
| void | prev_city () |
| Changes city_dialog to previous city after pushing prev city button. More... | |
| void | get_city (bool next) |
| void | show_targets () |
| Shows customized table widget with available items to produce Shows default targets in overview city page. More... | |
| void | show_targets_worklist () |
| Shows customized table widget with available items to produce Shows customized targets in city production page. More... | |
| void | buy () |
| Buy button. More... | |
| void | dbl_click_p (QTableWidgetItem *item) |
| Double clicked item in worklist table in production tab. More... | |
| void | item_selected (const QItemSelection &sl, const QItemSelection &ds) |
| Selection changed in production tab, in worklist tab. More... | |
| void | clear_worklist () |
| Clears worklist in production page. More... | |
| void | save_worklist () |
| Save worklist. More... | |
| void | worklist_up () |
| Move current item on worklist up. More... | |
| void | worklist_down () |
| Move current item on worklist down. More... | |
| void | worklist_del () |
| Remove current item on worklist. More... | |
| void | display_worklist_menu (const QPoint) |
| Context menu on production tab in city worklist. More... | |
| void | disband_state_changed (bool allow_disband) |
| Received signal about changed qcheckbox - allow disbanding city. More... | |
| void | cma_remove () |
| Removes selected CMA. More... | |
| void | cma_enable () |
| Enables cma slot, triggered by clicked button or changed cma. More... | |
| void | cma_changed () |
| Sliders moved and cma has been changed. More... | |
| void | cma_check_agent (const cm_parameter ¶ms) |
| Triggers a governor update if the parameters changed. More... | |
| void | cma_selected (const QItemSelection &sl, const QItemSelection &ds) |
| CMA has been selected from list. More... | |
| void | cma_double_clicked (int row, int column) |
| Double click on some row ( column is unused ) More... | |
| void | cma_context_menu (const QPoint p) |
| Context menu on governor tab in city worklist. More... | |
| void | save_cma () |
| Save cma dialog input. More... | |
| void | city_rename () |
| City rename dialog input. More... | |
| void | present_units_exp_col () |
| Slot to expand or collapse the present units list. More... | |
Private Member Functions | |
| Q_DISABLE_COPY (city_dialog) | |
| void | update_title () |
| Puts city name and people count on title. More... | |
| void | update_building () |
| Updates building improvement/unit. More... | |
| void | update_info_label () |
| Updates information label ( food, prod ... More... | |
| void | update_buy_button () |
| Enables/disables buy buttons depending on gold. More... | |
| void | fill_citizens_pixmap (QPixmap *pixmap, QPainter *painter, const citizen_category *categories, int num_citizens) |
| Fill a pixmap with citizen sprites. More... | |
| void | update_citizens () |
| Redraws citizens for city_label (citizens_label) More... | |
| void | update_improvements () |
| Updates list of improvements. More... | |
| void | update_units () |
| Updates layouts for supported and present units in city. More... | |
| void | update_nation_table () |
| Updates nationality table in happiness tab. More... | |
| void | update_cma_tab () |
| Updates cma tab. More... | |
| void | update_disabled () |
| Updates buttons/widgets which should be enabled/disabled. More... | |
| void | update_sliders () |
| void | update_prod_buttons () |
| Update sensitivity of buttons in production tab. More... | |
| void | change_production (bool next) |
| Changes production to next one or previous. More... | |
Private Attributes | |
| Ui::FormCityDlg | ui |
| QPixmap * | citizen_pixmap |
| bool | future_targets {false} |
| bool | show_units {true} |
| bool | show_wonders {true} |
| bool | show_buildings {true} |
| int | selected_row_p |
| city_label * | lab_table [6] |
| city_dialog::city_dialog | ( | QWidget * | parent = 0 | ) |
Constructor for city_dialog, sets layouts, policies ...
Definition at line 833 of file citydlg.cpp.
|
override |
City dialog destructor.
Definition at line 1059 of file citydlg.cpp.
|
privateslot |
Buy button.
Shows message box asking for confirmation
Definition at line 1921 of file citydlg.cpp.
Referenced by city_dialog().
|
private |
Changes production to next one or previous.
Definition at line 972 of file citydlg.cpp.
Referenced by eventFilter().
|
privateslot |
|
privateslot |
Clears worklist in production page.
Definition at line 2087 of file citydlg.cpp.
Referenced by display_worklist_menu().
|
privateslot |
Sliders moved and cma has been changed.
Definition at line 1193 of file citydlg.cpp.
Referenced by cma_check_agent(), and cma_enable().
|
privateslot |
Triggers a governor update if the parameters changed.
Definition at line 2197 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Context menu on governor tab in city worklist.
Definition at line 1361 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Double click on some row ( column is unused )
Definition at line 1202 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Enables cma slot, triggered by clicked button or changed cma.
Definition at line 1179 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Removes selected CMA.
Definition at line 1315 of file citydlg.cpp.
Referenced by cma_context_menu().
|
privateslot |
CMA has been selected from list.
Definition at line 1221 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Double clicked item in worklist table in production tab.
Definition at line 1753 of file citydlg.cpp.
Referenced by city_dialog(), and worklist_del().
|
privateslot |
Received signal about changed qcheckbox - allow disbanding city.
Definition at line 1341 of file citydlg.cpp.
Referenced by display_worklist_menu().
|
privateslot |
Context menu on production tab in city worklist.
Definition at line 1380 of file citydlg.cpp.
Referenced by city_dialog().
|
overrideprotected |
Event filter for catching keybaord events.
Definition at line 1105 of file citydlg.cpp.
|
private |
Fill a pixmap with citizen sprites.
Definition at line 1513 of file citydlg.cpp.
Referenced by update_citizens().
|
privateslot |
Definition at line 1850 of file citydlg.cpp.
Referenced by next_city(), and prev_city().
|
overrideprotected |
Hide event.
Definition at line 1068 of file citydlg.cpp.
|
privateslot |
Selection changed in production tab, in worklist tab.
Definition at line 1834 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Changes city_dialog to next city after pushing next city button.
Definition at line 1883 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Slot to expand or collapse the present units list.
Definition at line 1812 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Changes city_dialog to previous city after pushing prev city button.
Definition at line 1888 of file citydlg.cpp.
Referenced by city_dialog().
|
private |
| void city_dialog::refresh | ( | ) |
Various refresh after getting new info/reply from server.
Definition at line 1597 of file citydlg.cpp.
Referenced by pageGame::pageGame(), real_city_dialog_refresh(), and setup_ui().
|
privateslot |
|
privateslot |
| void city_dialog::setup_ui | ( | struct city * | qcity | ) |
Setups whole city dialog, public function.
Definition at line 1733 of file citydlg.cpp.
Referenced by get_city().
|
privateslot |
Shows customized table widget with available items to produce Shows default targets in overview city page.
Definition at line 2060 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Shows customized table widget with available items to produce Shows customized targets in city production page.
Definition at line 2074 of file citydlg.cpp.
Referenced by city_dialog().
|
overrideprotected |
Show event.
Definition at line 1088 of file citydlg.cpp.
|
private |
Updates building improvement/unit.
Definition at line 1893 of file citydlg.cpp.
Referenced by refresh().
|
private |
Enables/disables buy buttons depending on gold.
Definition at line 1488 of file citydlg.cpp.
Referenced by refresh().
|
private |
Redraws citizens for city_label (citizens_label)
Definition at line 1537 of file citydlg.cpp.
Referenced by refresh().
|
private |
Updates cma tab.
Definition at line 1256 of file citydlg.cpp.
Referenced by cma_check_agent(), cma_double_clicked(), cma_enable(), cma_remove(), cma_selected(), and refresh().
|
private |
Updates buttons/widgets which should be enabled/disabled.
Definition at line 1015 of file citydlg.cpp.
Referenced by refresh().
|
private |
|
private |
Updates information label ( food, prod ...
surpluses ...)
Definition at line 1723 of file citydlg.cpp.
Referenced by refresh().
|
private |
Updates nationality table in happiness tab.
Definition at line 1650 of file citydlg.cpp.
Referenced by refresh().
|
private |
Update sensitivity of buttons in production tab.
Definition at line 1030 of file citydlg.cpp.
Referenced by item_selected(), update_disabled(), and worklist_del().
|
private |
Definition at line 1634 of file citydlg.cpp.
Referenced by cma_selected(), and update_cma_tab().
|
private |
Puts city name and people count on title.
Definition at line 2209 of file citydlg.cpp.
Referenced by refresh().
|
private |
Updates layouts for supported and present units in city.
Definition at line 1770 of file citydlg.cpp.
Referenced by refresh().
|
privateslot |
Remove current item on worklist.
Definition at line 2126 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Move current item on worklist down.
Definition at line 2142 of file citydlg.cpp.
Referenced by city_dialog().
|
privateslot |
Move current item on worklist up.
Definition at line 2102 of file citydlg.cpp.
Referenced by city_dialog().
|
private |
Definition at line 287 of file citydlg.h.
Referenced by city_dialog(), fill_citizens_pixmap(), update_citizens(), and ~city_dialog().
| bool city_dialog::dont_focus {false} |
Definition at line 300 of file citydlg.h.
Referenced by unit_list_widget::activate(), hideEvent(), freeciv::upkeep_widget::item_double_clicked(), and showEvent().
|
private |
Definition at line 288 of file citydlg.h.
Referenced by display_worklist_menu(), show_targets(), and show_targets_worklist().
|
private |
Definition at line 291 of file citydlg.h.
Referenced by city_dialog(), and update_citizens().
| struct city* city_dialog::pcity = nullptr |
Definition at line 299 of file citydlg.h.
Referenced by buy(), change_production(), city_dialog(), city_dialog_is_open(), city_rename(), clear_worklist(), cma_changed(), cma_check_agent(), cma_double_clicked(), cma_enable(), cma_selected(), dbl_click_p(), disband_state_changed(), display_worklist_menu(), fill_citizens_pixmap(), get_city(), hideEvent(), refresh(), save_worklist(), setup_ui(), show_targets(), show_targets_worklist(), showEvent(), update_building(), update_buy_button(), update_citizens(), update_cma_tab(), update_disabled(), update_improvements(), update_info_label(), update_nation_table(), update_prod_buttons(), update_sliders(), update_title(), update_units(), worklist_down(), and worklist_up().
| bool city_dialog::present_units_exp = false |
Definition at line 301 of file citydlg.h.
Referenced by present_units_exp_col(), and update_units().
|
private |
Definition at line 290 of file citydlg.h.
Referenced by city_dialog(), dbl_click_p(), display_worklist_menu(), item_selected(), show_targets(), show_targets_worklist(), update_prod_buttons(), worklist_del(), worklist_down(), and worklist_up().
|
private |
Definition at line 289 of file citydlg.h.
Referenced by display_worklist_menu(), show_targets(), and show_targets_worklist().
|
private |
Definition at line 288 of file citydlg.h.
Referenced by display_worklist_menu(), show_targets(), and show_targets_worklist().
|
private |
Definition at line 288 of file citydlg.h.
Referenced by display_worklist_menu(), show_targets(), and show_targets_worklist().
|
private |
Definition at line 286 of file citydlg.h.
Referenced by city_dialog(), cma_changed(), cma_remove(), cma_selected(), present_units_exp_col(), refresh(), setup_ui(), update_building(), update_buy_button(), update_citizens(), update_cma_tab(), update_disabled(), update_improvements(), update_info_label(), update_nation_table(), update_prod_buttons(), update_sliders(), update_title(), update_units(), worklist_del(), worklist_down(), and worklist_up().