C

Q3DSSceneElement Class

Controls the special Scene or Component scene objects in a Qt 3D Studio presentation. More...

Header: #include <Q3DSSceneElement>
qmake: QT += 3dstudioruntime2
Since: Qt 3D Studio 2.0
Instantiated By: SceneElement
Inherits: Q3DSElement

Properties

Public Functions

Q3DSSceneElement(Q3DSPresentation *presentation, const QString &elementPath, QObject *parent = nullptr)
virtual ~Q3DSSceneElement()
int currentSlideIndex() const
QString currentSlideName() const
int previousSlideIndex() const
QString previousSlideName() const

Public Slots

void goToSlide(bool next, bool wrap)
void goToTime(float timeSeconds)
void setCurrentSlideIndex(int currentSlideIndex)
void setCurrentSlideName(const QString &currentSlideName)

Signals

void currentSlideIndexChanged(int currentSlideIndex)
void currentSlideNameChanged(const QString &currentSlideName)
void previousSlideIndexChanged(int previousSlideIndex)
void previousSlideNameChanged(const QString &previousSlideName)

Static Public Members

const QMetaObject staticMetaObject
  • 9 static public members inherited from QObject

Additional Inherited Members

  • 9 protected functions inherited from QObject

Detailed Description

Controls the special Scene or Component scene objects in a Qt 3D Studio presentation.

This class is a convenience class for controlling the properties of Scene and Component objects in the scene. These are special since they have a time context, meaning they control a timline and a set of associated slides.

Note: The functionality of Q3DSSceneElement is equivalent to Q3DSPresentation::goToTime() and Q3DSPresentation::goToSlide().

See also Q3DSPresentation, Q3DSWidget, Q3DSSurfaceViewer, and Q3DSElement.

Property Documentation

currentSlideIndex : int

Holds the index of the currently active slide of the tracked time context.

Note: If this property is set to something else than the default slide for the scene at the initial declaration of SceneElement, a changed signal for the default slide may still be emitted before the slide changes to the desired one. This happens in order to ensure we end up with the index of the slide that is actually shown even if the slide specified in the initial declaration is invalid.

Access functions:

int currentSlideIndex() const
void setCurrentSlideIndex(int currentSlideIndex)

Notifier signal:

void currentSlideIndexChanged(int currentSlideIndex)

currentSlideName : QString

Holds the name of the currently active slide of the tracked time context.

Note: If this property is set to something else than the default slide for the scene at the initial declaration of SceneElement, a changed signal for the default slide may still be emitted before the slide changes to the desired one. This happens in order to ensure we end up with the index of the slide that is actually shown even if the slide specified in the initial declaration is invalid.

Access functions:

QString currentSlideName() const
void setCurrentSlideName(const QString &currentSlideName)

Notifier signal:

void currentSlideNameChanged(const QString &currentSlideName)

previousSlideIndex : const int

Holds the index of the previously active slide of the tracked time context.

This property is read-only.

Access functions:

int previousSlideIndex() const

Notifier signal:

void previousSlideIndexChanged(int previousSlideIndex)

previousSlideName : const QString

Holds the name of the previously active slide of the tracked time context.

This property is read-only.

Access functions:

QString previousSlideName() const

Notifier signal:

void previousSlideNameChanged(const QString &previousSlideName)

Member Function Documentation

Q3DSSceneElement::Q3DSSceneElement(Q3DSPresentation *presentation, const QString &elementPath, QObject *parent = nullptr)

Constructs a Q3DSSceneElement instance and associated it with the object specified by elementPath and the given presentation. An optional parent object can be specified.

[virtual] Q3DSSceneElement::~Q3DSSceneElement()

Destructor.

[slot] void Q3DSSceneElement::goToSlide(bool next, bool wrap)

Requests a time context (a Scene or a Component object) to change to the next or previous slide, depending on the value of next. If the context is already at the last or first slide, wrap defines if wrapping over to the first or last slide, respectively, occurs.

[slot] void Q3DSSceneElement::goToTime(float timeSeconds)

Moves the timeline for a time context (a Scene or a Component element) to a specific position. The position is given in seconds in timeSeconds.

Available under certain Qt licenses.
Find out more.