C

QSafeAnimations Class

class SafeRenderer::QSafeAnimations

The QSafeAnimations class holds the animation data. More...

Header: #include <QSafeAnimations>
Since: QtSafeRenderer 1.2

Public Functions

QSafeAnimations()
~QSafeAnimations()
void advance(const SafeRenderer::quint32 indexArg, SafeRenderer::QSafeLayout &layoutArg)
const SafeRenderer::AnimationData &animationAtIndex(const SafeRenderer::quint32 indexArg) const
SafeRenderer::quint32 countOfAnimations() const
SafeRenderer::AnimationData &reserveNew()
void restart(const SafeRenderer::quint32 indexArg, SafeRenderer::QSafeLayout &layoutArg)

Detailed Description

The QSafeAnimations holds the data of animations in one layout item. Memory for the bitmap data is statically reserved. The maximum amount of the animations can be changed in qsafeconstraints.h. The variable is SafeRenderer::Constraints::MAX_NUM_OF_ANIMATIONS_PER_ITEM.

Member Function Documentation

QSafeAnimations::QSafeAnimations()

Constructs a QSafeAnimations object.

QSafeAnimations::~QSafeAnimations()

Destructs a QSafeAnimations class

void QSafeAnimations::advance(const SafeRenderer::quint32 indexArg, SafeRenderer::QSafeLayout &layoutArg)

Advances the animation one step in the index at indexArg. Changes the item property value in the layoutArg. If the indexArg is bigger than the count of the animations, SafeRenderer::QSafeAnimations::AnimationsException::IndexOutOfBounds exception is thrown.

const SafeRenderer::AnimationData &QSafeAnimations::animationAtIndex(const SafeRenderer::quint32 indexArg) const

Returns the reference to the AnimationData at the index indexArg. If the indexArg is bigger than the count of the animations, SafeRenderer::QSafeAnimations::AnimationsException::IndexOutOfBounds exception is thrown.

SafeRenderer::quint32 QSafeAnimations::countOfAnimations() const

Returns the count of the animations.

SafeRenderer::AnimationData &QSafeAnimations::reserveNew()

Reserves a new entry from the animations list and returns a pointer to that entry. If there is no more free instances left, SafeRenderer::QSafeAnimations::AnimationsException::IndexOutOfBounds exception is thrown.

void QSafeAnimations::restart(const SafeRenderer::quint32 indexArg, SafeRenderer::QSafeLayout &layoutArg)

Restarts the animation in the index at indexArg. Resets the items property value to the default in the layoutArg. If the indexArg is bigger than the count of the animations, SafeRenderer::QSafeAnimations::AnimationsException::IndexOutOfBounds exception is thrown.

Available under certain Qt licenses.
Find out more.