![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
Displays an icon representing a city. More...
#include <city_icon_widget.h>
Inheritance diagram for freeciv::city_icon_widget:
Collaboration diagram for freeciv::city_icon_widget:Public Member Functions | |
| city_icon_widget (QWidget *parent=nullptr) | |
| Constructor. More... | |
| void | set_city (int city_id) |
| Changes the city displayed by this widget. More... | |
| QSize | sizeHint () const override |
| Reimplemented to pick the size from the tileset. More... | |
| QSize | minimumSizeHint () const override |
| Reimplemented to allow for tiny tileset. More... | |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *event) override |
| Reimplemented to draw the widget. More... | |
| bool | event (QEvent *event) override |
| Reimplemented to handle tileset changes. More... | |
Private Attributes | |
| int | m_city = -1 |
Displays an icon representing a city.
No more functionality.
Definition at line 13 of file city_icon_widget.h.
|
explicit |
Constructor.
Definition at line 27 of file city_icon_widget.cpp.
|
overrideprotected |
Reimplemented to handle tileset changes.
Definition at line 100 of file city_icon_widget.cpp.
Referenced by paintEvent().
|
override |
Reimplemented to allow for tiny tileset.
Definition at line 47 of file city_icon_widget.cpp.
|
overrideprotected |
Reimplemented to draw the widget.
Definition at line 70 of file city_icon_widget.cpp.
| void freeciv::city_icon_widget::set_city | ( | int | city_id | ) |
Changes the city displayed by this widget.
Definition at line 36 of file city_icon_widget.cpp.
|
override |
Reimplemented to pick the size from the tileset.
Definition at line 52 of file city_icon_widget.cpp.
|
private |
Definition at line 29 of file city_icon_widget.h.
Referenced by paintEvent(), set_city(), and sizeHint().