summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-05-12 11:20:15 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-05-12 11:20:15 (GMT)
commitcb369071fa9b15e68f91d2883ee29f12c58fc803 (patch)
tree82c4e450bb0a93e29f2489f1202ab97192bada20 /src
parent636f82be8db71c6f2ba815ca5b5d2e983476701b (diff)
parent45c063d91d6a682821ab337cdc8839cc2229f6ef (diff)
downloadQt-cb369071fa9b15e68f91d2883ee29f12c58fc803.zip
Qt-cb369071fa9b15e68f91d2883ee29f12c58fc803.tar.gz
Qt-cb369071fa9b15e68f91d2883ee29f12c58fc803.tar.bz2
Merge branch 'kinetic-animations' into kinetic-statemachine
Diffstat (limited to 'src')
-rw-r--r--src/corelib/animation/qparallelanimationgroup.cpp23
-rw-r--r--src/corelib/animation/qpauseanimation.cpp16
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp33
3 files changed, 65 insertions, 7 deletions
diff --git a/src/corelib/animation/qparallelanimationgroup.cpp b/src/corelib/animation/qparallelanimationgroup.cpp
index 407ffde..e4bce6a 100644
--- a/src/corelib/animation/qparallelanimationgroup.cpp
+++ b/src/corelib/animation/qparallelanimationgroup.cpp
@@ -46,8 +46,27 @@
\ingroup animation
\preliminary
- The animations are all started at the same time, and run in parallel. The animation group
- finishes when the longest lasting animation has finished.
+ QParallelAnimationGroup--a \l{QAnimationGroup}{container for
+ animations}--starts all its animations when it is
+ \l{QAbstractAnimation::start()}{started} itself, i.e., runs all
+ animations in parallel. The animation group finishes when the
+ longest lasting animation has finished.
+
+ You can treat QParallelAnimation as any other QAbstractAnimation,
+ e.g., pause, resume, or add it to other animation groups.
+
+ \code
+ QParallelAnimationGroup *group = new QParallelAnimationGroup;
+ group->addAnimation(anim1);
+ group->addAnimation(anim2);
+
+ group->start();
+ \endcode
+
+ In this example, \c anim1 and \c anim2 are two
+ \l{QPropertyAnimation}s that have already been set up.
+
+ \sa QAnimationGroup, QPropertyAnimation, {The Animation Framework}
*/
#ifndef QT_NO_ANIMATION
diff --git a/src/corelib/animation/qpauseanimation.cpp b/src/corelib/animation/qpauseanimation.cpp
index 30ea92c..685fa98 100644
--- a/src/corelib/animation/qpauseanimation.cpp
+++ b/src/corelib/animation/qpauseanimation.cpp
@@ -45,6 +45,22 @@
\since 4.5
\ingroup animation
\preliminary
+
+ If you wish to introduce a delay between animations in a
+ QSequentialAnimationGroup, you can insert a QPauseAnimation. This
+ class does not animate anything, but does not
+ \l{QAbstractAnimation::finished()}{finish} before a specified
+ number of milliseconds have elapsed from when it was started. You
+ specify the duration of the pause in the constructor. It can also
+ be set directly with setDuration().
+
+ It is not necessary to construct a QPauseAnimation yourself.
+ QSequentialAnimationGroup provides the convenience functions
+ \l{QSequentialAnimationGroup::}{addPause()} and
+ \l{QSequentialAnimationGroup::}{insertPauseAt()}. These functions
+ simply take the number of milliseconds the pause should last.
+
+ \sa QSequentialAnimationGroup
*/
#ifndef QT_NO_ANIMATION
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp
index 61ff98d..38f4818 100644
--- a/src/corelib/animation/qsequentialanimationgroup.cpp
+++ b/src/corelib/animation/qsequentialanimationgroup.cpp
@@ -46,13 +46,36 @@
\ingroup animation
\preliminary
- The first animation in the group is started first, and when it finishes, the next animation
- is started, and so on. The animation group finishes when the last animation has finished.
+ QSequentialAnimationGroup is a QAnimationGroup that runs its
+ animations in sequence, i.e., it starts one animation after
+ another has finished playing. The animations are played in the
+ order they are added to the group (using
+ \l{QAnimationGroup::}{addAnimation()} or
+ \l{QAnimationGroup::}{insertAnimationAt()}). The animation group
+ finishes when its last animation has finished.
- At each moment there is at most one animation that is active in the group, called currentAnimation.
- An empty group has no current animation.
+ At each moment there is at most one animation that is active in
+ the group; it is returned by currentAnimation(). An empty group
+ has no current animation.
- You can call addPause() or insertPause() to add a pause to a sequential animation group.
+ A sequential animation group can be treated as any other
+ animation, i.e., it can be started, stopped, and added to other
+ groups. You can also call addPause() or insertPauseAt() to add a
+ pause to a sequential animation group.
+
+ \code
+ QSequentialAnimationGroup group;
+
+ group.addAnimation(anim1);
+ group.addAnimation(anim2);
+
+ group.start();
+ \endcode
+
+ In this example, \c anim1 and \c anim2 are two already set up
+ \l{QPropertyAnimation}s.
+
+ \sa QAnimationGroup, QAbstractAnimation, {The Animation Framework}
*/
#ifndef QT_NO_ANIMATION