Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQuick3DParticleSpriteSequence Class Reference

#include <qquick3dparticlespritesequence_p.h>

+ Inheritance diagram for QQuick3DParticleSpriteSequence:
+ Collaboration diagram for QQuick3DParticleSpriteSequence:

Public Types

enum  AnimationDirection {
  Normal = 0 , Reverse , Alternate , AlternateReverse ,
  SingleFrame
}
 

Public Slots

void setFrameCount (int frameCount)
 
void setFrameIndex (int frameIndex)
 
void setInterpolate (bool interpolate)
 
void setDuration (int duration)
 
void setDurationVariation (int durationVariation)
 
void setRandomStart (bool randomStart)
 
void setAnimationDirection (QQuick3DParticleSpriteSequence::AnimationDirection animationDirection)
 
- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 

Signals

void frameCountChanged ()
 
void frameIndexChanged ()
 
void interpolateChanged ()
 
void durationChanged ()
 
void durationVariationChanged ()
 
void randomStartChanged ()
 
void animationDirectionChanged ()
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 

Public Member Functions

 QQuick3DParticleSpriteSequence (QObject *parent=nullptr)
 \qmltype SpriteSequence3D \inherits QtObject \inqmlmodule QtQuick3D.Particles3D
 
 ~QQuick3DParticleSpriteSequence () override
 
int frameCount () const
 \qmlproperty int SpriteSequence3D::frameCount
 
int frameIndex () const
 \qmlproperty int SpriteSequence3D::frameIndex
 
bool interpolate () const
 \qmlproperty bool SpriteSequence3D::interpolate
 
int duration () const
 \qmlproperty int SpriteSequence3D::duration
 
int durationVariation () const
 \qmlproperty int SpriteSequence3D::durationVariation
 
bool randomStart () const
 \qmlproperty bool SpriteSequence3D::randomStart
 
AnimationDirection animationDirection () const
 \qmlproperty AnimationDirection SpriteSequence3D::animationDirection
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
void killTimer (Qt::TimerId id)
 
template<typename T >
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 
- Public Member Functions inherited from QQmlParserStatus
 QQmlParserStatus ()
 
virtual ~QQmlParserStatus ()
 

Protected Member Functions

void componentComplete () override
 Invoked after the root component that caused this instantiation has completed construction.
 
void classBegin () override
 Invoked after class creation, but before any properties have been set.
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 

Properties

int frameCount
 
int frameIndex
 
bool interpolate
 
int duration
 
int durationVariation
 
bool randomStart
 
AnimationDirection animationDirection
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Friends

class QQuick3DParticleSpriteParticle
 
class QQuick3DParticleSystem
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 

Detailed Description

Definition at line 28 of file qquick3dparticlespritesequence_p.h.

Member Enumeration Documentation

◆ AnimationDirection

Enumerator
Normal 
Reverse 
Alternate 
AlternateReverse 
SingleFrame 

Definition at line 44 of file qquick3dparticlespritesequence_p.h.

Constructor & Destructor Documentation

◆ QQuick3DParticleSpriteSequence()

QT_BEGIN_NAMESPACE QQuick3DParticleSpriteSequence::QQuick3DParticleSpriteSequence ( QObject * parent = nullptr)

\qmltype SpriteSequence3D \inherits QtObject \inqmlmodule QtQuick3D.Particles3D

Provides image sequence features for the Sprite particles.

Since
6.2

The SpriteSequence3D element provides support for animated images with multiple frames. The frames should be aligned horizontally in the image, first frame being on the left and last on the right.

To make a \l SpriteParticle3D an animated sequence, set its \l {SpriteParticle3D::spriteSequence}{spriteSequence} property.

Definition at line 22 of file qquick3dparticlespritesequence.cpp.

◆ ~QQuick3DParticleSpriteSequence()

QQuick3DParticleSpriteSequence::~QQuick3DParticleSpriteSequence ( )
override

Definition at line 28 of file qquick3dparticlespritesequence.cpp.

References QQuick3DParticleSpriteParticle::setSpriteSequence().

+ Here is the call graph for this function:

Member Function Documentation

◆ animationDirection()

QQuick3DParticleSpriteSequence::AnimationDirection QQuick3DParticleSpriteSequence::animationDirection ( ) const

\qmlproperty AnimationDirection SpriteSequence3D::animationDirection

This property defines the animation direction of the sequence.

The default value is SpriteSequence3D.Normal.

See also
randomStart

\qmlproperty enumeration SpriteSequence3D::AnimationDirection

Defines the animation playback direction of the sequence.

