diff options
author | Andreas Buhr <andreas.buhr@qt.io> | 2020-12-17 10:04:17 +0100 |
---|---|---|
committer | Andreas Buhr <andreas.buhr@qt.io> | 2021-04-19 15:18:46 +0200 |
commit | 7b6cef0e654eef0d932d1f8afe986eaa9b2299d4 (patch) | |
tree | f566ef4c5e337e8b0307b80f8b4b49097d8a08f1 /src/corelib/animation/qsequentialanimationgroup.h | |
parent | 97a8727f0ed87d1f9cb79d702f7d1da3951c2e2a (diff) |
Port QSequentialAnimationGroup to new property system
There is only one property in QSequentialAnimationGroup,
currentAnimation.
This patch ports this property to the new property system
Task-number: QTBUG-85520
Change-Id: Id528d30f551e88a6165bbb6a3c09d44e89257de5
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/animation/qsequentialanimationgroup.h')
-rw-r--r-- | src/corelib/animation/qsequentialanimationgroup.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/animation/qsequentialanimationgroup.h b/src/corelib/animation/qsequentialanimationgroup.h index a33ff07abf..34be474fe2 100644 --- a/src/corelib/animation/qsequentialanimationgroup.h +++ b/src/corelib/animation/qsequentialanimationgroup.h @@ -52,7 +52,8 @@ class QSequentialAnimationGroupPrivate; class Q_CORE_EXPORT QSequentialAnimationGroup : public QAnimationGroup { Q_OBJECT - Q_PROPERTY(QAbstractAnimation* currentAnimation READ currentAnimation NOTIFY currentAnimationChanged) + Q_PROPERTY(QAbstractAnimation *currentAnimation READ currentAnimation NOTIFY + currentAnimationChanged BINDABLE bindableCurrentAnimation) public: QSequentialAnimationGroup(QObject *parent = nullptr); @@ -62,10 +63,11 @@ public: QPauseAnimation *insertPause(int index, int msecs); QAbstractAnimation *currentAnimation() const; + QBindable<QAbstractAnimation *> bindableCurrentAnimation() const; int duration() const override; Q_SIGNALS: - void currentAnimationChanged(QAbstractAnimation *current); + void currentAnimationChanged(QAbstractAnimation *current) const; protected: QSequentialAnimationGroup(QSequentialAnimationGroupPrivate &dd, QObject *parent); |