summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGeir Vattekar <geir.vattekar@trolltech.com>2009-05-11 11:34:03 (GMT)
committerGeir Vattekar <geir.vattekar@trolltech.com>2009-05-11 11:34:03 (GMT)
commit9fe787a58abe38d35e801c95132b7ee5886f565b (patch)
treea4a738d56047e87bc6aed8c7d9b9f57a185d591d /src
parentc7b44a8bd67f4eace20c11ee78af6afeda774386 (diff)
downloadQt-9fe787a58abe38d35e801c95132b7ee5886f565b.zip
Qt-9fe787a58abe38d35e801c95132b7ee5886f565b.tar.gz
Qt-9fe787a58abe38d35e801c95132b7ee5886f565b.tar.bz2
Doc: Work on QParallelAnimationGroup and QSequentialAnimationGroup
Diffstat (limited to 'src')
-rw-r--r--src/corelib/animation/qparallelanimationgroup.cpp23
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp33
2 files changed, 49 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/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