From 854bf5cdac0204aa852daeb18831163ec231324d Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 18 Aug 2009 15:30:18 +1000 Subject: Rename finishPlaying to alwaysRunToEnd. --- src/declarative/util/qmlanimation.cpp | 24 ++++++++++++------------ src/declarative/util/qmlanimation.h | 8 ++++---- src/declarative/util/qmlanimation_p.h | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index ee16fae..9db5afd 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -256,7 +256,7 @@ void QmlAbstractAnimation::setRunning(bool r) d->startOnCompletion = true; emit started(); } else { - if (d->finishPlaying) { + if (d->alwaysRunToEnd) { if (d->repeat) qtAnimation()->setLoopCount(qtAnimation()->currentLoop()+1); } else @@ -321,8 +321,8 @@ void QmlAbstractAnimation::componentComplete() } /*! - \qmlproperty bool Animation::finishPlaying - This property holds whether the animation should finish playing when it is stopped. + \qmlproperty bool Animation::alwaysRunToEnd + This property holds whether the animation should run to completion when it is stopped. If this true the animation will complete its current iteration when it is stopped - either by setting the \c running property to false, or by @@ -332,22 +332,22 @@ void QmlAbstractAnimation::componentComplete() This behaviour is most useful when the \c repeat property is set, as the animation will finish playing normally but not restart. - By default, the finishPlaying property is not set. + By default, the alwaysRunToEnd property is not set. */ -bool QmlAbstractAnimation::finishPlaying() const +bool QmlAbstractAnimation::alwaysRunToEnd() const { Q_D(const QmlAbstractAnimation); - return d->finishPlaying; + return d->alwaysRunToEnd; } -void QmlAbstractAnimation::setFinishPlaying(bool f) +void QmlAbstractAnimation::setAlwaysRunToEnd(bool f) { Q_D(QmlAbstractAnimation); - if (d->finishPlaying == f) + if (d->alwaysRunToEnd == f) return; - d->finishPlaying = f; - emit finishPlayingChanged(f); + d->alwaysRunToEnd = f; + emit alwaysRunToEndChanged(f); } /*! @@ -530,7 +530,7 @@ void QmlAbstractAnimation::resume() \endcode was stopped at time 250ms, the \c x property will have a value of 50. - However, if the \c finishPlaying property is set, the animation will + However, if the \c alwaysRunToEnd property is set, the animation will continue running until it completes and then stop. The \c running property will still become false immediately. */ @@ -603,7 +603,7 @@ void QmlAbstractAnimation::timelineComplete() { Q_D(QmlAbstractAnimation); setRunning(false); - if (d->finishPlaying && d->repeat) { + if (d->alwaysRunToEnd && d->repeat) { qtAnimation()->setLoopCount(-1); } } diff --git a/src/declarative/util/qmlanimation.h b/src/declarative/util/qmlanimation.h index ef7842c..930ba73 100644 --- a/src/declarative/util/qmlanimation.h +++ b/src/declarative/util/qmlanimation.h @@ -66,7 +66,7 @@ class QmlAbstractAnimation : public QmlPropertyValueSource, public QmlParserStat Q_INTERFACES(QmlParserStatus) Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged) Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) - Q_PROPERTY(bool finishPlaying READ finishPlaying WRITE setFinishPlaying NOTIFY finishPlayingChanged()) + Q_PROPERTY(bool alwaysRunToEnd READ alwaysRunToEnd WRITE setAlwaysRunToEnd NOTIFY alwaysRunToEndChanged()) Q_PROPERTY(bool repeat READ repeat WRITE setRepeat NOTIFY repeatChanged) Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged) Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged) @@ -81,8 +81,8 @@ public: void setRunning(bool); bool isPaused() const; void setPaused(bool); - bool finishPlaying() const; - void setFinishPlaying(bool); + bool alwaysRunToEnd() const; + void setAlwaysRunToEnd(bool); bool repeat() const; void setRepeat(bool); @@ -109,7 +109,7 @@ Q_SIGNALS: void pausedChanged(bool); void repeatChanged(bool); void targetChanged(QObject *, const QString &); - void finishPlayingChanged(bool); + void alwaysRunToEndChanged(bool); public Q_SLOTS: void restart(); diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h index 3868255..d070d82 100644 --- a/src/declarative/util/qmlanimation_p.h +++ b/src/declarative/util/qmlanimation_p.h @@ -183,13 +183,13 @@ class QmlAbstractAnimationPrivate : public QObjectPrivate Q_DECLARE_PUBLIC(QmlAbstractAnimation) public: QmlAbstractAnimationPrivate() - : running(false), paused(false), finishPlaying(false), repeat(false), + : running(false), paused(false), alwaysRunToEnd(false), repeat(false), connectedTimeLine(false), componentComplete(true), startOnCompletion(false), target(0), group(0) {} bool running; bool paused; - bool finishPlaying; + bool alwaysRunToEnd; bool repeat; bool connectedTimeLine; -- cgit v0.12