#include <counter_state.h>
|
| void | valueChanged (int oldValue, int newValue, bool skipDamageAnimation) |
| | Emitted whenever the value changes.
|
|
| | CounterState (int id, const QString &name, const QColor &color, int radius, int value, QObject *parent=nullptr) |
| int | getId () const |
| QString | getName () const |
| QColor | getColor () const |
| int | getRadius () const |
| int | getValue () const |
| void | setValue (int newValue, bool skipDamageAnimation=false) |
| | Set the counter value.
|
◆ CounterState()
| CounterState::CounterState |
( |
int | id, |
|
|
const QString & | name, |
|
|
const QColor & | color, |
|
|
int | radius, |
|
|
int | value, |
|
|
QObject * | parent = nullptr ) |
◆ fromProto()
◆ getColor()
| QColor CounterState::getColor |
( |
| ) |
const |
|
inline |
◆ getId()
| int CounterState::getId |
( |
| ) |
const |
|
inline |
◆ getName()
| QString CounterState::getName |
( |
| ) |
const |
|
inline |
◆ getRadius()
| int CounterState::getRadius |
( |
| ) |
const |
|
inline |
◆ getValue()
| int CounterState::getValue |
( |
| ) |
const |
|
inline |
◆ setValue()
| void CounterState::setValue |
( |
int | newValue, |
|
|
bool | skipDamageAnimation = false ) |
Set the counter value.
- Parameters
-
| newValue | The new value. |
| skipDamageAnimation | When true, valueChanged is emitted with skipDamageAnimation=true, letting views suppress damage-related feedback (e.g. battlefield shimmer, life counter flash) for values set during replay rewinds. |
◆ valueChanged
| void CounterState::valueChanged |
( |
int | oldValue, |
|
|
int | newValue, |
|
|
bool | skipDamageAnimation ) |
|
signal |
Emitted whenever the value changes.
- Parameters
-
| oldValue | The previous value. |
| newValue | The new value. |
| skipDamageAnimation | True when the change should not trigger damage/life-change feedback in views. |
◆ color
| QColor CounterState::color |
|
private |
◆ id
◆ name
| QString CounterState::name |
|
private |
◆ radius
◆ value
The documentation for this class was generated from the following files: