summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-02-12 07:19:51 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-03-30 03:54:12 (GMT)
commit7a060ca401b4e260fd08c854213024b050a67ff2 (patch)
tree50745dec7be82136622ae0ccaa0430caa8e0d5a8 /doc/src/declarative
parent68d3e2da7719ff0fc230e8204946b27018e42c14 (diff)
downloadQt-7a060ca401b4e260fd08c854213024b050a67ff2.zip
Qt-7a060ca401b4e260fd08c854213024b050a67ff2.tar.gz
Qt-7a060ca401b4e260fd08c854213024b050a67ff2.tar.bz2
Change and rename qml EaseFollow to SmoothedAnimation
QDeclarativeSmoothedAnimation inherits from QDeclarativeNumberAnimation, as a consequence SmoothedAnimation can be used inside Behaviors and as PropertySourceValues, like any other animation. The old EaseFollow properties changed to comply with the other declarative animations ('source' changed to 'to'), so now 'to' changes are not automatically 'followed' anymore. You can achieve the following behavior by putting a SmoothedAnimation inside a Behavior of a property that is bound to another, as the following example: If you want to follow an hypothetical rect1, you should do now: Rectangle { color: "green" width: 60; height: 60; x: rect1.x - 5; y: rect1.y - 5; Behavior on x { SmoothedAnimation { velocity: 200 } } Behavior on y { SmoothedAnimation { velocity: 200 } } } SmoothedAnimation also supports animating multiple target(s)/property(ies) in the transition case. When a QDeclarativeSmoothedAnimation is restarted, it will match the QDeclarativeProperty which were being animated and transfer the corresponding track velocity to the new starting animations. QSmoothedAnimation is an uncontrolled animation, duration == -1. The duration is set as -1 to avoid consecutive animation state changes stop()/start(). This is particularly useful when using QSmoothAnimation to 'follow' another property, which is also being animated (change the 'to' property every tick). Reviewed-by: Michael Brasser
Diffstat (limited to 'doc/src/declarative')
-rw-r--r--doc/src/declarative/elements.qdoc2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index 8091f95..fcfc7d6 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -77,11 +77,11 @@ The following table lists the QML elements provided by the Qt Declarative module
\o \l PauseAnimation
\o \l ParentAnimation
\o \l AnchorAnimation
+\o \l SmoothedAnimation
\o \l PropertyAction
\o \l ScriptAction
\o \l Transition
\o \l SpringFollow
-\o \l EaseFollow
\o \l Behavior
\endlist