\value SpriteSequence3D.Normal Animate from the first frame to the last frame. When the last frame is reached, jump back to the first frame. \value SpriteSequence3D.Reverse Animate from the last frame to the first frame. When the first frame is reached, jump back to the last frame. \value SpriteSequence3D.Alternate Animate from the first frame to the last frame. When the last or first frame is reached, switch the animation direction. This makes the sequence animation smooth even when the first and the last frames don't match. \value SpriteSequence3D.AlternateReverse Animate from the last frame to the first frame. When the last or first frame is reached, switch the animation direction. This makes the sequence animation smooth even when the first and the last frames don't match. \value SpriteSequence3D.SingleFrame Don't animate the frame. When the \l randomStart is false, \l frameIndex frame is rendered. When the \l randomStart is true, each particle renders a random frame.

Definition at line 164 of file qquick3dparticlespritesequence.cpp.

◆ animationDirectionChanged

void QQuick3DParticleSpriteSequence::animationDirectionChanged ( )
signal

Referenced by setAnimationDirection().

+ Here is the caller graph for this function:

◆ classBegin()

void QQuick3DParticleSpriteSequence::classBegin ( )
inlineoverrideprotectedvirtual

Invoked after class creation, but before any properties have been set.

Implements QQmlParserStatus.

Definition at line 86 of file qquick3dparticlespritesequence_p.h.

◆ componentComplete()

void QQuick3DParticleSpriteSequence::componentComplete ( )
overrideprotectedvirtual

Invoked after the root component that caused this instantiation has completed construction.

At this point all static values and binding values have been assigned to the class.

Implements QQmlParserStatus.

Definition at line 234 of file qquick3dparticlespritesequence.cpp.

References QObject::parent(), and qWarning.

+ Here is the call graph for this function:

◆ duration()

int QQuick3DParticleSpriteSequence::duration ( ) const

\qmlproperty int SpriteSequence3D::duration

This property defines the duration in milliseconds how long it takes for the sprite sequence to animate. For example, if the \l duration is 400 and the \l frameCount is 8, each frame will be shown for 50 milliseconds. When the value is -1, the particle lifeSpan is used as the duration.

The default value is -1.

Definition at line 101 of file qquick3dparticlespritesequence.cpp.

◆ durationChanged

void QQuick3DParticleSpriteSequence::durationChanged ( )
signal

Referenced by setDuration().

+ Here is the caller graph for this function:

◆ durationVariation()

int QQuick3DParticleSpriteSequence::durationVariation ( ) const

\qmlproperty int SpriteSequence3D::durationVariation

This property defines the duration variation in milliseconds. The actual duration of the animation is between duration - durationVariation and duration + durationVariation.

The default value is 0 (no variation).

Definition at line 115 of file qquick3dparticlespritesequence.cpp.

◆ durationVariationChanged

void QQuick3DParticleSpriteSequence::durationVariationChanged ( )
signal

Referenced by setDurationVariation().

+ Here is the caller graph for this function:

◆ frameCount()

int QQuick3DParticleSpriteSequence::frameCount ( ) const

\qmlproperty int SpriteSequence3D::frameCount

This property defines the amount of image frames in \l {SpriteParticle3D::}{sprite}. Particle animates through these frames during its \l duration. The frames should be laid out horizontally in the same image file. For example, sprite could be a {512x64} image, with frameCount of 8. This would make each particle frame size {64x64} pixels.

The default value is 1.

Note
If your image only has a single sprite frame, don't define the \l {SpriteParticle3D::}{spriteSequence} property at all.
See also
interpolate

Definition at line 50 of file qquick3dparticlespritesequence.cpp.

◆ frameCountChanged

void QQuick3DParticleSpriteSequence::frameCountChanged ( )
signal

Referenced by setFrameCount().

+ Here is the caller graph for this function:

◆ frameIndex()

int QQuick3DParticleSpriteSequence::frameIndex ( ) const

\qmlproperty int SpriteSequence3D::frameIndex

This property defines the initial index of the frame. This is the position in between frames where the animation is started. For example when the frameIndex is 5 and the \l animationDirection is Normal, the first rendered frame is 5. If the \l animationDirection is Reverse, the first rendered frame is 4.

The value of frameIndex must be between 0 and \l{frameCount} - 1. When the \l animationDirection is SingleFrame and \l randomStart is false, all the particles will render sprites with the frameIndex.

The default value is 0.

See also
randomStart, animationDirection

Definition at line 71 of file qquick3dparticlespritesequence.cpp.

◆ frameIndexChanged

void QQuick3DParticleSpriteSequence::frameIndexChanged ( )
signal

Referenced by setFrameIndex().

