diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-20 18:26:46 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-20 18:26:46 (GMT) |
commit | 4d344bbc7a780e861f83962a166e82a0648813f1 (patch) | |
tree | 8f6937de28c90cd7720a8e38e0312d6b8a138125 /src/declarative/util/qdeclarativesmoothedanimation.cpp | |
parent | 8678d9b5e70f6076e1e915d8bf3938136fe4018c (diff) | |
parent | 3ff96da38b0906a6b2e398aea3469b1ab3c72e2c (diff) | |
download | Qt-4d344bbc7a780e861f83962a166e82a0648813f1.zip Qt-4d344bbc7a780e861f83962a166e82a0648813f1.tar.gz Qt-4d344bbc7a780e861f83962a166e82a0648813f1.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Make Item::transformOriginPoint read-only
Ensure the boundingRect() of Text is correctly calculated.
Better defaults for MouseArea's drag.
various doc improvements for animation elements
fixes for dynamic object creation docs
Change docs to show how to define enum properties
Improve documentation on setting arbitray transform origin points
Ensure released VisualItemModel items are removed from the scene.
Improve QML text rendering when LCD smoothing is enabled for OS X.
Diffstat (limited to 'src/declarative/util/qdeclarativesmoothedanimation.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativesmoothedanimation.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp index e0d1097..11c3d4b 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation.cpp +++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp @@ -253,15 +253,22 @@ void QSmoothedAnimation::init() \inherits NumberAnimation \brief The SmoothedAnimation element allows a property to smoothly track a value. - The SmoothedAnimation animates a property's value to a set target value - using an ease in/out quad easing curve. If the animation is restarted - with a different target value, the easing curves used to animate to the old - and the new target values are smoothly spliced together to avoid any obvious - visual glitches by maintaining the current velocity. - - The property animation is configured by setting the velocity at which the - animation should occur, or the duration that the animation should take. - If both a velocity and a duration are specified, the one that results in + A SmoothedAnimation animates a property's value to a set target value + using an ease in/out quad easing curve. When the target value changes, + the easing curves used to animate between the old and new target values + are smoothly spliced together to create a smooth movement to the new + target value that maintains the current velocity. + + The follow example shows one \l Rectangle tracking the position of another + using SmoothedAnimation. The green rectangle's \c x and \c y values are + bound to those of the red rectangle. Whenever these values change, the + green rectangle smoothly animates to its new position: + + \snippet doc/src/snippets/declarative/smoothedanimation.qml 0 + + A SmoothedAnimation can be configured by setting the \l velocity at which the + animation should occur, or the \l duration that the animation should take. + If both the \l velocity and \l duration are specified, the one that results in the quickest animation is chosen for each change in the target value. For example, animating from 0 to 800 will take 4 seconds if a velocity @@ -271,10 +278,6 @@ void QSmoothedAnimation::init() will take 8 seconds with a duration of 8000 set, and will take 8 seconds with both a velocity of 200 and a duration of 8000 set. - The follow example shows one rectangle tracking the position of another. - - \snippet doc/src/snippets/declarative/smoothedanimation.qml 0 - The default velocity of SmoothedAnimation is 200 units/second. Note that if the range of the value being animated is small, then the velocity will need to be adjusted appropriately. For example, the opacity of an item ranges from 0 - 1.0. @@ -287,7 +290,7 @@ void QSmoothedAnimation::init() sources. The \l PropertyAnimation documentation shows a variety of methods for creating animations. - \sa {QML Animation}, {declarative/animation/basics}{Animation basics example} + \sa SpringAnimation, NumberAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example} */ QDeclarativeSmoothedAnimation::QDeclarativeSmoothedAnimation(QObject *parent) |