Freeciv-3.3: /fast/freeciv/nightly/main/client/gui-qt/citydlg.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
citydlg.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__CITYDLG_H
14#define FC__CITYDLG_H
15
16#ifdef HAVE_CONFIG_H
17#include <fc_config.h>
18#endif
19
20// Qt
21#include <QElapsedTimer>
22#include <QItemDelegate>
23#include <QLabel>
24#include <QProgressBar>
25#include <QTableView>
26#include <QtMath>
27#include <QVariant>
28
29// common
30#include "unittype.h"
31
32// client
33#include "canvas.h"
34
35// gui-qt
36#include "fonts.h"
37#include "dialogs.h"
38
39class QCheckBox;
40class QComboBox;
41class QGridLayout;
42class QGroupBox;
43class QHBoxLayout;
44class QPushButton;
45class QRadioButton;
46class QSplitter;
47class QTableWidget;
48class QVBoxLayout;
49
50#define SPECENUM_NAME city_info
51
52#define SPECENUM_VALUE0 INFO_CITIZEN
53#define SPECENUM_VALUE0NAME N_("Size:")
54#define SPECENUM_VALUE1 INFO_FOOD
55#define SPECENUM_VALUE1NAME N_("Food:")
56#define SPECENUM_VALUE2 INFO_SHIELD
57#define SPECENUM_VALUE2NAME N_("Prod:")
58#define SPECENUM_VALUE3 INFO_TRADE
59#define SPECENUM_VALUE3NAME N_("Trade:")
60#define SPECENUM_VALUE4 INFO_GOLD
61#define SPECENUM_VALUE4NAME N_("Gold:")
62#define SPECENUM_VALUE5 INFO_LUXURY
63#define SPECENUM_VALUE5NAME N_("Luxury:")
64#define SPECENUM_VALUE6 INFO_SCIENCE
65#define SPECENUM_VALUE6NAME N_("Science:")
66#define SPECENUM_VALUE7 INFO_GRANARY
67#define SPECENUM_VALUE7NAME N_("Granary:")
68#define SPECENUM_VALUE8 INFO_GROWTH
69#define SPECENUM_VALUE8NAME N_("Change in:")
70#define SPECENUM_VALUE9 INFO_CORRUPTION
71#define SPECENUM_VALUE9NAME N_("Corruption:")
72#define SPECENUM_VALUE10 INFO_WASTE
73#define SPECENUM_VALUE10NAME N_("Waste:")
74#define SPECENUM_VALUE11 INFO_CULTURE
75#define SPECENUM_VALUE11NAME N_("Culture:")
76#define SPECENUM_VALUE12 INFO_POLLUTION
77#define SPECENUM_VALUE12NAME N_("Pollution:")
78#define SPECENUM_VALUE13 INFO_ILLNESS
79#define SPECENUM_VALUE13NAME N_("Plague risk:")
80#define SPECENUM_VALUE14 INFO_STEAL
81#define SPECENUM_VALUE14NAME N_("Tech Stolen:")
82#define SPECENUM_VALUE15 INFO_AIRLIFT
83#define SPECENUM_VALUE15NAME N_("Airlift:")
84
85#define SPECENUM_COUNT NUM_INFO_FIELDS // number of city_info panel enumerated fields
86#include "specenum_gen.h"
87
88class QImage;
89
90 QString get_tooltip(QVariant qvar);
91 QString get_tooltip_improvement(const impr_type *building,
92 struct city *pcity = nullptr,
93 bool ext = false);
94 QString get_tooltip_unit(const struct unit_type *utype, bool ext = false);
95
96 class fc_tooltip : public QObject
97{
98 Q_OBJECT
99public:
100 explicit fc_tooltip(QObject *parent = nullptr): QObject(parent) {}
101
102protected:
103 bool eventFilter(QObject *obj, QEvent *event);
104};
105
106
107/****************************************************************************
108 Custom progressbar with animated progress and right click event
109****************************************************************************/
110 class progress_bar: public QProgressBar
111{
112 Q_OBJECT
113 QElapsedTimer m_timer;
114signals:
115 void clicked();
116
117public:
118 progress_bar(QWidget *parent);
119 ~progress_bar();
120 void mousePressEvent(QMouseEvent *event) {
121 emit clicked();
122 }
123 void set_pixmap(struct universal *target);
124 void set_pixmap(int n);
125
126protected:
127 void paintEvent(QPaintEvent *event);
128 void timerEvent(QTimerEvent *event);
129 void resizeEvent(QResizeEvent *event);
130private:
131 void create_region();
132 int m_animate_step;
133 QPixmap *pix;
134 QRegion reg;
135 QFont *sfont;
136};
137
138/****************************************************************************
139 Single item on unit_info in city dialog representing one unit
140****************************************************************************/
141 class unit_item: public QLabel
142{
143 Q_OBJECT
144 QAction *disband_action;
145 QAction *change_home;
146 QAction *activate;
147 QAction *activate_and_close;
148 QAction *sentry;
149 QAction *fortify;
150 QAction *load;
151 QAction *unload;
152 QAction *upgrade;
153 QAction *unload_trans;
154 QMenu *unit_menu;
155
156public:
157 unit_item(QWidget *parent, struct unit *punit, bool supp = false,
158 int happy_cost = 0);
159 ~unit_item();
160 void init_pix();
161
162private:
163 struct unit *qunit;
164 QImage unit_img;
165 void contextMenuEvent(QContextMenuEvent *ev);
166 void create_actions();
167 int happy_cost;
168 bool supported;
169
170private slots:
171 void disband();
172 void change_homecity();
173 void activate_unit();
174 void activate_and_close_dialog();
175 void sentry_unit();
176 void fortify_unit();
177 void upgrade_unit();
178 void load_unit();
179 void unload_unit();
180 void unload_all();
181
182protected:
183 void wheelEvent(QWheelEvent *event);
184 void mousePressEvent(QMouseEvent *event);
185 void leaveEvent(QEvent *event);
186#ifndef FC_QT5_MODE
187 void enterEvent(QEnterEvent *event);
188#else // FC_QT5_MODE
189 void enterEvent(QEvent *event);
190#endif // FC_QT5_MODE
191};
192
193/****************************************************************************
194 Shows list of units ( as labels - unit_info )
195****************************************************************************/
196 class unit_info: public QFrame
197{
198
199 Q_OBJECT
200
201public:
202 unit_info(bool supp);
203 ~unit_info();
204 void add_item(unit_item *item);
205 void init_layout();
206 void update_units();
207 void clear_layout();
208 QHBoxLayout *layout;
209 QList<unit_item *> unit_list;
210
211private:
212 bool supports;
213protected:
214 void wheelEvent(QWheelEvent *event);
215};
216
217
218/****************************************************************************
219 Single item on unit_info in city dialog representing one unit
220****************************************************************************/
221 class impr_item: public QLabel
222{
223 Q_OBJECT
224
225public:
226 impr_item(QWidget *parent, const struct impr_type *building, struct city *pcity);
227 ~impr_item();
228 void init_pix();
229
230private:
231 const struct impr_type *impr;
232 struct canvas *impr_pixmap;
233 struct city *dlgcity;
234
235protected:
236 void wheelEvent(QWheelEvent *event);
237 void mouseDoubleClickEvent(QMouseEvent *event);
238 void leaveEvent(QEvent *event);
239#ifndef FC_QT5_MODE
240 void enterEvent(QEnterEvent *event);
241#else // FC_QT5_MODE
242 void enterEvent(QEvent *event);
243#endif // FC_QT5_MODE
244};
245
246
247/****************************************************************************
248 Shows list of improvements
249****************************************************************************/
250 class impr_info: public QFrame
251{
252 Q_OBJECT
253public:
254 impr_info(QWidget *parent);
255 ~impr_info();
256 void add_item(impr_item *item);
257 void init_layout();
258 void update_buildings();
259 void clear_layout();
260 QHBoxLayout *layout;
261 QList<impr_item *> impr_list;
262protected:
263 void wheelEvent(QWheelEvent *event);
264};
265
266/****************************************************************************
267 Class used for showing tiles and workers view in city dialog
268****************************************************************************/
269 class city_map: public QWidget
270{
271
272 Q_OBJECT
273 canvas *view;
274 canvas *miniview;
275 QPixmap zoomed_pixmap;
276
277public:
278 city_map(QWidget *parent);
279 ~city_map();
280 void set_pixmap(struct city *pcity, float z);
281private:
282 void mousePressEvent(QMouseEvent *event);
283 void paintEvent(QPaintEvent *event);
284 struct city *mcity;
285 int radius;
286 float zoom;
287 int wdth;
288 int hight;
289 int cutted_width;
290 int cutted_height;
291 int delta_x;
292 int delta_y;
293protected:
294 QSize sizeHint() const;
295 QSize minimumSizeHint() const;
296private slots:
297 void context_menu(QPoint point);
298};
299
300/****************************************************************************
301 Item delegate for production popup
302****************************************************************************/
303 class city_production_delegate: public QItemDelegate
304{
305 Q_OBJECT
306
307public:
308 city_production_delegate(QPoint sh, QObject *parent, struct city *city);
309 ~city_production_delegate() {}
310 void paint(QPainter *painter, const QStyleOptionViewItem &option,
311 const QModelIndex &index) const;
312 QSize sizeHint(const QStyleOptionViewItem &option,
313 const QModelIndex &index) const;
314
315private:
316 int item_height;
317 QPoint pd;
318 struct city *pcity;
319
320protected:
321 void drawFocus(QPainter *painter, const QStyleOptionViewItem &option,
322 const QRect &rect) const;
323};
324
325/****************************************************************************
326 Single item in production popup
327****************************************************************************/
328 class production_item: public QObject
329{
330 Q_OBJECT
331
332public:
333 production_item(struct universal *ptarget, QObject *parent);
334 ~production_item();
335 inline int columnCount() const {
336 return 1;
337 }
338 QVariant data() const;
339 bool setData();
340
341private:
342 struct universal *target;
343};
344
345/***************************************************************************
346 City production model
347***************************************************************************/
348 class city_production_model : public QAbstractListModel
349{
350 Q_OBJECT
351
352public:
353 city_production_model(struct city *pcity, bool f, bool su, bool sw, bool sb,
354 QObject *parent = nullptr);
355 ~city_production_model();
356 inline int rowCount(const QModelIndex &index = QModelIndex()) const {
357 Q_UNUSED(index);
358 return (qCeil(static_cast<float>(city_target_list.size()) / 3));
359 }
360 int columnCount(const QModelIndex &parent = QModelIndex()) const {
361 Q_UNUSED(parent);
362 return 3;
363 }
364 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
365 bool setData(const QModelIndex &index, const QVariant &value,
366 int role = Qt::DisplayRole);
367 QPoint size_hint();
368 void populate();
369 QPoint sh;
370
371private:
372 QList<production_item *> city_target_list;
373 struct city *mcity;
374 bool future_t;
375 bool show_units;
376 bool show_buildings;
377 bool show_wonders;
378};
379
380/****************************************************************************
381 Class for popup available production
382****************************************************************************/
383 class production_widget: public QTableView
384{
385 Q_OBJECT
386
387 city_production_model *list_model;
388 city_production_delegate *c_p_d;
389
390public:
391 production_widget(QWidget *parent, struct city *pcity, bool future,
392 int when, int curr, bool show_units, bool buy = false,
393 bool show_wonders = true, bool show_buildings = true);
394 ~production_widget();
395
396public slots:
397 void prod_selected(const QItemSelection &sl, const QItemSelection &ds);
398
399protected:
400 void mousePressEvent(QMouseEvent *event);
401 bool eventFilter(QObject *obj, QEvent *ev);
402
403private:
404 struct city *pw_city;
405 int when_change;
406 int curr_selection;
407 bool sh_units;
408 bool buy_it;
409 fc_tooltip *fc_tt;
410};
411
412
413/****************************************************************************
414 city_label is used only for showing citizens icons
415 and was created to catch mouse events
416****************************************************************************/
417 class city_label: public QLabel
418{
419 Q_OBJECT
420
421public:
422 city_label(int type, QWidget *parent = nullptr);
423 void set_city(struct city *pcity);
424
425private:
426 struct city *pcity;
427 int type;
428
429protected:
430 void mousePressEvent(QMouseEvent *event);
431};
432
433/****************************************************************************
434 City dialog
435****************************************************************************/
436class city_dialog: public qfc_dialog
437{
438 Q_OBJECT
439
440 bool happiness_shown;
441 QHBoxLayout *single_page_layout;
442 QHBoxLayout *happiness_layout;
443 QSplitter *prod_unit_splitter;
444 QSplitter *central_left_splitter;
445 QSplitter *central_splitter;
446 QHBoxLayout *leftbot_layout;
447 QWidget *prod_happ_widget;
448 QWidget *top_widget;
449 QVBoxLayout *left_layout;
450 city_map *view;
451 city_label *citizens_label;
452 city_label *lab_table[6];
453 QGridLayout *info_grid_layout;
454 QGroupBox *info_labels_group;
455 QGroupBox *happiness_group;
456 QWidget *happiness_widget;
457 QWidget *info_widget;
458 QLabel *qlt[NUM_INFO_FIELDS];
459 QLabel *cma_info_text;
460 QLabel *cma_result;
461 QLabel *cma_result_pix;
462 QLabel *supp_units;
463 QLabel *curr_units;
464 QLabel *curr_impr;
465 progress_bar *production_combo_p;
466 QTableWidget *p_table_p;
467 QTableWidget *nationality_table;
468 QTableWidget *cma_table;
469 QCheckBox *cma_celeb_checkbox;
470 QCheckBox *cma_max_growth;
471 QCheckBox *future_targets;
472 QCheckBox *show_units;
473 QCheckBox *show_buildings;
474 QCheckBox *show_wonders;
475 QRadioButton *r1, *r2, *r3, *r4;
476 QPushButton *button;
477 QPushButton *buy_button;
478 QPushButton *cma_enable_but;
479 QPushButton *next_city_but;
480 QPushButton *prev_city_but;
481 QPushButton *work_next_but;
482 QPushButton *work_prev_but;
483 QPushButton *work_add_but;
484 QPushButton *work_rem_but;
485 QPushButton *happiness_button;
486 QPushButton *zoom_in_button;
487 QPushButton *zoom_out_button;
488 QPixmap *citizen_pixmap;
489 unit_info *current_units;
490 unit_info *supported_units;
491 impr_info *city_buildings;
492 QPushButton *lcity_name;
493 int selected_row_p;
494 QSlider *slider_tab[2 * O_LAST + 2];
495
496public:
497 city_dialog(QWidget *parent = nullptr);
498 ~city_dialog();
499 void setup_ui(struct city *qcity);
500 void refresh();
501 struct city *dlgcity;
502 int scroll_height;
503 float zoom;
504
505private:
506 int current_building;
507 void update_title();
508 void update_building();
509 void update_info_label();
510 void update_buy_button();
511 void update_citizens();
512 void update_improvements();
513 void update_units();
514 void update_nation_table();
515 void update_cma_tab();
516 void update_disabled();
517 void update_sliders();
518 void update_prod_buttons();
519 void update_happiness_button();
520 void change_production(bool next);
521
522private slots:
523 void next_city();
524 void prev_city();
525 void production_changed(int index);
526 void show_targets();
527 void show_targets_worklist();
528 void show_happiness();
529 void buy();
530 void dbl_click_p(QTableWidgetItem *item);
531 void item_selected(const QItemSelection &sl, const QItemSelection &ds);
532 void clear_worklist();
533 void save_worklist();
534 void worklist_up();
535 void worklist_down();
536 void worklist_del();
537 void display_worklist_menu(const QPoint &p);
538 void disband_state_changed(bool allow_disband);
539 void cma_slider(int val);
540 void cma_toggle_changed(int val);
541 void cma_remove();
542 void cma_enable();
543 void cma_changed();
544 void cma_selected(const QItemSelection &sl, const QItemSelection &ds);
545 void cma_double_clicked(int row, int column);
546 void cma_context_menu(const QPoint &p);
547 void save_cma();
548 void city_rename();
549 void zoom_in();
550 void zoom_out();
551protected:
552 void showEvent(QShowEvent *event);
553 void hideEvent(QHideEvent *event);
554 void closeEvent(QCloseEvent *event);
555 bool eventFilter(QObject *obj, QEvent *event);
556};
557
558void destroy_city_dialog();
559void city_font_update();
560
561#endif // FC__CITYDLG_H
n
#define n
Definition astring.c:77
city_label
Definition citydlg.h:418
city_label::set_city
void set_city(struct city *pcity)
Definition citydlg.cpp:1194
city_label::pcity
struct city * pcity
Definition citydlg.h:426
city_label::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition citydlg.cpp:1170
city_label::type
int type
Definition citydlg.h:427
city_map
Definition citydlg.h:270
city_map::wdth
int wdth
Definition citydlg.h:287
city_map::cutted_height
int cutted_height
Definition citydlg.h:290
city_map::sizeHint
QSize sizeHint() const
Definition citydlg.cpp:1293
city_map::paintEvent
void paintEvent(QPaintEvent *event)
Definition citydlg.cpp:1233
city_map::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition citydlg.cpp:1309
city_map::set_pixmap
void set_pixmap(struct city *pcity, float z)
Definition citydlg.cpp:1257
city_map::context_menu
void context_menu(QPoint point)
Definition citydlg.cpp:1331
city_map::miniview
canvas * miniview
Definition citydlg.h:274
city_map::hight
int hight
Definition citydlg.h:288
city_map::mcity
struct city * mcity
Definition citydlg.h:284
city_map::minimumSizeHint
QSize minimumSizeHint() const
Definition citydlg.cpp:1301
city_map::zoom
float zoom
Definition citydlg.h:286
city_map::~city_map
~city_map()
Definition citydlg.cpp:1224
city_map::zoomed_pixmap
QPixmap zoomed_pixmap
Definition citydlg.h:275
city_map::cutted_width
int cutted_width
Definition citydlg.h:289
city_map::radius
int radius
Definition citydlg.h:285
city_map::view
canvas * view
Definition citydlg.h:273
city_map::delta_y
int delta_y
Definition citydlg.h:292
city_map::delta_x
int delta_x
Definition citydlg.h:291
city_production_delegate
Definition citydlg.h:304
city_production_delegate::pd
QPoint pd
Definition citydlg.h:317
city_production_delegate::paint
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition citydlg.cpp:4042
city_production_delegate::item_height
int item_height
Definition citydlg.h:316
city_production_delegate::sizeHint
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition citydlg.cpp:4198
city_production_delegate::pcity
struct city * pcity
Definition citydlg.h:318
city_production_delegate::drawFocus
void drawFocus(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) const
Definition citydlg.cpp:4181
city_production_delegate::~city_production_delegate
~city_production_delegate()
Definition citydlg.h:309
city_production_model
Definition citydlg.h:349
city_production_model::show_buildings
bool show_buildings
Definition citydlg.h:376
city_production_model::size_hint
QPoint size_hint()
city_production_model::rowCount
int rowCount(const QModelIndex &index=QModelIndex()) const
Definition citydlg.h:356
city_production_model::show_units
bool show_units
Definition citydlg.h:375
city_production_model::city_target_list
QList< production_item * > city_target_list
Definition citydlg.h:372
city_production_model::populate
void populate()
Definition citydlg.cpp:4305
city_production_model::show_wonders
bool show_wonders
Definition citydlg.h:377
city_production_model::~city_production_model
~city_production_model()
Definition citydlg.cpp:4264
city_production_model::setData
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::DisplayRole)
Definition citydlg.cpp:4368
city_production_model::columnCount
int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition citydlg.h:360
city_production_model::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition citydlg.cpp:4273
city_production_model::sh
QPoint sh
Definition citydlg.h:369
city_production_model::mcity
struct city * mcity
Definition citydlg.h:373
city_production_model::future_t
bool future_t
Definition citydlg.h:374
fc_tooltip
Definition citydlg.h:97
fc_tooltip::fc_tooltip
fc_tooltip(QObject *parent=nullptr)
Definition citydlg.h:100
fc_tooltip::eventFilter
bool eventFilter(QObject *obj, QEvent *event)
Definition citydlg.cpp:3808
impr_info
Definition citydlg.h:251
impr_info::update_buildings
void update_buildings()
Definition citydlg.cpp:554
impr_info::layout
QHBoxLayout * layout
Definition citydlg.h:260
impr_info::~impr_info
~impr_info()
Definition citydlg.cpp:494
impr_info::add_item
void add_item(impr_item *item)
Definition citydlg.cpp:502
impr_info::wheelEvent
void wheelEvent(QWheelEvent *event)
Definition citydlg.cpp:535
impr_info::clear_layout
void clear_layout()
Definition citydlg.cpp:510
impr_info::init_layout
void init_layout()
Definition citydlg.cpp:481
impr_info::impr_list
QList< impr_item * > impr_list
Definition citydlg.h:261
impr_item
Definition citydlg.h:222
impr_item::mouseDoubleClickEvent
void mouseDoubleClickEvent(QMouseEvent *event)
Definition citydlg.cpp:606
impr_item::init_pix
void init_pix()
Definition citydlg.cpp:405
impr_item::~impr_item
~impr_item()
Definition citydlg.cpp:395
impr_item::enterEvent
void enterEvent(QEnterEvent *event)
Definition citydlg.cpp:415
impr_item::impr_pixmap
struct canvas * impr_pixmap
Definition citydlg.h:232
impr_item::dlgcity
struct city * dlgcity
Definition citydlg.h:233
impr_item::impr
const struct impr_type * impr
Definition citydlg.h:231
impr_item::leaveEvent
void leaveEvent(QEvent *event)
Definition citydlg.cpp:445
impr_item::wheelEvent
void wheelEvent(QWheelEvent *event)
Definition citydlg.cpp:586
production_item
Definition citydlg.h:329
production_item::target
struct universal * target
Definition citydlg.h:342
production_item::~production_item
~production_item()
Definition citydlg.cpp:4221
production_item::data
QVariant data() const
Definition citydlg.cpp:4232
production_item::setData
bool setData()
Definition citydlg.cpp:4240
production_item::columnCount
int columnCount() const
Definition citydlg.h:335
production_widget
Definition citydlg.h:384
production_widget::~production_widget
~production_widget()
Definition citydlg.cpp:4576
production_widget::eventFilter
bool eventFilter(QObject *obj, QEvent *ev)
Definition citydlg.cpp:4478
production_widget::buy_it
bool buy_it
Definition citydlg.h:408
production_widget::prod_selected
void prod_selected(const QItemSelection &sl, const QItemSelection &ds)
Definition citydlg.cpp:4503
production_widget::when_change
int when_change
Definition citydlg.h:405
production_widget::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition citydlg.cpp:4465
production_widget::list_model
city_production_model * list_model
Definition citydlg.h:387
production_widget::pw_city
struct city * pw_city
Definition citydlg.h:404
production_widget::fc_tt
fc_tooltip * fc_tt
Definition citydlg.h:409
production_widget::sh_units
bool sh_units
Definition citydlg.h:407
production_widget::c_p_d
city_production_delegate * c_p_d
Definition citydlg.h:388
production_widget::curr_selection
int curr_selection
Definition citydlg.h:406
progress_bar
Definition citydlg.h:111
progress_bar::paintEvent
void paintEvent(QPaintEvent *event)
Definition citydlg.cpp:187
progress_bar::m_animate_step
int m_animate_step
Definition citydlg.h:132
progress_bar::resizeEvent
void resizeEvent(QResizeEvent *event)
Definition citydlg.cpp:105
progress_bar::reg
QRegion reg
Definition citydlg.h:134
progress_bar::~progress_bar
~progress_bar()
Definition citydlg.cpp:94
progress_bar::set_pixmap
void set_pixmap(struct universal *target)
Definition citydlg.cpp:113
progress_bar::create_region
void create_region()
Definition citydlg.cpp:325
progress_bar::m_timer
QElapsedTimer m_timer
Definition citydlg.h:113
progress_bar::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition citydlg.h:120
progress_bar::timerEvent
void timerEvent(QTimerEvent *event)
Definition citydlg.cpp:175
progress_bar::pix
QPixmap * pix
Definition citydlg.h:133
progress_bar::sfont
QFont * sfont
Definition citydlg.h:135
progress_bar::clicked
void clicked()
qfc_dialog
Definition dialogs.h:74
unit_info
Definition citydlg.h:197
unit_info::wheelEvent
void wheelEvent(QWheelEvent *event)
Definition citydlg.cpp:1076
unit_info::init_layout
void init_layout()
Definition citydlg.cpp:1064
unit_info::add_item
void add_item(unit_item *item)
Definition citydlg.cpp:1056
unit_info::layout
QHBoxLayout * layout
Definition citydlg.h:208
unit_info::update_units
void update_units()
Definition citydlg.cpp:1095
unit_info::clear_layout
void clear_layout()
Definition citydlg.cpp:1136
unit_info::unit_list
QList< unit_item * > unit_list
Definition citydlg.h:209
unit_info::supports
bool supports
Definition citydlg.h:212
unit_info::~unit_info
~unit_info()
Definition citydlg.cpp:1047
unit_item
Definition citydlg.h:142
unit_item::activate
QAction * activate
Definition citydlg.h:146
unit_item::disband_action
QAction * disband_action
Definition citydlg.h:144
unit_item::enterEvent
void enterEvent(QEnterEvent *event)
Definition citydlg.cpp:965
unit_item::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *ev)
Definition citydlg.cpp:737
unit_item::~unit_item
~unit_item()
Definition citydlg.cpp:730
unit_item::sentry
QAction * sentry
Definition citydlg.h:148
unit_item::qunit
struct unit * qunit
Definition citydlg.h:163
unit_item::activate_and_close
QAction * activate_and_close
Definition citydlg.h:147
unit_item::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition citydlg.cpp:1014
unit_item::happy_cost
int happy_cost
Definition citydlg.h:167
unit_item::change_homecity
void change_homecity()
Definition citydlg.cpp:923
unit_item::unload
QAction * unload
Definition citydlg.h:151
unit_item::upgrade
QAction * upgrade
Definition citydlg.h:152
unit_item::supported
bool supported
Definition citydlg.h:168
unit_item::fortify_unit
void fortify_unit()
Definition citydlg.cpp:954
unit_item::sentry_unit
void sentry_unit()
Definition citydlg.cpp:1027
unit_item::unload_trans
QAction * unload_trans
Definition citydlg.h:153
unit_item::load_unit
void load_unit()
Definition citydlg.cpp:887
unit_item::wheelEvent
void wheelEvent(QWheelEvent *event)
Definition citydlg.cpp:994
unit_item::load
QAction * load
Definition citydlg.h:150
unit_item::activate_unit
void activate_unit()
Definition citydlg.cpp:944
unit_item::unit_menu
QMenu * unit_menu
Definition citydlg.h:154
unit_item::change_home
QAction * change_home
Definition citydlg.h:145
unit_item::fortify
QAction * fortify
Definition citydlg.h:149
unit_item::unit_img
QImage unit_img
Definition citydlg.h:164
unit_item::create_actions
void create_actions()
Definition citydlg.cpp:791
unit_item::unload_all
void unload_all()
Definition citydlg.cpp:903
unit_item::disband
void disband()
Definition citydlg.cpp:869
unit_item::upgrade_unit
void upgrade_unit()
Definition citydlg.cpp:911
unit_item::init_pix
void init_pix()
Definition citydlg.cpp:721
unit_item::leaveEvent
void leaveEvent(QEvent *event)
Definition citydlg.cpp:986
unit_item::unload_unit
void unload_unit()
Definition citydlg.cpp:895
unit_item::activate_and_close_dialog
void activate_and_close_dialog()
Definition citydlg.cpp:933
incite_cost
char * incite_cost
Definition comments.c:74
punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition dialogs_g.h:74
event
enum event_type event
Definition events.c:81
O_LAST
@ O_LAST
Definition fc_types.h:101
fonts.h
NUM_INFO_FIELDS
@ NUM_INFO_FIELDS
Definition citydlg.c:123
get_tooltip_improvement
QString get_tooltip_improvement(const impr_type *building, struct city *pcity=nullptr, bool ext=false)
Definition citydlg.cpp:3862
get_tooltip_unit
QString get_tooltip_unit(const struct unit_type *utype, bool ext=false)
Definition citydlg.cpp:3921
city_font_update
void city_font_update()
Definition citydlg.cpp:3751
get_tooltip
QString get_tooltip(QVariant qvar)
Definition citydlg.cpp:3991
destroy_city_dialog
void destroy_city_dialog()
Definition citydlg.cpp:3704
canvas.h
dialogs.h
slots
struct player_slot * slots
Definition player.c:51
specenum_gen.h
canvas
Definition canvas.h:22
city_dialog
Definition citydlg.c:137
city_dialog::setup_ui
void setup_ui(struct city *qcity)
Definition citydlg.cpp:3129
city_dialog::current_building
int current_building
Definition citydlg.h:506
city_dialog::worklist_up
void worklist_up()
Definition citydlg.cpp:3559
city_dialog::citizens_label
city_label * citizens_label
Definition citydlg.h:451
city_dialog::info_labels_group
QGroupBox * info_labels_group
Definition citydlg.h:454
city_dialog::lcity_name
QPushButton * lcity_name
Definition citydlg.h:492
city_dialog::show_happiness
void show_happiness()
Definition citydlg.cpp:2092
city_dialog::closeEvent
void closeEvent(QCloseEvent *event)
Definition citydlg.cpp:2242
city_dialog::info_widget
QWidget * info_widget
Definition citydlg.h:457
city_dialog::update_nation_table
void update_nation_table()
Definition citydlg.cpp:2931
city_dialog::hideEvent
void hideEvent(QHideEvent *event)
Definition citydlg.cpp:2214
city_dialog::work_next_but
QPushButton * work_next_but
Definition citydlg.h:481
city_dialog::next_city
void next_city()
Definition citydlg.cpp:3238
city_dialog::production_combo_p
progress_bar * production_combo_p
Definition citydlg.h:465
city_dialog::nationality_table
QTableWidget * nationality_table
Definition citydlg.h:467
city_dialog::r3
QRadioButton * r3
Definition citydlg.h:475
city_dialog::cma_table
QTableWidget * cma_table
Definition citydlg.h:468
city_dialog::showEvent
void showEvent(QShowEvent *event)
Definition citydlg.cpp:2225
city_dialog::happiness_button
QPushButton * happiness_button
Definition citydlg.h:485
city_dialog::buy
void buy()
Definition citydlg.cpp:3339
city_dialog::cma_double_clicked
void cma_double_clicked(int row, int column)
Definition citydlg.cpp:2418
city_dialog::display_worklist_menu
void display_worklist_menu(const QPoint &p)
Definition citydlg.cpp:2689
city_dialog::update_disabled
void update_disabled()
Definition citydlg.cpp:2121
city_dialog::supp_units
QLabel * supp_units
Definition citydlg.h:462
city_dialog::next_city_but
QPushButton * next_city_but
Definition citydlg.h:479
city_dialog::qlt
QLabel * qlt[NUM_INFO_FIELDS]
Definition citydlg.h:458
city_dialog::work_prev_but
QPushButton * work_prev_but
Definition citydlg.h:482
city_dialog::supported_units
unit_info * supported_units
Definition citydlg.h:490
city_dialog::single_page_layout
QHBoxLayout * single_page_layout
Definition citydlg.h:441
city_dialog::update_buy_button
void update_buy_button()
Definition citydlg.cpp:2789
city_dialog::selected_row_p
int selected_row_p
Definition citydlg.h:493
city_dialog::leftbot_layout
QHBoxLayout * leftbot_layout
Definition citydlg.h:446
city_dialog::update_building
void update_building()
Definition citydlg.cpp:3310
city_dialog::zoom_in_button
QPushButton * zoom_in_button
Definition citydlg.h:486
city_dialog::save_worklist
void save_worklist()
Definition citydlg.cpp:3625
city_dialog::worklist_del
void worklist_del()
Definition citydlg.cpp:3584
city_dialog::info_grid_layout
QGridLayout * info_grid_layout
Definition citydlg.h:453
city_dialog::clear_worklist
void clear_worklist()
Definition citydlg.cpp:3544
city_dialog::happiness_shown
bool happiness_shown
Definition citydlg.h:440
city_dialog::city_buildings
impr_info * city_buildings
Definition citydlg.h:491
city_dialog::curr_impr
QLabel * curr_impr
Definition citydlg.h:464
city_dialog::lab_table
city_label * lab_table[6]
Definition citydlg.h:452
city_dialog::scroll_height
int scroll_height
Definition citydlg.h:502
city_dialog::curr_units
QLabel * curr_units
Definition citydlg.h:463
city_dialog::current_units
unit_info * current_units
Definition citydlg.h:489
city_dialog::zoom_out
void zoom_out()
Definition citydlg.cpp:2333
city_dialog::~city_dialog
~city_dialog()
Definition citydlg.cpp:2188
city_dialog::zoom_in
void zoom_in()
Definition citydlg.cpp:2320
city_dialog::zoom_out_button
QPushButton * zoom_out_button
Definition citydlg.h:487
city_dialog::update_info_label
void update_info_label()
Definition citydlg.cpp:3008
city_dialog::work_add_but
QPushButton * work_add_but
Definition citydlg.h:483
city_dialog::central_left_splitter
QSplitter * central_left_splitter
Definition citydlg.h:444
city_dialog::disband_state_changed
void disband_state_changed(bool allow_disband)
Definition citydlg.cpp:2649
city_dialog::update_citizens
void update_citizens()
Definition citydlg.cpp:2815
city_dialog::r1
QRadioButton * r1
Definition citydlg.h:475
city_dialog::cma_slider
void cma_slider(int val)
Definition citydlg.cpp:2624
city_dialog::view
city_map * view
Definition citydlg.h:450
city_dialog::cma_celeb_checkbox
QCheckBox * cma_celeb_checkbox
Definition citydlg.h:469
city_dialog::show_units
QCheckBox * show_units
Definition citydlg.h:472
city_dialog::worklist_down
void worklist_down()
Definition citydlg.cpp:3601
city_dialog::update_title
void update_title()
Definition citydlg.cpp:3656
city_dialog::cma_info_text
QLabel * cma_info_text
Definition citydlg.h:459
city_dialog::dbl_click_p
void dbl_click_p(QTableWidgetItem *item)
Definition citydlg.cpp:3145
city_dialog::cma_enable_but
QPushButton * cma_enable_but
Definition citydlg.h:478
city_dialog::cma_result
QLabel * cma_result
Definition citydlg.h:460
city_dialog::cma_remove
void cma_remove()
Definition citydlg.cpp:2586
city_dialog::slider_tab
QSlider * slider_tab[2 *O_LAST+2]
Definition citydlg.h:494
city_dialog::button
QPushButton * button
Definition citydlg.h:476
city_dialog::eventFilter
bool eventFilter(QObject *obj, QEvent *event)
Definition citydlg.cpp:2253
city_dialog::prod_unit_splitter
QSplitter * prod_unit_splitter
Definition citydlg.h:443
city_dialog::left_layout
QVBoxLayout * left_layout
Definition citydlg.h:449
city_dialog::prev_city
void prev_city()
Definition citydlg.cpp:3274
city_dialog::city_rename
void city_rename()
Definition citydlg.cpp:2290
city_dialog::refresh
void refresh()
Definition citydlg.cpp:2899
city_dialog::update_cma_tab
void update_cma_tab()
Definition citydlg.cpp:2519
city_dialog::work_rem_but
QPushButton * work_rem_but
Definition citydlg.h:484
city_dialog::zoom
float zoom
Definition citydlg.h:503
city_dialog::central_splitter
QSplitter * central_splitter
Definition citydlg.h:445
city_dialog::prod_happ_widget
QWidget * prod_happ_widget
Definition citydlg.h:447
city_dialog::cma_toggle_changed
void cma_toggle_changed(int val)
Definition citydlg.cpp:2613
city_dialog::show_targets
void show_targets()
Definition citydlg.cpp:3513
city_dialog::top_widget
QWidget * top_widget
Definition citydlg.h:448
city_dialog::update_happiness_button
void update_happiness_button()
Definition citydlg.cpp:2080
city_dialog::prev_city_but
QPushButton * prev_city_but
Definition citydlg.h:480
city_dialog::cma_enable
void cma_enable()
Definition citydlg.cpp:2382
city_dialog::cma_result_pix
QLabel * cma_result_pix
Definition citydlg.h:461
city_dialog::dlgcity
struct city * dlgcity
Definition citydlg.h:501
city_dialog::update_sliders
void update_sliders()
Definition citydlg.cpp:2467
city_dialog::update_improvements
void update_improvements()
Definition citydlg.cpp:3378
city_dialog::happiness_layout
QHBoxLayout * happiness_layout
Definition citydlg.h:442
city_dialog::future_targets
QCheckBox * future_targets
Definition citydlg.h:471
city_dialog::change_production
void change_production(bool next)
Definition citydlg.cpp:2035
city_dialog::cma_selected
void cma_selected(const QItemSelection &sl, const QItemSelection &ds)
Definition citydlg.cpp:2437
city_dialog::cma_max_growth
QCheckBox * cma_max_growth
Definition citydlg.h:470
city_dialog::item_selected
void item_selected(const QItemSelection &sl, const QItemSelection &ds)
Definition citydlg.cpp:3220
city_dialog::show_targets_worklist
void show_targets_worklist()
Definition citydlg.cpp:3529
city_dialog::show_wonders
QCheckBox * show_wonders
Definition citydlg.h:474
city_dialog::cma_context_menu
void cma_context_menu(const QPoint &p)
Definition citydlg.cpp:2669
city_dialog::cma_changed
void cma_changed()
Definition citydlg.cpp:2397
city_dialog::buy_button
QPushButton * buy_button
Definition citydlg.h:477
city_dialog::r4
QRadioButton * r4
Definition citydlg.h:475
city_dialog::update_units
void update_units()
Definition citydlg.cpp:3162
city_dialog::r2
QRadioButton * r2
Definition citydlg.h:475
city_dialog::p_table_p
QTableWidget * p_table_p
Definition citydlg.h:466
city_dialog::save_cma
void save_cma()
Definition citydlg.cpp:2346
city_dialog::citizen_pixmap
QPixmap * citizen_pixmap
Definition citydlg.h:488
city_dialog::production_changed
void production_changed(int index)
Definition citydlg.cpp:3495
city_dialog::update_prod_buttons
void update_prod_buttons()
Definition citydlg.cpp:2158
city_dialog::happiness_widget
QWidget * happiness_widget
Definition citydlg.h:456
city_dialog::happiness_group
QGroupBox * happiness_group
Definition citydlg.h:455
city_dialog::show_buildings
QCheckBox * show_buildings
Definition citydlg.h:473
city
Definition city.h:320
impr_type
Definition improvement.h:50
item
Definition climisc.h:80
option
Definition options.c:514
unit_type
Definition unittype.h:507
unit
Definition unit.h:140
universal
Definition fc_types.h:878
unittype.h