The QSequentialAnimationGroup class provides a sequential group of animations. More...
|CMake:|| find_package(Qt6 REQUIRED COMPONENTS Core) |
target_link_libraries(mytarget PRIVATE Qt6::Core)
|qmake:||QT += core|
- List of all members, including inherited members
- QSequentialAnimationGroup is part of Animation Framework.
- currentAnimation : QAbstractAnimation*
|QSequentialAnimationGroup(QObject *parent = nullptr)|
|QPauseAnimation *||addPause(int msecs)|
|QBindable<QAbstractAnimation *>||bindableCurrentAnimation() const|
|QAbstractAnimation *||currentAnimation() const|
|QPauseAnimation *||insertPause(int index, int msecs)|
|virtual int||duration() const override|
|virtual bool||event(QEvent *event) override|
|virtual void||updateCurrentTime(int currentTime) override|
|virtual void||updateDirection(QAbstractAnimation::Direction direction) override|
|virtual void||updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) override|
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,
anim2 are two already set up QPropertyAnimations.
[bindable read-only] currentAnimation : QAbstractAnimation*
Note: This property supports QProperty bindings.
This property holds the animation in the current time.
Member Function Documentation
QSequentialAnimationGroup::QSequentialAnimationGroup(QObject *parent = nullptr)
Constructs a QSequentialAnimationGroup. parent is passed to QObject's constructor.
Destroys the animation group. It will also destroy all its animations.
QPauseAnimation *QSequentialAnimationGroup::addPause(int msecs)
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.
[signal] void QSequentialAnimationGroup::currentAnimationChanged(QAbstractAnimation *current)
Note: Notifier signal for property currentAnimation.
See also currentAnimation().
Reimplements: QAbstractAnimation::duration() const.
[override virtual protected] bool QSequentialAnimationGroup::event(QEvent *event)
Reimplements: QAnimationGroup::event(QEvent *event).
QPauseAnimation *QSequentialAnimationGroup::insertPause(int index, int msecs)
Inserts a pause of msecs milliseconds at index in this animation group.
Reimplements: QAbstractAnimation::updateCurrentTime(int currentTime).
[override virtual protected] void QSequentialAnimationGroup::updateDirection(QAbstractAnimation::Direction direction)
Reimplements: QAbstractAnimation::updateDirection(QAbstractAnimation::Direction direction).
[override virtual protected] void QSequentialAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
Reimplements: QAbstractAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState).
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.