用于 Qt3D 动画的抽象基类。 更多...
头: | #include <QAbstractAnimation> |
qmake: | QT += 3danimation |
Since: | Qt 5.9 |
实例化: | AbstractAnimation |
继承: | QObject |
继承者: | Qt3DAnimation::QKeyframeAnimation , Qt3DAnimation::QMorphingAnimation ,和 Qt3DAnimation::QVertexBlendAnimation |
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 ) |
const QMetaObject | staticMetaObject |
QAbstractAnimation (Qt3DAnimation::QAbstractAnimationPrivate & dd , QObject * parent = nullptr) | |
void | setDuration (float duration ) |
用于 Qt3D 动画的抽象基类。
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.
此枚举指定动画的类型
常量 | 值 | 描述 |
---|---|---|
Qt3DAnimation::QAbstractAnimation::KeyframeAnimation
|
1
|
Simple keyframe animation implementation for QTransform |
Qt3DAnimation::QAbstractAnimation::MorphingAnimation
|
2
|
融合形状变形动画 |
Qt3DAnimation::QAbstractAnimation::VertexBlendAnimation
|
3
|
Vertex-blend animation |
保持动画名称。
访问函数:
QString | animationName () const |
void | setAnimationName (const QString & name ) |
通知程序信号:
void | animationNameChanged (const QString & name ) |
保持动画类型。
访问函数:
QAbstractAnimation::AnimationType | animationType () const |
保持动画持续时间。
访问函数:
float | duration () const |
通知程序信号:
void | durationChanged (float duration ) |
保持动画当前位置。
访问函数:
float | 位置 () const |
void | setPosition (float position ) |
通知程序信号:
void | positionChanged (float position ) |
[protected]
QAbstractAnimation::
QAbstractAnimation
(
Qt3DAnimation::QAbstractAnimationPrivate
&
dd
,
QObject
*
parent
= nullptr)
Default constructs an instance of QAbstractAnimation.
[protected]
void
QAbstractAnimation::
setDuration
(
float
duration
)
设置 duration 为动画。
另请参阅 duration ().