diff options
Diffstat (limited to 'src/runtime/api/q3dspresentation.cpp')
-rw-r--r-- | src/runtime/api/q3dspresentation.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/runtime/api/q3dspresentation.cpp b/src/runtime/api/q3dspresentation.cpp index 3a8e37e..db2f77a 100644 --- a/src/runtime/api/q3dspresentation.cpp +++ b/src/runtime/api/q3dspresentation.cpp @@ -633,6 +633,23 @@ void Q3DSPresentation::tabletEvent(QTabletEvent *e) } #endif +/*! + Returns the underlying Q3DSEngine. See \l{Advanced Scene Manipulation via + the Qt 3D Studio Runtime Private C++ Classes} for details on using such + private APIs. + + The engine is only available when a presentation is loaded, the return + value is \c null otherwise. + */ +Q3DSEngine *Q3DSPresentation::engine() const +{ + Q_D(const Q3DSPresentation); + if (d->controller && !d->source.isEmpty()) + return d->controller->pcEngine(); + + return nullptr; +} + void Q3DSPresentationPrivate::setController(Q3DSPresentationController *c) { if (controller == c) |