The QSequentialAnimationGroup class provides a sequential group of animations. More...
#include <QSequentialAnimationGroup>
Inherits: QAnimationGroup.
This class was introduced in Qt 4.6.
QSequentialAnimationGroup ( QObject * parent = 0 ) | |
~QSequentialAnimationGroup () | |
QPauseAnimation * | addPause ( int msecs ) |
QAbstractAnimation * | currentAnimation () const |
QPauseAnimation * | insertPause ( int index, int msecs ) |
virtual int | duration () const |
void | currentAnimationChanged ( QAbstractAnimation * current ) |
virtual bool | event ( QEvent * event ) |
virtual void | updateCurrentTime ( int currentTime ) |
virtual void | updateDirection ( QAbstractAnimation::Direction direction ) |
virtual void | updateState ( QAbstractAnimation::State newState, QAbstractAnimation::State oldState ) |
The QSequentialAnimationGroup class provides a sequential group of animations.
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 addAnimation() or insertAnimation()). 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; it is returned by currentAnimation(). An empty group has no current animation.
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 insertPause() to add a pause to a sequential animation group.
QSequentialAnimationGroup *group = new QSequentialAnimationGroup; group->addAnimation(anim1); group->addAnimation(anim2); group->start();
In this example, anim1 and anim2 are two already set up QPropertyAnimations.
See also QAnimationGroup, QAbstractAnimation, and The Animation Framework.
Returns the animation in the current time.
Access functions:
QAbstractAnimation * | currentAnimation () const |
Notifier signal:
void | currentAnimationChanged ( QAbstractAnimation * current ) |
See also currentAnimationChanged().
Constructs a QSequentialAnimationGroup. parent is passed to QObject's constructor.
Destroys the animation group. It will also destroy all its animations.
Adds a pause of msecs to this animation group. The pause is considered as a special type of animation, thus animationCount will be increased by one.
See also insertPause() and QAnimationGroup::addAnimation().
QSequentialAnimationGroup emits this signal when currentAnimation has been changed. current is the current animation.
See also currentAnimation().
Reimplemented from QAbstractAnimation::duration().
Reimplemented from QObject::event().
Inserts a pause of msecs milliseconds at index in this animation group.
See also addPause() and QAnimationGroup::insertAnimation().
Reimplemented from QAbstractAnimation::updateCurrentTime().
Reimplemented from QAbstractAnimation::updateDirection().
Reimplemented from QAbstractAnimation::updateState().
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.