summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/animation.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/declarative/animation.qdoc')
-rw-r--r--doc/src/declarative/animation.qdoc38
1 files changed, 21 insertions, 17 deletions
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 59bf8f6..26545ad 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -27,7 +27,11 @@
/*!
\page qdeclarativeanimation.html
-\title QML Animation
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML States}{States}
+\nextpage {QML Data Models}{Structuring Data with Models}
+\title QML Animation and Transitions
In QML, animations are created by applying animation objects to object property
@@ -80,7 +84,7 @@ States}{state changes}
These methods are demonstrated below. Notice these examples use
PropertyAnimation, which is one of several QML elements that can be used to
-create an animation. See the \l {Animation Elements} section further below for
+create an animation. See the \l {Animation Elements} section further below for
details.
@@ -92,7 +96,7 @@ source} using the \e Animation \bold on \e Property syntax. Here is a \l
Rectangle whose movement is animated using this method:
\snippet doc/src/snippets/declarative/animation-propertyvaluesource.qml 0
-
+
This applies a PropertyAnimation to the \l Rectangle's \c x and \c y properties
to animate from their current values (i.e. zero) to 50, over 1000 milliseconds.
The animation starts as soon as the \l Rectangle is loaded. To animate from
@@ -141,7 +145,7 @@ demonstration of behavioral animations.
An animation can be created within a signal handler to be triggered when the
signal is received. For example:
-
+
\snippet doc/src/snippets/declarative/animation-signalhandler.qml 0
The PropertyAnimation is triggered when the MouseArea is clicked, animating the
@@ -156,8 +160,8 @@ The \l {PropertyAnimation::}{to} property is also required to specify the new
\section2 Standalone Animations
Animations can also be created as ordinary QML objects that are not bound to
-any particular objects and properties. Here is an example, using a
-PropertyAnimation object. The animation is explicitly started when the
+any particular objects and properties. Here is an example, using a
+PropertyAnimation object. The animation is explicitly started when the
\l Rectangle is clicked:
\snippet doc/src/snippets/declarative/animation-standalone.qml 0
@@ -187,10 +191,10 @@ object and add it to an item's \l {Item::}{transitions} property. An example:
The PropertyChanges object in the \e moved state defines that when the
\l Rectangle is in this state, its position should be changed
-to (50, 50). When the \l Rectangle changes to the \e moved state, the
+to (50, 50). When the \l Rectangle changes to the \e moved state, the
\l Transition will be triggered, and the transition's \l PropertyAnimation will
animate the changes in the \c x and \c y properties to their new values.
-The animation will not be applied at any time other than during the state
+The animation will not be applied at any time other than during the state
change.
Notice the example does not set any \l {PropertyAnimation::}{from} and \l
@@ -231,13 +235,13 @@ It can also define the number of \l {Animation::}{loops} for an animation.
PropertyAnimation is the most basic animation element for animating a property.
It can be used to animate \c real, \c int, \c color, \c rect, \c point, \c size, and
\c vector3d properties. It is inherited by NumberAnimation, ColorAnimation,
-RotationAnimation and Vector3dAnimation: NumberAnimation provides a more
-efficient implementation for animating \c real and \c int properties, and
-Vector3dAnimation does the same for \c vector3d properties. ColorAnimation
-and RotationAnimation provide more specific attributes for animating color
-and rotation changes.
+RotationAnimation and Vector3dAnimation: NumberAnimation provides a more
+efficient implementation for animating \c real and \c int properties, and
+Vector3dAnimation does the same for \c vector3d properties. ColorAnimation
+and RotationAnimation provide more specific attributes for animating color
+and rotation changes.
-A ColorAnimation allows color values for the \l {ColorAnimation::}{from}
+A ColorAnimation allows color values for the \l {ColorAnimation::}{from}
and \l {ColorAnimation::}{to} properties. The
following animates the rectangle's \l {Rectangle::}{color} property:
@@ -251,10 +255,10 @@ animates the rectangle's \l {Item::rotation} property:
In addition, the following specialized animation elements are available:
\list
-\o SmoothedAnimation: a specialized NumberAnimation that provides smooth
+\o SmoothedAnimation: a specialized NumberAnimation that provides smooth
changes in animation when the target value changes
-\o SpringAnimation: provides a spring-like animation with specialized
-attributes such as \l {SpringAnimation::}{mass},
+\o SpringAnimation: provides a spring-like animation with specialized
+attributes such as \l {SpringAnimation::}{mass},
\l{SpringAnimation::}{damping} and \l{SpringAnimation::}{epsilon}
\o ParentAnimation: used for animating a parent change (see ParentChange)
\o AnchorAnimation: used for animating an anchor change (see AnchorChanges)