![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
Widget used to display the demographics, top 5 cities, and travelers' reports. More...
#include <report_widget.h>
Inheritance diagram for freeciv::report_widget:
Collaboration diagram for freeciv::report_widget:Public Member Functions | |
| report_widget (const QString &caption, const QString &headline, const QString &lines, QWidget *parent=nullptr) | |
| Creates a report widget displaying the provided text. More... | |
| ~report_widget () override=default | |
| QString | caption () const |
| Returns back the caption passed to the constructor. More... | |
| QString | headline () const |
| Returns back the headline passed to the constructor. More... | |
| void | update_menu () override |
| Called when the close button is pressed. More... | |
Public Member Functions inherited from fcwidget | |
| fcwidget (QWidget *parent=nullptr) | |
| Constructor. More... | |
Protected Member Functions | |
| void | mousePressEvent (QMouseEvent *event) override |
| Reimplemented to let the user drag the widget. More... | |
| void | mouseMoveEvent (QMouseEvent *event) override |
| Reimplemented to let the user drag the widget. More... | |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| Reimplemented to let the user drag the widget. More... | |
| bool | event (QEvent *event) override |
| Overridden to handle font changes. More... | |
Private Attributes | |
| QString | m_caption |
| QString | m_headline |
| QPoint | m_cursor |
| QLabel * | m_contents |
Widget used to display the demographics, top 5 cities, and travelers' reports.
Definition at line 20 of file report_widget.h.
| freeciv::report_widget::report_widget | ( | const QString & | caption, |
| const QString & | headline, | ||
| const QString & | lines, | ||
| QWidget * | parent = nullptr |
||
| ) |
Creates a report widget displaying the provided text.
Definition at line 31 of file report_widget.cpp.
|
overridedefault |
|
inline |
Returns back the caption passed to the constructor.
Definition at line 29 of file report_widget.h.
Referenced by report_widget().
|
overrideprotected |
Overridden to handle font changes.
Definition at line 87 of file report_widget.cpp.
Referenced by mouseMoveEvent(), and mouseReleaseEvent().
|
inline |
Returns back the headline passed to the constructor.
Definition at line 32 of file report_widget.h.
Referenced by report_widget().
|
overrideprotected |
Reimplemented to let the user drag the widget.
Definition at line 69 of file report_widget.cpp.
|
overrideprotected |
Reimplemented to let the user drag the widget.
Definition at line 61 of file report_widget.cpp.
|
overrideprotected |
Reimplemented to let the user drag the widget.
Definition at line 78 of file report_widget.cpp.
|
overridevirtual |
Called when the close button is pressed.
Implements fcwidget.
Definition at line 102 of file report_widget.cpp.
|
private |
Definition at line 43 of file report_widget.h.
Referenced by caption().
|
private |
Definition at line 45 of file report_widget.h.
Referenced by event(), and report_widget().
|
private |
Definition at line 44 of file report_widget.h.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
private |
Definition at line 43 of file report_widget.h.
Referenced by headline().