QSequentialAnimationGroup Class
The QSequentialAnimationGroup class provides a sequential group of animations. 更多...
头文件: | #include <QSequentialAnimationGroup> |
qmake: | QT += core |
开始支持版本: | Qt 4.6 |
基类: | QAnimationGroup |
属性
- currentAnimation : QAbstractAnimation * const
- 6 个属性继承自 QAbstractAnimation
- 1 个属性继承自 QObject
公有函数
QSequentialAnimationGroup(QObject *parent = Q_NULLPTR) | |
~QSequentialAnimationGroup() | |
QPauseAnimation * | addPause(int msecs) |
QAbstractAnimation * | currentAnimation() const |
QPauseAnimation * | insertPause(int index, int msecs) |
重新实现的公有函数
virtual int | duration() const |
- 8 个公有函数继承自 QAnimationGroup
- 11 个公有函数继承自 QAbstractAnimation
- 32 个公有函数继承自 QObject
信号
void | currentAnimationChanged(QAbstractAnimation *current) |
- 4 个信号继承自 QAbstractAnimation
- 2 个信号继承自 QObject
重新实现的受保护函数
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) |
- 1 个受保护的函数继承自 QAnimationGroup
- 4 个受保护的函数继承自 QAbstractAnimation
- 9 个受保护的函数继承自 QObject
其他继承的成员
- 6 个公有槽函数继承自 QAbstractAnimation
- 1 个公有槽函数继承自 QObject
- 11 个静态公有成员继承自 QObject
- 1 个受保护的函数继承自 QAnimationGroup
- 4 个受保护的函数继承自 QAbstractAnimation
- 9 个受保护的函数继承自 QObject
详细描述
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.
参见 QAnimationGroup, QAbstractAnimation, and The Animation Framework.
属性
currentAnimation : QAbstractAnimation * const
Returns the animation in the current time.
访问函数:
QAbstractAnimation * | currentAnimation() const |
Notifier signal:
void | currentAnimationChanged(QAbstractAnimation *current) |
成员函数
QSequentialAnimationGroup::QSequentialAnimationGroup(QObject *parent = Q_NULLPTR)
Constructs a QSequentialAnimationGroup. parent is passed to QObject's constructor.
QSequentialAnimationGroup::~QSequentialAnimationGroup()
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.
参见 insertPause() and QAnimationGroup::addAnimation().
[signal]
void QSequentialAnimationGroup::currentAnimationChanged(QAbstractAnimation *current)
QSequentialAnimationGroup emits this signal when currentAnimation has been changed. current is the current animation.
Note: Notifier signal for property currentAnimation.
参见 currentAnimation().
[virtual]
int QSequentialAnimationGroup::duration() const
Reimplemented from QAbstractAnimation::duration().
[virtual protected]
bool QSequentialAnimationGroup::event(QEvent *event)
Reimplemented from QObject::event().
QPauseAnimation *QSequentialAnimationGroup::insertPause(int index, int msecs)
Inserts a pause of msecs milliseconds at index in this animation group.
参见 addPause() and QAnimationGroup::insertAnimation().
[virtual protected]
void QSequentialAnimationGroup::updateCurrentTime(int currentTime)
Reimplemented from QAbstractAnimation::updateCurrentTime().
[virtual protected]
void QSequentialAnimationGroup::updateDirection(QAbstractAnimation::Direction direction)
Reimplemented from QAbstractAnimation::updateDirection().
[virtual protected]
void QSequentialAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
Reimplemented from QAbstractAnimation::updateState().