#include <player_target.h>
|
| void | onValueChanged (int oldValue, int newValue) override |
| | Hook for subclasses that need per-value-change feedback (e.g. life-total flash).
|
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
| void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) override |
| void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override |
◆ PlayerCounter()
◆ animationEvent()
| bool PlayerCounter::animationEvent |
( |
| ) |
|
|
overridevirtual |
Advances the item's animation by one timer tick.
- Returns
- true while the animation is still running, false once it has finished.
Implements IAnimatedItem.
◆ boundingRect()
| QRectF PlayerCounter::boundingRect |
( |
| ) |
const |
|
override |
◆ onValueChanged()
| void PlayerCounter::onValueChanged |
( |
int | oldValue, |
|
|
int | newValue ) |
|
overrideprotectedvirtual |
Hook for subclasses that need per-value-change feedback (e.g. life-total flash).
Called whenever the counter's value changes, before the item repaints.
Reimplemented from AbstractCounter.
◆ paint()
| void PlayerCounter::paint |
( |
QPainter * | painter, |
|
|
const QStyleOptionGraphicsItem * | option, |
|
|
QWidget * | widget ) |
|
override |
◆ flashAlpha
| qreal PlayerCounter::flashAlpha = 0.0 |
|
private |
◆ flashClock
| QElapsedTimer PlayerCounter::flashClock |
|
private |
◆ flashDelta
| int PlayerCounter::flashDelta = 0 |
|
private |
◆ flashDurationMs
| qreal PlayerCounter::flashDurationMs = 450.0 |
|
staticconstexprprivate |
The documentation for this class was generated from the following files: