QParallelAnimationGroup Class

The QParallelAnimationGroup class provides a parallel group of animations. 更多...

头文件: #include <QParallelAnimationGroup>
qmake: QT += core
开始支持版本: Qt 4.6
基类: QAnimationGroup

公有函数

QParallelAnimationGroup(QObject *parent = Q_NULLPTR)
~QParallelAnimationGroup()

重新实现的公有函数

virtual int duration() const

重新实现的受保护函数

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 QParallelAnimationGroup class provides a parallel group of animations.

QParallelAnimationGroup--a container for animations--starts all its animations when it is started itself, i.e., runs all animations in parallel. The animation group finishes when the longest lasting animation has finished.

You can treat QParallelAnimationGroup as any other QAbstractAnimation, e.g., pause, resume, or add it to other animation groups.


  QParallelAnimationGroup *group = new QParallelAnimationGroup;
  group->addAnimation(anim1);
  group->addAnimation(anim2);

  group->start();

In this example, anim1 and anim2 are two QPropertyAnimations that have already been set up.

参见 QAnimationGroup, QPropertyAnimation, and The Animation Framework.

成员函数

QParallelAnimationGroup::QParallelAnimationGroup(QObject *parent = Q_NULLPTR)

Constructs a QParallelAnimationGroup. parent is passed to QObject's constructor.

QParallelAnimationGroup::~QParallelAnimationGroup()

Destroys the animation group. It will also destroy all its animations.

[virtual] int QParallelAnimationGroup::duration() const

Reimplemented from QAbstractAnimation::duration().

[virtual protected] bool QParallelAnimationGroup::event(QEvent *event)

Reimplemented from QObject::event().

[virtual protected] void QParallelAnimationGroup::updateCurrentTime(int currentTime)

Reimplemented from QAbstractAnimation::updateCurrentTime().

[virtual protected] void QParallelAnimationGroup::updateDirection(QAbstractAnimation::Direction direction)

Reimplemented from QAbstractAnimation::updateDirection().

[virtual protected] void QParallelAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)

Reimplemented from QAbstractAnimation::updateState().