QAnimationClipLoader Class

(Qt3DAnimation::QAnimationClipLoader)

Enables loading key frame animation data from a file. More...

Header: #include <QAnimationClipLoader>
qmake: QT += 3danimation
Inherits: Qt3DAnimation::QAbstractAnimationClip

Public Types

enum Status { NotReady, Ready, Error }

Properties

Public Functions

QAnimationClipLoader(Qt3DCore::QNode *parent = nullptr)
QAnimationClipLoader(const QUrl &source, Qt3DCore::QNode *parent = nullptr)
virtual ~QAnimationClipLoader()
QUrl source() const
Qt3DAnimation::QAnimationClipLoader::Status status() const

Public Slots

void setSource(const QUrl &source)

Signals

void sourceChanged(const QUrl &source)
void statusChanged(Qt3DAnimation::QAnimationClipLoader::Status status)

Static Public Members

const QMetaObject staticMetaObject
  • 9 static public members inherited from QObject

Protected Functions

QAnimationClipLoader(Qt3DAnimation::QAnimationClipLoaderPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Detailed Description

Enables loading key frame animation data from a file.

Member Type Documentation

enum QAnimationClipLoader::Status

This enum identifies the status of animation clip.

ConstantValueDescription
Qt3DAnimation::QAnimationClipLoader::NotReady0The clip has not been loaded yet
Qt3DAnimation::QAnimationClipLoader::Ready1The clip was successfully loaded
Qt3DAnimation::QAnimationClipLoader::Error2An error occurred while loading the clip

Property Documentation

source : QUrl

Holds the source URL from which to load the animation clip. Currently glTF2 and the native Qt 3D json animation file formats are supported.

In the case where a file contains multiple animations, it is possible to select which animation should be loaded by way of query parameters on the source url. The accepted query parameters are animationIndex and animationName. If both are specified, animationName is ignored.

If a file contains only a single animation, there is no need to specify the animationIndex or animationName. We simply use the one available animation.

Access functions:

QUrl source() const
void setSource(const QUrl &source)

Notifier signal:

void sourceChanged(const QUrl &source)

status : const Status

This property contains the status of the animation clip.

Access functions:

Qt3DAnimation::QAnimationClipLoader::Status status() const

Notifier signal:

void statusChanged(Qt3DAnimation::QAnimationClipLoader::Status status)

Member Function Documentation

QAnimationClipLoader::QAnimationClipLoader(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QAnimationClipLoader.

QAnimationClipLoader::QAnimationClipLoader(const QUrl &source, Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QAnimationClipLoader.

[protected] QAnimationClipLoader::QAnimationClipLoader(Qt3DAnimation::QAnimationClipLoaderPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QAnimationClipLoader.

[virtual] QAnimationClipLoader::~QAnimationClipLoader()

Destroys the instance of QAnimationClipLoader. The destructor is virtual.

Qt3DAnimation::QAnimationClipLoader::Status QAnimationClipLoader::status() const

Returns the status of the animation clip.

Note: Getter function for property status.

© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.