QAnimationGroup Class

(Qt3DAnimation::QAnimationGroup)

A class grouping animations together 更多...

头文件: #include <QAnimationGroup>
qmake: QT += 3danimation
开始支持版本: Qt 5.9
基类: QObject

属性

公有函数

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)
  • 32 个公有函数继承自 QObject

公有槽函数

void setName(const QString &name)
void setPosition(float position)
  • 1 个公有槽函数继承自 QObject

信号

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

其他继承的成员

  • 1 个公有变量继承自 QObject
  • 10 个静态公有成员继承自 QObject
  • 9 个受保护的函数继承自 QObject
  • 2 个受保护的变量继承自 QObject

详细描述

A class grouping animations together

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

Notifier signal:

void durationChanged(float duration)

name : QString

Holds the name of the animation group.

访问函数:

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

Notifier signal:

void nameChanged(const QString &name)

position : float

Holds the animation position.

访问函数:

float position() const
void setPosition(float position)

Notifier signal:

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)

Removes animation from the group.

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

Sets the animations to the group. Old animations are removed.