QAbstractAnimation Class

(Qt3DAnimation::QAbstractAnimation)

An abstract base class for Qt3D animations 更多...

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

公有类型

enum AnimationType { KeyframeAnimation, MorphingAnimation, VertexBlendAnimation }

属性

公有函数

QString animationName() const
QAbstractAnimation::AnimationType animationType() const
float duration() const
float position() const
  • 32 个公有函数继承自 QObject

公有槽函数

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

信号

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

受保护的函数

QAbstractAnimation(QAbstractAnimationPrivate &dd, QObject *parent = nullptr)
void setDuration(float duration)
  • 9 个受保护的函数继承自 QObject

其他继承的成员

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

详细描述

An abstract base class for Qt3D animations

Qt3DAnimation::QAbstractAnimation is an abstract base class for all animations. Qt3DAnimation::QAbstractAnimation can not be directly instantiated, but rather through its subclasses. QAbstractAnimation specifies common properties for all Qt3D animations, such as animation name and type, current position and animation duration, while leaving the actual animating for the subclasses.

成员类型

enum QAbstractAnimation::AnimationType

This enumeration specifies the type of the animation

ConstantValueDescription
Qt3DAnimation::QAbstractAnimation::KeyframeAnimation1Simple keyframe animation implementation for QTransform
Qt3DAnimation::QAbstractAnimation::MorphingAnimation2Blend-shape morphing animation
Qt3DAnimation::QAbstractAnimation::VertexBlendAnimation3Vertex-blend animation

属性

animationName : QString

Holds the name of the animation.

访问函数:

QString animationName() const
void setAnimationName(const QString &name)

Notifier signal:

void animationNameChanged(const QString &name)

animationType : const QAbstractAnimation::AnimationType

Holds the type of the animation.

访问函数:

QAbstractAnimation::AnimationType animationType() const

duration : const float

Holds the duration of the animation.

访问函数:

float duration() const

Notifier signal:

void durationChanged(float duration)

position : float

Holds the current position of the animation.

访问函数:

float position() const
void setPosition(float position)

Notifier signal:

void positionChanged(float position)

成员函数

[protected] QAbstractAnimation::QAbstractAnimation(QAbstractAnimationPrivate &dd, QObject *parent = nullptr)

Copy constructor.

[protected] void QAbstractAnimation::setDuration(float duration)

Sets the duration of the animation.

参见 duration().