diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-01-25 19:25:15 +0000 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-01-27 18:32:25 +0000 |
commit | 744c51c33e4da37bb70528f5398e56e5faf5c504 (patch) | |
tree | fb38379202c9a520fdcebd44a749bfdd467c0bb2 /src/animation/frontend/qanimationclip.h | |
parent | 78a032e2328dddf0f60c0fe3063047888b92cc2a (diff) |
Calculate animation clip duration and send to frontend
Change-Id: Iaafb8b385658be446098d982702955810f76d7c6
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/animation/frontend/qanimationclip.h')
-rw-r--r-- | src/animation/frontend/qanimationclip.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/animation/frontend/qanimationclip.h b/src/animation/frontend/qanimationclip.h index f5394f8ff..55b1910fa 100644 --- a/src/animation/frontend/qanimationclip.h +++ b/src/animation/frontend/qanimationclip.h @@ -51,21 +51,25 @@ class QT3DANIMATIONSHARED_EXPORT QAnimationClip : public Qt3DCore::QNode { Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(float duration READ duration NOTIFY durationChanged) public: explicit QAnimationClip(Qt3DCore::QNode *parent = nullptr); ~QAnimationClip(); QUrl source() const; + float duration() const; public Q_SLOTS: void setSource(QUrl source); Q_SIGNALS: void sourceChanged(QUrl source); + void durationChanged(float duration); protected: QAnimationClip(QAnimationClipPrivate &dd, Qt3DCore::QNode *parent = nullptr); + void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(QAnimationClip) |