diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2020-12-10 18:46:31 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-01-26 21:47:50 +0100 |
commit | 709a0942aa5adeea8057a92a301dee85fc575528 (patch) | |
tree | 8b76cb93284c6f4bb479f001244ec27c37217e81 /src/corelib/kernel/qtimer.h | |
parent | 519420641fabeeb7a372ed6157a7bc01f43b1b3b (diff) |
QTimer: port to new property system
Task-number: QTBUG-85520
Change-Id: I1f92b86619f2ca186c505251b21463f396af0ac6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Diffstat (limited to 'src/corelib/kernel/qtimer.h')
-rw-r--r-- | src/corelib/kernel/qtimer.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index d4da91e172..2b262f6311 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -57,28 +57,32 @@ class QTimerPrivate; class Q_CORE_EXPORT QTimer : public QObject { Q_OBJECT - Q_PROPERTY(bool singleShot READ isSingleShot WRITE setSingleShot) - Q_PROPERTY(int interval READ interval WRITE setInterval) + Q_PROPERTY(bool singleShot READ isSingleShot WRITE setSingleShot BINDABLE bindableSingleShot) + Q_PROPERTY(int interval READ interval WRITE setInterval BINDABLE bindableInterval) Q_PROPERTY(int remainingTime READ remainingTime) - Q_PROPERTY(Qt::TimerType timerType READ timerType WRITE setTimerType) - Q_PROPERTY(bool active READ isActive) + Q_PROPERTY(Qt::TimerType timerType READ timerType WRITE setTimerType BINDABLE bindableTimerType) + Q_PROPERTY(bool active READ isActive STORED false BINDABLE bindableActive) public: explicit QTimer(QObject *parent = nullptr); ~QTimer(); bool isActive() const; + QBindable<bool> bindableActive(); int timerId() const; void setInterval(int msec); int interval() const; + QBindable<int> bindableInterval(); int remainingTime() const; void setTimerType(Qt::TimerType atype); Qt::TimerType timerType() const; + QBindable<Qt::TimerType> bindableTimerType(); void setSingleShot(bool singleShot); bool isSingleShot() const; + QBindable<bool> bindableSingleShot(); static void singleShot(int msec, const QObject *receiver, const char *member); static void singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member); |