用于 Qt3D 动画的抽象基类。 更多...
头: | #include <QAbstractAnimation> |
CMake: |
find_package(Qt6 COMPONENTS 3danimation REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
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 ) |
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.
此枚举指定动画的类型
常量 | 值 | 描述 |
---|---|---|
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 ) |
[read-only]
animationType
: const
AnimationType
保持动画类型。
访问函数:
QAbstractAnimation::AnimationType | animationType () const |
[read-only]
duration
: const
float
保持动画持续时间。
访问函数:
float | duration () const |
通知程序信号:
void | durationChanged (float duration ) |
保持动画当前位置。
访问函数:
float | 位置 () const |
void | setPosition (float position ) |
通知程序信号:
void | positionChanged (float position ) |
[protected]
void
QAbstractAnimation::
setDuration
(
float
duration
)
设置 duration 为动画。
另请参阅 duration ().