The QParallelAnimationGroup class provides a parallel group of animations. 更多...
头: | #include <QParallelAnimationGroup> |
qmake: | QT += core |
Since: | Qt 4.6 |
继承: | QAnimationGroup |
QParallelAnimationGroup (QObject * parent = nullptr) | |
virtual | ~QParallelAnimationGroup () |
virtual int | duration () const override |
const QMetaObject | staticMetaObject |
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 |
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();
在此范例中,
anim1
and
anim2
are two
QPropertyAnimation
s that have already been set up.
另请参阅 QAnimationGroup , QPropertyAnimation ,和 动画框架 .
构造 QParallelAnimationGroup . parent 会被传递给 QObject 的构造函数。
[虚拟]
QParallelAnimationGroup::
~QParallelAnimationGroup
()
Destroys the animation group. It will also destroy all its animations.
[override virtual]
int
QParallelAnimationGroup::
duration
() const
重实现自 QAbstractAnimation::duration ().
[override virtual protected]
bool
QParallelAnimationGroup::
event
(
QEvent
*
event
)
重实现自 QAnimationGroup::event ().
[override virtual protected]
void
QParallelAnimationGroup::
updateCurrentTime
(
int
currentTime
)
重实现自 QAbstractAnimation::updateCurrentTime ().
[override virtual protected]
void
QParallelAnimationGroup::
updateDirection
(
QAbstractAnimation::Direction
direction
)
重实现自 QAbstractAnimation::updateDirection ().
[override virtual protected]
void
QParallelAnimationGroup::
updateState
(
QAbstractAnimation::State
newState
,
QAbstractAnimation::State
oldState
)
重实现自 QAbstractAnimation::updateState ().