Notify when meter's value changes
This commit is contained in:
parent
317510047d
commit
12e7e6f612
@ -325,6 +325,7 @@ void Meter::setValue(int value)
|
||||
d->animation->setEndValue(value);
|
||||
d->animation->start();
|
||||
}
|
||||
emit valueChanged(value);
|
||||
}
|
||||
|
||||
int MeterPrivate::meterValue() const
|
||||
|
@ -57,7 +57,7 @@ class PLASMA_EXPORT Meter : public QGraphicsWidget
|
||||
Q_ENUMS(MeterType)
|
||||
Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
|
||||
Q_PROPERTY(int maximum READ maximum WRITE setMaximum)
|
||||
Q_PROPERTY(int value READ value WRITE setValue)
|
||||
Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
|
||||
Q_PROPERTY(QString svg READ svg WRITE setSvg)
|
||||
Q_PROPERTY(MeterType meterType READ meterType WRITE setMeterType)
|
||||
|
||||
@ -201,6 +201,13 @@ public Q_SLOTS:
|
||||
*/
|
||||
void setValue(int value);
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
* This signal is sent when the value of the meter changes programmatically.
|
||||
* The meter's value is passed.
|
||||
*/
|
||||
void valueChanged(const int &value);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Reimplemented from Plasma::Widget
|
||||
|
Loading…
Reference in New Issue
Block a user