+ Here is the caller graph for this function:

◆ interpolate()

bool QQuick3DParticleSpriteSequence::interpolate ( ) const

\qmlproperty bool SpriteSequence3D::interpolate

This property defines if the sprites are interpolated (blended) between frames to make the animation appear smoother.

The default value is true.

See also
frameCount

Definition at line 86 of file qquick3dparticlespritesequence.cpp.

◆ interpolateChanged

void QQuick3DParticleSpriteSequence::interpolateChanged ( )
signal

Referenced by setInterpolate().

+ Here is the caller graph for this function:

◆ randomStart()

bool QQuick3DParticleSpriteSequence::randomStart ( ) const

\qmlproperty bool SpriteSequence3D::randomStart

This property defines if the animation should start from a random frame between 0 and \l frameCount - 1. This allows animations to not look like they all just started when the animation begins.

The default value is false.

See also
animationDirection

Definition at line 130 of file qquick3dparticlespritesequence.cpp.

◆ randomStartChanged

void QQuick3DParticleSpriteSequence::randomStartChanged ( )
signal

Referenced by setRandomStart().

+ Here is the caller graph for this function:

◆ setAnimationDirection

void QQuick3DParticleSpriteSequence::setAnimationDirection ( QQuick3DParticleSpriteSequence::AnimationDirection animationDirection)
slot

Definition at line 225 of file qquick3dparticlespritesequence.cpp.

References animationDirection, animationDirectionChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setDuration

void QQuick3DParticleSpriteSequence::setDuration ( int duration)
slot

Definition at line 196 of file qquick3dparticlespritesequence.cpp.

References duration, durationChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setDurationVariation

void QQuick3DParticleSpriteSequence::setDurationVariation ( int durationVariation)
slot

Definition at line 206 of file qquick3dparticlespritesequence.cpp.

References durationVariation, durationVariationChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setFrameCount

void QQuick3DParticleSpriteSequence::setFrameCount ( int frameCount)
slot

Definition at line 169 of file qquick3dparticlespritesequence.cpp.

References frameCount, frameCountChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setFrameIndex

void QQuick3DParticleSpriteSequence::setFrameIndex ( int frameIndex)
slot

Definition at line 178 of file qquick3dparticlespritesequence.cpp.

References frameIndex, frameIndexChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setInterpolate

void QQuick3DParticleSpriteSequence::setInterpolate ( bool interpolate)
slot

Definition at line 187 of file qquick3dparticlespritesequence.cpp.

References interpolate, interpolateChanged(), and Q_EMIT.

+ Here is the call graph for this function:

◆ setRandomStart

void QQuick3DParticleSpriteSequence::setRandomStart ( bool randomStart)
slot

Definition at line 216 of file qquick3dparticlespritesequence.cpp.

References Q_EMIT, randomStart, and randomStartChanged().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QQuick3DParticleSpriteParticle

friend class QQuick3DParticleSpriteParticle
friend

Definition at line 89 of file qquick3dparticlespritesequence_p.h.

◆ QQuick3DParticleSystem

friend class QQuick3DParticleSystem
friend

Definition at line 90 of file qquick3dparticlespritesequence_p.h.

Property Documentation

◆ animationDirection

AnimationDirection QQuick3DParticleSpriteSequence::animationDirection
readwrite

Definition at line 37 of file qquick3dparticlespritesequence_p.h.

Referenced by setAnimationDirection().

◆ duration

int QQuick3DParticleSpriteSequence::duration
readwrite

Definition at line 34 of file qquick3dparticlespritesequence_p.h.

Referenced by setDuration().

◆ durationVariation

int QQuick3DParticleSpriteSequence::durationVariation
readwrite

Definition at line 35 of file qquick3dparticlespritesequence_p.h.

Referenced by setDurationVariation().

◆ frameCount

int QQuick3DParticleSpriteSequence::frameCount
readwrite

Definition at line 31 of file qquick3dparticlespritesequence_p.h.

Referenced by setFrameCount().

◆ frameIndex

int QQuick3DParticleSpriteSequence::frameIndex
readwrite

Definition at line 32 of file qquick3dparticlespritesequence_p.h.

Referenced by setFrameIndex().

◆ interpolate

bool QQuick3DParticleSpriteSequence::interpolate
readwrite

Definition at line 33 of file qquick3dparticlespritesequence_p.h.

Referenced by setInterpolate().

◆ randomStart

bool QQuick3DParticleSpriteSequence::randomStart
readwrite

Definition at line 36 of file qquick3dparticlespritesequence_p.h.

Referenced by setRandomStart().


The documentation for this class was generated from the following files: