C

Q3DSSceneElement Class

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

Header: #include <Q3DSSceneElement>
Since: Qt 3D Studio 2.0
Instantiated By: SceneElement
Inherits: Q3DSElement

This class was introduced in Qt 3D Studio 2.0.

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 time)
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)

Detailed Description

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, Q3DSSurfaceViewer, and Q3DSElement.

Property Documentation

currentSlideIndex : int

Holds the index of the currently active slide of the tracked time context. Slide indexing starts from one.

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)

See also Q3DSPresentation::slideEntered().

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.

[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 time)

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

[virtual] Q3DSSceneElement::~Q3DSSceneElement()

Destructor.

Available under certain Qt licenses.
Find out more.