![]() |
Home |
The QtAnimationGroup class provides a sequential or parallel group of animations. More...
#include <QtAnimationGroup>
This class is under development and is subject to change.
Inherits QtAbstractAnimation.
Inherited by QtTransition.
This class was introduced in qtanimationframework 4.5.
The QtAnimationGroup class provides a sequential or parallel group of animations.
QtAnimationGroup represents a group of animations, and lets you combine sequential and parallel sets of animations into one. The group manages any animation that inherits QtAbstractAnimation. By combining groups, you can easily construct complex animation graphs.
To create an animation group, you can start by constructing a QtAnimationGroup instance, passing the execution order (Sequential or Parallel) to the constructor. Then add animations by calling insertAt() or add(). You can remove animations by calling remove(), and clear the animation group by calling clear(). QtAnimationGroup takes ownership of the animations it manages, and ensures that they are deleted when the animation group is deleted.
For convenience when constructing complex animations, QtAnimationGroup also provides the beginSequentialGroup() and beingParallelGroup() functions, as well as an endGroup() function.
You can call addPause() or insertPause() to add a pause to an animation. Pauses are most useful for sequential animations.
See also QtAbstractAnimation, QtAnimation, QtTransition, and The Animation Framework.
This enum describes the order of execution for the animations in a QtAnimationGroup.
Constant | Value | Description |
---|---|---|
QtAnimationGroup::Parallel | 0 | Parallel execution (default). The animations are all started at the same time, and run in parallel. The animation group finishes when the longest lasting animation has finished. |
QtAnimationGroup::Sequential | 1 | Sequential execution. The first animation in the group is started first, and when it stops, the next animation is started, and so on. The animation group finishes when the last animation has finished. |
This property holds the animation group's order of execution.
This property describes the animation group's order of execution. The order applies the immediate members of the group. The order is set when the animation group is constructed, and cannot be changed.
Access functions:
Constructs a QtAnimationGroup, with the given order of execution. parent is passed to QObject's constructor.
Destroys the animation group. It will also destroy all its animations.
Adds animation to this group. This function is equivalent to calling insertAt(count(), animation).
See also insertAt().
Adds a pause of msecs to this animation group. The pause is considered as a special type of animation, thus count() will be increased by one.
See also insertPauseAt(), add(), and insertAt().
Returns the animations that are managed by this group.
See also add(), insertAt(), count(), and at().
Returns a pointer to the animation at index in this group. This function is useful when you need access to a particular animation. index is between 0 and count() - 1.
See also count() and animations().
Begins a new nested parallel group of animations. This convenience function makes it easy to construct complex animation groups without having to explicitly create a nested animation group object.
Subsequent calls to add() or insert() will insert animations into the new, nested, parallel group. To return to the original group, call endGroup().
See also beginSequentialGroup() and endGroup().
Begins a new nested sequential group of animations. This convenience function makes it easy to construct complex animation groups without having to explicitly create a nested animation group object.
Subsequent calls to add() or insert() will insert animations into the new, nested, sequential group. To return to the original group, call endGroup().
See also beginParallelGroup() and endGroup().
Removes all animations from this animation group, and resets the current time to 0. The ownership of the animations is transferred to the caller.
Returns the number of animations managed by this group.
See also animations(), add(), insertAt(), and at().
Ends the current nested animation group.
See also beginParallelGroup() and beginSequentialGroup().
Inserts animation into this animation group at index. If index is 0 the animation is inserted at the beginning. If index is count(), the animation is inserted at the end.
See also removeAt(), add(), and animations().
Inserts a pause of msecs milliseconds at index in this animation group.
See also addPause(), insertAt(), and animations().
Removes animation from this group. The ownership of animation is transferred to the caller.
See also insertAt() and add().
Removes the animation at index from this animation group. The ownership of the animation is transferred to the caller.
See also add() and insertAt().
Copyright © 2008 Nokia | Trademarks | Qt Solutions |