QAnimationGroup 类

class Qt3DAnimation ::QAnimationGroup

将动画分组在一起的类。 更多...

头: #include <QAnimationGroup>
qmake: QT += 3danimation
Since: Qt 5.9
继承: QObject

该类在 Qt 5.9 引入。

特性

公共函数

QAnimationGroup (QObject * parent = nullptr)
void addAnimation (Qt3DAnimation::QAbstractAnimation * animation )
QVector<Qt3DAnimation::QAbstractAnimation *> animationList ()
float duration () const
QString name () const
float position () const
void removeAnimation (Qt3DAnimation::QAbstractAnimation * animation )
void setAnimations (const QVector<Qt3DAnimation::QAbstractAnimation *> & animations )

公共槽

void setName (const QString & name )
void setPosition (float position )

信号

void durationChanged (float duration )
void nameChanged (const QString & name )
void positionChanged (float position )

详细描述

Qt3DAnimation::QAnimationGroup class is used to group multiple animations so that they can act as one animation. The position set to the group is also set to all animations in a group. The duration is the maximum of the individual animations. The animations can be any supported animation type and do not have to have the same name.

特性文档编制

duration : const float

Holds the maximum duration of the animations in the group.

访问函数:

float duration () const

通知程序信号:

void durationChanged (float duration )

name : QString

Holds the name of the animation group.

访问函数:

QString name () const
void setName (const QString & name )

通知程序信号:

void nameChanged (const QString & name )

位置 : float

Holds the animation position.

访问函数:

float 位置 () const
void setPosition (float position )

通知程序信号:

void positionChanged (float position )

成员函数文档编制

QAnimationGroup:: QAnimationGroup ( QObject * parent = nullptr)

Constructs an QAnimationGroup with parent .

void QAnimationGroup:: addAnimation ( Qt3DAnimation::QAbstractAnimation * animation )

Adds new animation to the group.

QVector < Qt3DAnimation::QAbstractAnimation *> QAnimationGroup:: animationList ()

Returns the list of animations in the group.

void QAnimationGroup:: removeAnimation ( Qt3DAnimation::QAbstractAnimation * animation )

移除 animation from the group.

void QAnimationGroup:: setAnimations (const QVector < Qt3DAnimation::QAbstractAnimation *> & animations )

设置 animations to the group. Old animations are removed.