C
Q3DSSceneElement Class
Control class for scene and component elements in a Qt 3D Studio presentation. More...
Header: | #include <q3dssceneelement.h> |
Inherits: | Q3DSElement |
Properties
- currentSlideIndex : int
- currentSlideName : QString
- previousSlideIndex : const int
- previousSlideName : const QString
- 1 property inherited from Q3DSElement
- 1 property inherited from QObject
Public Functions
Q3DSSceneElement(QObject *parent = nullptr) | |
Q3DSSceneElement(const QString &elementPath, QObject *parent = nullptr) | |
Q3DSSceneElement(Q3DSPresentation *presentation, const QString &elementPath, QObject *parent = nullptr) | |
~Q3DSSceneElement() | |
int | currentSlideIndex() const |
QString | currentSlideName() const |
int | previousSlideIndex() const |
QString | previousSlideName() const |
- 1 public function inherited from Q3DSElement
- 32 public functions inherited from QObject
Public Slots
void | goToSlide(bool next, bool wrap) |
void | goToTime(float time) |
void | setCurrentSlideIndex(int currentSlideIndex) |
void | setCurrentSlideName(const QString ¤tSlideName) |
- 3 public slots inherited from Q3DSElement
- 1 public slot inherited from QObject
Signals
void | currentSlideIndexChanged(int currentSlideIndex) |
void | currentSlideNameChanged(const QString ¤tSlideName) |
void | previousSlideIndexChanged(int previousSlideIndex) |
void | previousSlideNameChanged(const QString &previousSlideName) |
- 1 signal inherited from Q3DSElement
- 2 signals inherited from QObject
Additional Inherited Members
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
Control class for scene and component elements in a Qt 3D Studio presentation.
This class is a convenience class for managing the slides of a single time context (a Scene or a Component element) of a presentation.
See also Q3DSPresentation, Q3DSWidget, and Q3DSSurfaceViewer.
Property Documentation
currentSlideIndex : int
Holds the index of the currently active slide of the tracked time context.
Changing the current slide via this property is asynchronous. The property value will not actually change until the next frame has been processed, and even then only if the new slide was valid.
Note: If this property is set to something else than the default slide for the scene at the initial declaration of SceneElement, you will still get an extra changed signal for the default slide 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.
Changing the current slide via this property is asynchronous. The property value will not actually change until the next frame has been processed, and even then only if the new slide was valid.
Note: If this property is set to something else than the default slide for the scene at the initial declaration of SceneElement, you will still get an extra changed signal for the default slide before the slide changes to the desired one. This happens in order to ensure we end up with the name 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 ¤tSlideName) |
Notifier signal:
void | currentSlideNameChanged(const QString ¤tSlideName) |
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(QObject *parent = nullptr)
Default constructs an instance of Q3DSSceneElement.
Q3DSSceneElement::Q3DSSceneElement(const QString &elementPath, QObject *parent = nullptr)
Constructs a Q3DSSceneElement instance and initializes the elementPath. An optional parent object can be specified.
Q3DSSceneElement::Q3DSSceneElement(Q3DSPresentation *presentation, const QString &elementPath, QObject *parent = nullptr)
Constructs a Q3DSSceneElement instance and initializes the elementPath. The constructed instance is automatically registered for the presentation. An optional parent object can be specified.
Q3DSSceneElement::~Q3DSSceneElement()
Destroys the instance of Q3DSSceneElement.
[slot]
void Q3DSSceneElement::goToSlide(bool next, bool wrap)
Requests the time context specified by this scene to change to the next or the previous slide, depending on the value of next. If the context is already at the last or first slide, wrap defines if change occurs to the opposite end.
[slot]
void Q3DSSceneElement::goToTime(float time)
Sets the time context specified by this scene to a specific playback time in seconds.
For behavior details, see Q3DSPresentation::goToTime() documentation.
Available under certain Qt licenses.
Find out more.