aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickanimatedimage_p.h
diff options
context:
space:
mode:
authorLouis du Verdier <louis.du.verdier@free.fr>2017-07-29 22:57:43 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-01-16 11:45:34 +0000
commite26e1c61c7acb1538a50c9ab570c6811c652581d (patch)
tree7ac82daa87b15be4cec32ab00e41689e96bf3925 /src/quick/items/qquickanimatedimage_p.h
parent196c691ebce3a48c6479162f3084790b6d0af8b8 (diff)
Add a speed property to AnimatedImage
QMovie handles most of AnimatedImage's behaviors and already provides a speed property (that is a percentage, 100% by default). This commit only offers the possibility to change its value from the QML. Task-number: QTBUG-62203 Change-Id: I8b7b79053181c1544aee1e95054b3b48229381fb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickanimatedimage_p.h')
-rw-r--r--src/quick/items/qquickanimatedimage_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickanimatedimage_p.h b/src/quick/items/qquickanimatedimage_p.h
index f7a6bd808b..678907a6e2 100644
--- a/src/quick/items/qquickanimatedimage_p.h
+++ b/src/quick/items/qquickanimatedimage_p.h
@@ -70,6 +70,7 @@ class Q_AUTOTEST_EXPORT QQuickAnimatedImage : public QQuickImage
Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame NOTIFY frameChanged)
Q_PROPERTY(int frameCount READ frameCount NOTIFY frameCountChanged)
+ Q_PROPERTY(qreal speed READ speed WRITE setSpeed NOTIFY speedChanged REVISION 11)
// read-only for AnimatedImage
Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged)
@@ -89,6 +90,9 @@ public:
int frameCount() const;
+ qreal speed() const;
+ void setSpeed(qreal speed);
+
// Extends QQuickImage's src property
void setSource(const QUrl&) override;
virtual QSize sourceSize();
@@ -98,6 +102,7 @@ Q_SIGNALS:
void pausedChanged();
void frameChanged();
void frameCountChanged();
+ Q_REVISION(11) void speedChanged();
private Q_SLOTS:
void movieUpdate();