QAbstractAnimation 類

( Qt3DAnimation::QAbstractAnimation )

用於 Qt3D 動畫的抽象基類 更多...

頭: #include < QAbstractAnimation >
qmake: QT += 3danimation
Since: Qt 5.9
實例化: AbstractAnimation
繼承: QObject

公共類型

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 )

保護函數

QAbstractAnimation (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.

成員類型文檔編製

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 QAbstractAnimation::AnimationType

保持動畫類型。

訪問函數:

QAbstractAnimation::AnimationType animationType () const

duration : const float

保持動畫持續時間。

訪問函數:

float duration () const

通知程序信號:

void durationChanged (float duration )

position : float

保持動畫當前位置。

訪問函數:

float position () const
void setPosition (float position )

通知程序信號:

void positionChanged (float position )

成員函數文檔編製

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

Copy constructor.

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

設置 duration 為動畫。

另請參閱 duration ().