QAbstractAnimation 类

class Qt3DAnimation ::QAbstractAnimation

用于 Qt3D 动画的抽象基类。 更多...

头: #include <QAbstractAnimation>
qmake: QT += 3danimation
Since: Qt 5.9
实例化: AbstractAnimation
继承: QObject
继承者:

Qt3DAnimation::QKeyframeAnimation , Qt3DAnimation::QMorphingAnimation ,和 Qt3DAnimation::QVertexBlendAnimation

该类在 Qt 5.9 引入。

公共类型

enum AnimationType { KeyframeAnimation, MorphingAnimation, VertexBlendAnimation }

特性

公共函数

QString animationName () const
QAbstractAnimation::AnimationType animationType () const
float duration () const
float position () const

公共槽

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

信号

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

保护函数

void setDuration (float duration )

详细描述

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

此枚举指定动画的类型

常量 描述
Qt3DAnimation::QAbstractAnimation::KeyframeAnimation 1 Simple keyframe animation implementation for QTransform
Qt3DAnimation::QAbstractAnimation::MorphingAnimation 2 融合形状变形动画
Qt3DAnimation::QAbstractAnimation::VertexBlendAnimation 3 Vertex-blend animation

特性文档编制

animationName : QString

保持动画名称。

访问函数:

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

通知程序信号:

void animationNameChanged (const QString & name )

animationType : const AnimationType

保持动画类型。

访问函数:

QAbstractAnimation::AnimationType animationType () const

duration : const float

保持动画持续时间。

访问函数:

float duration () const

通知程序信号:

void durationChanged (float duration )

position : float

保持动画当前位置。

访问函数:

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

通知程序信号:

void positionChanged (float position )

成员函数文档编制

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

设置 duration 为动画。

另请参阅 duration ().