summaryrefslogtreecommitdiffstats
path: root/src/corelib/animation/qanimationgroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/animation/qanimationgroup.cpp')
-rw-r--r--src/corelib/animation/qanimationgroup.cpp54
1 files changed, 41 insertions, 13 deletions
diff --git a/src/corelib/animation/qanimationgroup.cpp b/src/corelib/animation/qanimationgroup.cpp
index 8c9f358..0745d39 100644
--- a/src/corelib/animation/qanimationgroup.cpp
+++ b/src/corelib/animation/qanimationgroup.cpp
@@ -41,23 +41,51 @@
/*!
\class QAnimationGroup
- \brief The QAnimationGroup class is an abstract base class for group of animations.
+ \brief The QAnimationGroup class is an abstract base class for groups of animations.
\since 4.5
\ingroup group_animation
\preliminary
- QAnimationGroup represents a group of animations, such as parallel or sequential,
- and lets you combine different animations into one. The group manages any animation
- that inherits QAbstractAnimation. By combining groups, you can easily construct
- complex animation graphs.
-
- The QAnimationGroup base class provides methods for adding and retrieving animations.
- Besides that, you can remove animations by calling remove(), and clear the animation
- group by calling clearAnimations(). You may keep track of changes in the group's animations by
- listening to QEvent::ChildAdded and QEvent::ChildRemoved events.
-
- QAnimationGroup takes ownership of the animations it manages, and ensures that they are
- deleted when the animation group is deleted.
+ An animation group is a container for animations (subclasses of
+ QAbstractAnimation). A group is usually responsible for managing
+ the \l{QAbstractAnimation::State}{state} of its animations, i.e.,
+ it decides when to start, stop, resume, and pause them. Currently,
+ Qt provides two such groups: QParallelAnimationGroup and
+ QSequentialAnimationGroup. Look up their class descriptions for
+ details.
+
+ Since QAnimationGroup inherits from QAbstractAnimation, you can
+ combine groups, and easily construct complex animation graphs.
+ You can query QAbstractAnimation for the group it belongs to
+ (using the \l{QAbstractAnimation::}{group()} function).
+
+ To start a top-level animation group, you simply use the
+ \l{QAbstractAnimation::}{start()} function from
+ QAbstractAnimation. By a top-level animation group, we think of a
+ group that itself is not contained within another group. Starting
+ sub groups directly is not supported, and may lead to unexpected
+ behavior.
+
+ \omit OK, we'll put in a snippet on this here \endomit
+
+ QAnimationGroup provides methods for adding and retrieving
+ animations. Besides that, you can remove animations by calling
+ remove(), and clear the animation group by calling
+ clearAnimations(). You may keep track of changes in the group's
+ animations by listening to QEvent::ChildAdded and
+ QEvent::ChildRemoved events.
+
+ \omit OK, let's find a snippet here as well. \endomit
+
+ QAnimationGroup takes ownership of the animations it manages, and
+ ensures that they are deleted when the animation group is deleted.
+
+ You can also use a \l{The State Machine Framework}{state machine}
+ to create complex animations. The framework provides a special
+ state, QAnimationState, that plays an animation upon entry and
+ transitions to a new state when the animation has finished
+ playing. This technique can also be combined with using animation
+ groups.
\sa QAbstractAnimation, QVariantAnimation, {The Animation Framework}
*/