diff options
author | mae <qt-info@nokia.com> | 2010-07-06 15:41:49 +0200 |
---|---|---|
committer | mae <qt-info@nokia.com> | 2010-07-07 13:47:17 +0200 |
commit | cb406a116bf2237c743ac05882fb06927c70359c (patch) | |
tree | e3b9bbe6b62793e24ef7edb0b1c13f234032177c /src/declarative/util/qdeclarativeanimation.cpp | |
parent | f5dca266bbf75abe24f39ac8e4d96796529afd77 (diff) | |
download | qt4-tools-cb406a116bf2237c743ac05882fb06927c70359c.tar.gz |
Added QDeclarativeSpringAnimation
The QDeclarativeSpringAnimation is a replacement for
QDeclarativeSpringFollow. The idea is to remove the Follows
quickly.
Follows used to have an inSync property. In order to provide
an alternative mechanism, the commit also fixes the
running property for animations which are controlled by a
behavior. Previously running would always return false and
never change. Now running does change and indicates that the
animation is running indeed.
Diffstat (limited to 'src/declarative/util/qdeclarativeanimation.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativeanimation.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index add27f36b4..6559bd5120 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -142,6 +142,16 @@ bool QDeclarativeAbstractAnimation::isRunning() const return d->running; } +// the behavior connects the animation to this slot +void QDeclarativeAbstractAnimation::behaviorControlRunningChanged(bool running) +{ + Q_D(QDeclarativeAbstractAnimation); + if (d->disableUserControl && d->running != running) { + d->running = running; + emit runningChanged(running); + } +} + //commence is called to start an animation when it is used as a //simple animation, and not as part of a transition void QDeclarativeAbstractAnimationPrivate::commence() |