summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-04-17 20:47:03 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-04-27 12:47:34 +0000
commit311261ea1faf6e4a9928d3a97cbca3190703cf04 (patch)
tree207bd9d80a195bdc012d77292d1843c44eb7bddd
parent16e3a51154651e2ce08dfce2944bc37ea3165b6b (diff)
Add imperative slots to control animator running property
Change-Id: I6fc8a5860421eb881a1b7d299f771ad88a278027 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r--src/animation/frontend/qabstractclipanimator.cpp16
-rw-r--r--src/animation/frontend/qabstractclipanimator.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/src/animation/frontend/qabstractclipanimator.cpp b/src/animation/frontend/qabstractclipanimator.cpp
index d032e3afe..0d215b470 100644
--- a/src/animation/frontend/qabstractclipanimator.cpp
+++ b/src/animation/frontend/qabstractclipanimator.cpp
@@ -220,6 +220,22 @@ void QAbstractClipAnimator::setLoopCount(int loops)
emit loopCountChanged(loops);
}
+/*!
+ Starts the animation.
+*/
+void QAbstractClipAnimator::start()
+{
+ setRunning(true);
+}
+
+/*!
+ Stops the animation.
+*/
+void QAbstractClipAnimator::stop()
+{
+ setRunning(false);
+}
+
} // namespace Qt3DAnimation
QT_END_NAMESPACE
diff --git a/src/animation/frontend/qabstractclipanimator.h b/src/animation/frontend/qabstractclipanimator.h
index 805fcb2b3..bd38fd68b 100644
--- a/src/animation/frontend/qabstractclipanimator.h
+++ b/src/animation/frontend/qabstractclipanimator.h
@@ -73,6 +73,9 @@ public Q_SLOTS:
void setChannelMapper(Qt3DAnimation::QChannelMapper *channelMapper);
void setLoopCount(int loops);
+ void start();
+ void stop();
+
Q_SIGNALS:
void runningChanged(bool running);
void channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper);