![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <top_bar.h>
Inheritance diagram for top_bar_widget:
Collaboration diagram for top_bar_widget:Public Slots | |
| void | sblink () |
| Blinks current top_bar widget. More... | |
| void | someSlot () |
| Miscelanous slot, helping observe players currently, and changing science extra functionality might be added, eg by setting properties. More... | |
Public Member Functions | |
| top_bar_widget (const QString &label, const QString &pg, pfcn func) | |
| Sidewidget constructor. More... | |
| ~top_bar_widget () override | |
| Sidewidget destructor. More... | |
| int | getPriority () |
| QPixmap * | get_pixmap () |
| void | paint (QPainter *painter, QPaintEvent *event) |
| void | setCustomLabels (const QString &) |
| Sets custom text visible on top of sidewidget. More... | |
| void | setLabel (const QString &str) |
| void | setLeftClick (pfcn func) |
| Sets callback for mouse left click. More... | |
| void | setRightClick (pfcn func) |
| Sets callback for mouse right click. More... | |
| void | setWheelDown (pfcn func) |
| Sets callback for mouse wheel down. More... | |
| void | setWheelUp (pfcn func) |
| Sets callback for mouse wheel up. More... | |
Public Attributes | |
| bool | blink |
| bool | keep_blinking |
| QString | page |
Protected Member Functions | |
| void | mousePressEvent (QMouseEvent *event) override |
| Mouse press event for sidewidget. More... | |
| void | paintEvent (QPaintEvent *event) override |
| Paint event for top bar widget. More... | |
| void | wheelEvent (QWheelEvent *event) override |
| Mouse wheel event. More... | |
Private Attributes | |
| pfcn | right_click |
| pfcn | wheel_down |
| pfcn | wheel_up |
| pfcn | left_click |
| QTimer * | timer |
| top_bar_widget::top_bar_widget | ( | const QString & | label, |
| const QString & | pg, | ||
| pfcn | func | ||
| ) |
Sidewidget constructor.
Definition at line 197 of file top_bar.cpp.
|
override |
Sidewidget destructor.
Definition at line 218 of file top_bar.cpp.
| QPixmap* top_bar_widget::get_pixmap | ( | ) |
| int top_bar_widget::getPriority | ( | ) |
|
overrideprotected |
Mouse press event for sidewidget.
Definition at line 272 of file top_bar.cpp.
| void top_bar_widget::paint | ( | QPainter * | painter, |
| QPaintEvent * | event | ||
| ) |
|
overrideprotected |
Paint event for top bar widget.
Definition at line 228 of file top_bar.cpp.
|
slot |
Blinks current top_bar widget.
Definition at line 302 of file top_bar.cpp.
Referenced by real_science_report_dialog_update(), and top_bar_widget().
| void top_bar_widget::setCustomLabels | ( | const QString & | l | ) |
Sets custom text visible on top of sidewidget.
Definition at line 223 of file top_bar.cpp.
Referenced by real_science_report_dialog_update(), and pageGame::updateInfoLabelTimeout().
| void top_bar_widget::setLabel | ( | const QString & | str | ) |
| void top_bar_widget::setLeftClick | ( | pfcn | func | ) |
Sets callback for mouse left click.
Definition at line 252 of file top_bar.cpp.
| void top_bar_widget::setRightClick | ( | pfcn | func | ) |
Sets callback for mouse right click.
Definition at line 257 of file top_bar.cpp.
Referenced by pageGame::pageGame().
| void top_bar_widget::setWheelDown | ( | pfcn | func | ) |
Sets callback for mouse wheel down.
Definition at line 262 of file top_bar.cpp.
Referenced by pageGame::pageGame().
| void top_bar_widget::setWheelUp | ( | pfcn | func | ) |
Sets callback for mouse wheel up.
Definition at line 267 of file top_bar.cpp.
Referenced by pageGame::pageGame().
|
slot |
Miscelanous slot, helping observe players currently, and changing science extra functionality might be added, eg by setting properties.
Definition at line 323 of file top_bar.cpp.
Referenced by top_bar_right_click_diplomacy(), and top_bar_right_click_science().
|
overrideprotected |
Mouse wheel event.
Definition at line 288 of file top_bar.cpp.
| bool top_bar_widget::blink |
Definition at line 82 of file top_bar.h.
Referenced by paintEvent(), and sblink().
| bool top_bar_widget::keep_blinking |
Definition at line 83 of file top_bar.h.
Referenced by real_science_report_dialog_update(), and sblink().
|
private |
Definition at line 98 of file top_bar.h.
Referenced by mousePressEvent(), and setLeftClick().
| QString top_bar_widget::page |
Definition at line 84 of file top_bar.h.
Referenced by paintEvent().
|
private |
Definition at line 95 of file top_bar.h.
Referenced by mousePressEvent(), and setRightClick().
|
private |
Definition at line 99 of file top_bar.h.
Referenced by sblink(), top_bar_widget(), and ~top_bar_widget().
|
private |
Definition at line 96 of file top_bar.h.
Referenced by setWheelDown(), and wheelEvent().
|
private |
Definition at line 97 of file top_bar.h.
Referenced by setWheelUp(), and wheelEvent().