summaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2019-06-28 10:46:43 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2019-06-28 11:06:43 +0300
commit90702603c5e525190c94f24c10cb9ff83e7abb19 (patch)
treedcf76e4de1dccb9646fbd35c6b9a5a1ea2009922 /src/api
parent427bf6fac383f066a1378679a88546b16f156c7e (diff)
parent0c4183e5748576845d9ce2aa61f56cf5c69c6350 (diff)
Merge "Merge branch '2.4'"
Diffstat (limited to 'src/api')
-rw-r--r--src/api/studio3d/doc/doc.pri9
-rw-r--r--src/api/studio3d/doc/online/qtstudio3d.qdocconf2
-rw-r--r--src/api/studio3d/doc/qt3dstudio-opengl-runtime-project.qdocconf63
-rw-r--r--src/api/studio3d/doc/qtstudio3d.qdocconf2
-rw-r--r--src/api/studio3d/doc/src/attributenames.html911
-rw-r--r--src/api/studio3d/doc/src/attributenames.qdoc71
-rw-r--r--src/api/studio3d/doc/src/building-embedded.qdoc82
-rw-r--r--src/api/studio3d/doc/src/building-integrity.qdoc71
-rw-r--r--src/api/studio3d/doc/src/building-opengl-runtime.qdoc44
-rw-r--r--src/api/studio3d/doc/src/building-qnx.qdoc162
-rw-r--r--src/api/studio3d/doc/src/copyright.qdoc38
-rw-r--r--src/api/studio3d/doc/src/embedded.qdoc32
-rw-r--r--src/api/studio3d/doc/src/examples.qdoc41
-rw-r--r--src/api/studio3d/doc/src/gettingstarted.qdoc117
-rw-r--r--src/api/studio3d/doc/src/images/add-build-step-qnx.pngbin0 -> 212284 bytes
-rw-r--r--src/api/studio3d/doc/src/images/add-build-step.pngbin0 -> 170273 bytes
-rw-r--r--src/api/studio3d/doc/src/images/add-qnx-device.pngbin0 -> 19121 bytes
-rw-r--r--src/api/studio3d/doc/src/images/customsignal.pngbin0 -> 28206 bytes
-rw-r--r--src/api/studio3d/doc/src/images/devices-tab.pngbin0 -> 118542 bytes
-rw-r--r--src/api/studio3d/doc/src/images/embedded-linux-2.pngbin0 -> 136019 bytes
-rw-r--r--src/api/studio3d/doc/src/images/embedded-linux.pngbin0 -> 177270 bytes
-rw-r--r--src/api/studio3d/doc/src/images/intro-app.pngbin0 -> 368639 bytes
-rw-r--r--src/api/studio3d/doc/src/images/intro-editor.pngbin0 -> 289164 bytes
-rw-r--r--src/api/studio3d/doc/src/images/intro-viewer.pngbin0 -> 338976 bytes
-rw-r--r--src/api/studio3d/doc/src/images/ogl-runtime-pro.pngbin0 -> 68177 bytes
-rw-r--r--src/api/studio3d/doc/src/images/qnx-prebuild.pngbin0 -> 112522 bytes
-rw-r--r--src/api/studio3d/doc/src/images/qnx-sdp-folder.pngbin0 -> 22958 bytes
-rw-r--r--src/api/studio3d/doc/src/images/qt-installer-qnx-prebuild.pngbin0 -> 94480 bytes
-rw-r--r--src/api/studio3d/doc/src/images/qt3dstudio-pro.pngbin0 -> 52413 bytes
-rw-r--r--src/api/studio3d/doc/src/images/select-prebuilt-qnx-component.pngbin0 -> 127837 bytes
-rw-r--r--src/api/studio3d/doc/src/images/twolayers.pngbin0 -> 4564 bytes
-rw-r--r--src/api/studio3d/doc/src/index.qdoc45
-rw-r--r--src/api/studio3d/doc/src/mobile.qdoc32
-rw-r--r--src/api/studio3d/doc/src/module.qdoc111
-rw-r--r--src/api/studio3d/doc/src/requirements.qdoc100
-rw-r--r--src/api/studio3d/doc/src/toc.qdoc40
-rw-r--r--src/api/studio3d/doc/style/qt5-sidebar.html26
-rw-r--r--src/api/studio3d/q3dscommandqueue.cpp5
-rw-r--r--src/api/studio3d/q3dscommandqueue_p.h2
-rw-r--r--src/api/studio3d/q3dsdatainput.cpp105
-rw-r--r--src/api/studio3d/q3dsdatainput.h3
-rw-r--r--src/api/studio3d/q3dsdataoutput.cpp27
-rw-r--r--src/api/studio3d/q3dselement.cpp6
-rw-r--r--src/api/studio3d/q3dsgeometry.cpp212
-rw-r--r--src/api/studio3d/q3dspresentation.cpp428
-rw-r--r--src/api/studio3d/q3dssceneelement.cpp16
-rw-r--r--src/api/studio3d/q3dssurfaceviewer.cpp3
-rw-r--r--src/api/studio3d/q3dsviewersettings.cpp92
-rw-r--r--src/api/studio3d/q3dsviewersettings.h7
-rw-r--r--src/api/studio3d/q3dsviewersettings_p.h2
-rw-r--r--src/api/studio3d/studio3d.pro2
-rw-r--r--src/api/studio3dqml/plugins.qmltypes438
-rw-r--r--src/api/studio3dqml/q3dspresentationitem.cpp44
-rw-r--r--src/api/studio3dqml/q3dsrenderer.cpp10
-rw-r--r--src/api/studio3dqml/q3dsrenderer_p.h5
-rw-r--r--src/api/studio3dqml/q3dsstudio3d.cpp26
-rw-r--r--src/api/studio3dqml/q3dsstudio3d_p.h2
57 files changed, 3138 insertions, 296 deletions
diff --git a/src/api/studio3d/doc/doc.pri b/src/api/studio3d/doc/doc.pri
new file mode 100644
index 0000000..ec30e40
--- /dev/null
+++ b/src/api/studio3d/doc/doc.pri
@@ -0,0 +1,9 @@
+build_online_docs: \
+ QMAKE_DOCS = $$PWD/online/qtstudio3d.qdocconf
+else: \
+ QMAKE_DOCS = $$PWD/qtstudio3d.qdocconf
+
+OTHER_FILES += \
+ $$PWD/src/*.qdoc \
+ $$PWD/src/*.html \
+ $$PWD/src/images/*.png \
diff --git a/src/api/studio3d/doc/online/qtstudio3d.qdocconf b/src/api/studio3d/doc/online/qtstudio3d.qdocconf
new file mode 100644
index 0000000..a1dd74d
--- /dev/null
+++ b/src/api/studio3d/doc/online/qtstudio3d.qdocconf
@@ -0,0 +1,2 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults-online-commercial.qdocconf)
+include(../qt3dstudio-opengl-runtime-project.qdocconf)
diff --git a/src/api/studio3d/doc/qt3dstudio-opengl-runtime-project.qdocconf b/src/api/studio3d/doc/qt3dstudio-opengl-runtime-project.qdocconf
new file mode 100644
index 0000000..ece96a5
--- /dev/null
+++ b/src/api/studio3d/doc/qt3dstudio-opengl-runtime-project.qdocconf
@@ -0,0 +1,63 @@
+project = QtStudio3D
+description = Qt 3D Studio OpenGL Runtime Reference
+version = $QT_VERSION
+# url is relative to the parent project
+url = openglruntime
+
+moduleheader = QtStudio3D
+
+sourcedirs += ./src \
+ ../.. \
+ ../../../qmlstreamer
+
+headerdirs += ../.. \
+ ../../../qmlstreamer
+
+imagedirs += ./src/images
+
+depends = qtcore qtgui qtwidgets qtqml qtquick qtquickcontrols qt3dstudio qt3dstudioruntime2 qtdoc qmake
+
+qhp.projects = QtStudio3D
+
+qhp.QtStudio3D.file = qtstudio3d.qhp
+qhp.QtStudio3D.namespace = io.qt.qtstudio3d.$QT_VERSION_TAG
+qhp.QtStudio3D.virtualFolder = qtstudio3d
+qhp.QtStudio3D.indexTitle = Qt 3D Studio OpenGL Runtime
+qhp.QtStudio3D.indexRoot =
+
+qhp.QtStudio3D.filterAttributes = qtstudio3d $QT_VER
+qhp.QtStudio3D.customFilters.Qt.name = QtStudio3D $QT_VER
+qhp.QtStudio3D.customFilters.Qt.filterAttributes = qtstudio3d $QT_VER
+
+qhp.QtStudio3D.subprojects = qmltypes classes
+
+qhp.QtStudio3D.subprojects.qmltypes.title = QML Types
+qhp.QtStudio3D.subprojects.qmltypes.indexTitle = Qt 3D Studio OpenGL Runtime QML Types
+qhp.QtStudio3D.subprojects.qmltypes.selectors = qmltype
+qhp.QtStudio3D.subprojects.qmltypes.sortPages = true
+
+qhp.QtStudio3D.subprojects.classes.title = C++ Classes
+qhp.QtStudio3D.subprojects.classes.indexTitle = Qt 3D Studio OpenGL Runtime C++ Classes
+qhp.QtStudio3D.subprojects.classes.selectors = class namespace doc:headerfile
+qhp.QtStudio3D.subprojects.classes.sortPages = true
+
+# Add an .html file with sidebar content, used in the online style
+HTML.stylesheets += style/qt5-sidebar.html
+
+navigation.homepage = "Qt 3D Studio OpenGL Runtime"
+navigation.hometitle = "Qt 3D Studio OpenGL Runtime"
+navigation.hometitle = "OpenGL Runtime"
+navigation.landingpage = "Qt 3D Studio OpenGL Runtime"
+navigation.landingtitle = OpenGL Runtime
+navigation.cppclassespage = Qt 3D Studio OpenGL Runtime C++ Classes
+navigation.qmltypespage = Qt 3D Studio OpenGL Runtime QML Types
+buildversion = "Qt 3D Studio OpenGL Runtime $QT_VER Manual"
+
+macro.RUNTIME = Qt 3D Studio OpenGL Runtime
+
+#TODO: adjust these once we have runtime-specific examples
+# examplesinstallpath = studio3d
+# exampledirs += ../examples/studio3d
+
+Cpp.ignoretokens += Q3DSV_EXPORT Q_STUDIO3D_EXPORT
+depends += qt3d
diff --git a/src/api/studio3d/doc/qtstudio3d.qdocconf b/src/api/studio3d/doc/qtstudio3d.qdocconf
new file mode 100644
index 0000000..9b76104
--- /dev/null
+++ b/src/api/studio3d/doc/qtstudio3d.qdocconf
@@ -0,0 +1,2 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+include(qt3dstudio-opengl-runtime-project.qdocconf)
diff --git a/src/api/studio3d/doc/src/attributenames.html b/src/api/studio3d/doc/src/attributenames.html
new file mode 100644
index 0000000..fca55df
--- /dev/null
+++ b/src/api/studio3d/doc/src/attributenames.html
@@ -0,0 +1,911 @@
+\raw HTML
+<table id='scripting-attributes'>
+<tbody></tbody>
+<tr><th colspan="4">Scenes</td></tr>
+<tr>
+<td class='formal'>Name</td>
+<td class='scripting'>name</td>
+<td class='type'>string</td>
+</tr>
+<tr>
+<td class='formal'>Enable Background Color</td>
+<td class='scripting'>bgcolorenable</td>
+<td class='type'>boolean</td>
+</tr>
+<tr>
+<td class='formal'>Background Color R</td>
+<td class='scripting'>backgroundcolor.r</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Background Color G</td>
+<td class='scripting'>backgroundcolor.g</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Background Color B</td>
+<td class='scripting'>backgroundcolor.b</td>
+<td class='type'>number</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Elements other than Scenes</td></tr>
+<tr>
+<td class='formal'>Element Name</td>
+<td class='scripting'>name</td>
+<td class='type'>string</td>
+</tr>
+<tr>
+<td class='formal'>(Eyeball)</td>
+<td class='scripting'>eyeball</td>
+<td class='type'>boolean</td>
+</tr>
+<tr>
+<td class='formal'>Timebar Start</td>
+<td class='scripting'>starttime</td>
+<td class='type'>number</td>
+<td class='note'>
+in integer milliseconds
+</td>
+</tr>
+<tr>
+<td class='formal'>Timebar End</td>
+<td class='scripting'>endtime</td>
+<td class='type'>number</td>
+<td class='note'>
+in integer milliseconds
+</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Layers</td></tr>
+<tr>
+<td class='formal'>Disable Depth Test</td>
+<td class='scripting'>disabledepthtest</td>
+<td class='type'>boolean</td>
+</tr>
+<tr>
+<td class='formal'>Progressive AA</td>
+<td class='scripting'>progressiveaa</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'None'</code>, <code>'2x'</code>, <code>'4x'</code>, <code>'8x'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Multisample AA</td>
+<td class='scripting'>multisampleaa</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'None'</code>, <code>'2x'</code>, <code>'4x'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Temporal AA</td>
+<td class='scripting'>temporalaa</td>
+<td class='type'>boolean</td>
+</tr>
+<tr>
+<td class='formal'>Layer Background</td>
+<td class='scripting'>background</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Transparent'</code>, <code>'Unspecified'</code>, <code>'SolidColor'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Background Color R</td>
+<td class='scripting'>backgroundcolor.r</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Background Color G</td>
+<td class='scripting'>backgroundcolor.g</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Background Color B</td>
+<td class='scripting'>backgroundcolor.b</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Blend Type</td>
+<td class='scripting'>blendtype</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Normal'</code>, <code>'Screen'</code>, <code>'Multiply'</code>, <code>'Add'</code>, <code>'*Overlay'</code>, <code>'*ColorBurn'</code>, <code>'*ColorDodge'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Horizontal Fields</td>
+<td class='scripting'>horzfields</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Left/Width'</code>, <code>'Left/Right'</code>, <code>'Width/Right'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Left</td>
+<td class='scripting'>left</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Left Units</td>
+<td class='scripting'>leftunits</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'pixels'</code>, <code>'percent'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Width</td>
+<td class='scripting'>width</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Width Units</td>
+<td class='scripting'>widthunits</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'pixels'</code>, <code>'percent'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Right</td>
+<td class='scripting'>right</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Right Units</td>
+<td class='scripting'>rightunits</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'pixels'</code>, <code>'percent'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Vertical Fields</td>
+<td class='scripting'>vertfields</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Top/Height'</code>, <code>'Top/Bottom'</code>, <code>'Height/Bottom'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Top</td>
+<td class='scripting'>top</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Top Units</td>
+<td class='scripting'>topunits</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'pixels'</code>, <code>'percent'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Height</td>
+<td class='scripting'>height</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Height Units</td>
+<td class='scripting'>heightunits</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'pixels'</code>, <code>'percent'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Bottom</td>
+<td class='scripting'>bottom</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Bottom Units</td>
+<td class='scripting'>bottomunits</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'pixels'</code>, <code>'percent'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Ambient Occlusion</td>
+<td class='scripting'>aostrength</td>
+<td class='type'>number</td>
+<td class='note'>
+values between 0 and 100
+</td>
+</tr>
+<tr>
+<td class='formal'>AO Distance</td>
+<td class='scripting'>aodistance</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>AO Softness</td>
+<td class='scripting'>aosoftness</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>AO Threshold</td>
+<td class='scripting'>aobias</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>AO Sampling Rate</td>
+<td class='scripting'>aosamplerate</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>AO Dithering</td>
+<td class='scripting'>aodither</td>
+<td class='type'>boolean</td>
+</tr>
+<tr>
+<td class='formal'>Shadow Strength</td>
+<td class='scripting'>shadowstrength</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Shadow Distance</td>
+<td class='scripting'>shadowdist</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Shadow Softness</td>
+<td class='scripting'>shadowsoftness</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Shadow Threshold</td>
+<td class='scripting'>shadowbias</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Light Probe</td>
+<td class='scripting'>lightprobe</td>
+<td class='type'>image element</td>
+</tr>
+<tr>
+<td class='formal'>IBL Horizon Cutoff</td>
+<td class='scripting'>probehorizon</td>
+<td class='type'>number</td>
+<td class='note'>
+values from -1 (no horizon) to -0.001 (hard edge)
+</td>
+</tr>
+<tr>
+<td class='formal'>Sub-Presentation</td>
+<td class='scripting'>sourcepath</td>
+<td class='type'>string</td>
+<td class='note'>
+id of the sub-presentation to display
+</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Nodes</td></tr>
+<tr>
+<td class='formal'>Position X</td>
+<td class='scripting'>position.x</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Position Y</td>
+<td class='scripting'>position.y</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Position Z</td>
+<td class='scripting'>position.z</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Rotation X</td>
+<td class='scripting'>rotation.x</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Rotation Y</td>
+<td class='scripting'>rotation.y</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Rotation Z</td>
+<td class='scripting'>rotation.z</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Scale X</td>
+<td class='scripting'>scale.x</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Scale Y</td>
+<td class='scripting'>scale.y</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Scale Z</td>
+<td class='scripting'>scale.z</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Pivot X</td>
+<td class='scripting'>pivot.x</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Pivot Y</td>
+<td class='scripting'>pivot.y</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Pivot Z</td>
+<td class='scripting'>pivot.z</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Opacity</td>
+<td class='scripting'>opacity</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'></td>
+<td class='scripting'>orientation</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Left Handed'</code>, <code>'Right Handed'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'></td>
+<td class='scripting'>rotationorder</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'XYZ'</code>, <code>'YZX'</code>, <code>'ZXY'</code>, <code>'XZY'</code>, <code>'YXZ'</code>, <code>'ZYX'</code>, <code>'XYZr'</code>, <code>'YZXr'</code>, <code>'ZXYr'</code>, <code>'XZYr'</code>, <code>'YXZr'</code>, <code>'ZYXr'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'></td>
+<td class='scripting'>ignoresparent</td>
+<td class='type'>boolean</td>
+<td class='note'>
+prevents parent transformation from being applied [ignored as of 2.0]
+</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Aliases</td></tr>
+<tr>
+<td class='formal'>Reference</td>
+<td class='scripting'>referencednode</td>
+<td class='type'>string</td>
+<td class='note'>
+relative or absolute element path
+</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Cameras</td></tr>
+<tr>
+<td class='formal'>Orthographic</td>
+<td class='scripting'>orthographic</td>
+<td class='type'>boolean</td>
+</tr>
+<tr>
+<td class='formal'>Field of View</td>
+<td class='scripting'>fov</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Clipping Start</td>
+<td class='scripting'>clipnear</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Clipping End</td>
+<td class='scripting'>clipfar</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Runtime Scale Mode</td>
+<td class='scripting'>scalemode</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Fit'</code>, <code>'Same Size'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Runtime Scale Anchor</td>
+<td class='scripting'>scaleanchor</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Center'</code>, <code>'NW'</code>, <code>'N'</code>, <code>'NE'</code>, <code>'E'</code>, <code>'SE'</code>, <code>'S'</code>, <code>'SW'</code>, <code>'W'</code>
+</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Lights</td></tr>
+<tr>
+<td class='formal'>Scope</td>
+<td class='scripting'>scope</td>
+<td class='type'>string</td>
+<td class='note'>
+full path to the element
+</td>
+</tr>
+<tr>
+<td class='formal'>Light Type</td>
+<td class='scripting'>lighttype</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Directional'</code>, <code>'Point'</code>, <code>'Area'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Light Color R</td>
+<td class='scripting'>lightdiffuse.r</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Light Color G</td>
+<td class='scripting'>lightdiffuse.g</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Light Color B</td>
+<td class='scripting'>lightdiffuse.b</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Specular Color R</td>
+<td class='scripting'>lightspecular.r</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Specular Color G</td>
+<td class='scripting'>lightspecular.g</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Specular Color B</td>
+<td class='scripting'>lightspecular.b</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Ambient Color R</td>
+<td class='scripting'>lightambient.r</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Ambient Color G</td>
+<td class='scripting'>lightambient.g</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Ambient Color B</td>
+<td class='scripting'>lightambient.b</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Brightness</td>
+<td class='scripting'>brightness</td>
+<td class='type'>number</td>
+<td class='note'>
+only applies to point lights
+</td>
+</tr>
+<tr>
+<td class='formal'>Linear Fade</td>
+<td class='scripting'>linearfade</td>
+<td class='type'>number</td>
+<td class='note'>
+only applies to point lights
+</td>
+</tr>
+<tr>
+<td class='formal'>Exponential Fade</td>
+<td class='scripting'>expfade</td>
+<td class='type'>number</td>
+<td class='note'>
+only applies to point lights
+</td>
+</tr>
+<tr>
+<td class='formal'>Cast Shadows?</td>
+<td class='scripting'>castshadow</td>
+<td class='type'>boolean</td>
+</tr>
+<tr>
+<td class='formal'>Shadow Darkness</td>
+<td class='scripting'>shdwfactor</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Shadow Softness</td>
+<td class='scripting'>shdwfilter</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Shadow Resolution</td>
+<td class='scripting'>shdwmapres</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'256'</code>, <code>'512'</code>, <code>'1024'</code>, <code>'2048'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Shadow Depth Bias</td>
+<td class='scripting'>shdwbias</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Shadow Far Clip</td>
+<td class='scripting'>shdwmapfar</td>
+<td class='type'>number</td>
+<tr>
+<td class='formal'>Shadow Field of View</td>
+<td class='scripting'>shdwmapfov</td>
+<td class='type'>number</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Groups</td></tr>
+<tr>
+<td class='formal'>Import</td>
+<td class='scripting'>sourcepath</td>
+<td class='type'>string</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Text</td></tr>
+<tr>
+<td class='formal'>Text String</td>
+<td class='scripting'>textstring</td>
+<td class='type'>string</td>
+</tr>
+<tr>
+<td class='formal'>Text Color R</td>
+<td class='scripting'>textcolor.r</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Text Color G</td>
+<td class='scripting'>textcolor.g</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Text Color B</td>
+<td class='scripting'>textcolor.b</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Font</td>
+<td class='scripting'>font</td>
+<td class='type'>string</td>
+</tr>
+<tr>
+<td class='formal'>Font Size</td>
+<td class='scripting'>size</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Horizontal Alignment</td>
+<td class='scripting'>horzalign</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Left'</code>, <code>'Center'</code>, <code>'Right'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Vertical Alignment</td>
+<td class='scripting'>vertalign</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Top'</code>, <code>'Middle'</code>, <code>'Bottom'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Leading</td>
+<td class='scripting'>leading</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Tracking</td>
+<td class='scripting'>tracking</td>
+<td class='type'>number</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Models</td></tr>
+<tr>
+<td class='formal'>Mesh</td>
+<td class='scripting'>sourcepath</td>
+<td class='type'>string</td>
+</tr>
+<tr>
+<td class='formal'>Tessellation Mode</td>
+<td class='scripting'>tessellation</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'None'</code>, <code>'Linear'</code>, <code>'Phong'</code>, <code>'NPatch'</code> [ignored as of 2.0]
+</td>
+</tr>
+<tr>
+<td class='formal'>Edge Tessellation</td>
+<td class='scripting'>edgetess</td>
+<td class='type'>number</td>
+<td class='note'>
+[ignored as of 2.0]
+</td>
+</tr>
+<tr>
+<td class='formal'>Inner Tessellation</td>
+<td class='scripting'>innertess</td>
+<td class='type'>number</td>
+<td class='note'>
+[ignored as of 2.0]
+</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Standard Materials</td></tr>
+<tr>
+<td class='formal'>Lighting</td>
+<td class='scripting'>shaderlighting</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Vertex'</code>, <code>'Pixel'</code>, <code>'None'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Blending Mode</td>
+<td class='scripting'>blendmode</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Normal'</code>, <code>'Screen'</code>, <code>'Multiply'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Diffuse Color R</td>
+<td class='scripting'>diffuse.r</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Diffuse Color G</td>
+<td class='scripting'>diffuse.g</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Diffuse Color B</td>
+<td class='scripting'>diffuse.b</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Diffuse Map</td>
+<td class='scripting'>diffusemap</td>
+<td class='type'>image element</td>
+<td class='note'>
+to change the image set the <code>sourcepath</code> attribute on the image element
+</td>
+</tr>
+<tr>
+<td class='formal'>Diffuse Map 2</td>
+<td class='scripting'>diffusemap2</td>
+<td class='type'>image element</td>
+<td class='note'>
+to change the image set the <code>sourcepath</code> attribute on the image element
+</td>
+</tr>
+<tr>
+<td class='formal'>Diffuse Map 3</td>
+<td class='scripting'>diffusemap3</td>
+<td class='type'>image element</td>
+<td class='note'>
+to change the image set the <code>sourcepath</code> attribute on the image element
+</td>
+</tr>
+<tr>
+<td class='formal'>Specular Reflection</td>
+<td class='scripting'>specularreflection</td>
+<td class='type'>image element</td>
+<td class='note'>
+to change the image set the <code>sourcepath</code> attribute on the image element
+</td>
+</tr>
+<tr>
+<td class='formal'>Specular Tint R</td>
+<td class='scripting'>speculartint.r</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Specular Tint G</td>
+<td class='scripting'>speculartint.g</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Specular Tint B</td>
+<td class='scripting'>speculartint.b</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Specular Amount</td>
+<td class='scripting'>specularamount</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Specular Map</td>
+<td class='scripting'>specularmap</td>
+<td class='type'>image element</td>
+<td class='note'>
+to change the image set the <code>sourcepath</code> attribute on the image element
+</td>
+</tr>
+<tr>
+<td class='formal'>Specular Model</td>
+<td class='scripting'>specularmodel</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Default'</code>, <code>'KGGX'</code>, <code>'KWard'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>Fresnel Power</td>
+<td class='scripting'>fresnelPower</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Index of Refraction</td>
+<td class='scripting'>ior</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Specular Roughness</td>
+<td class='scripting'>specularroughness</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Bump Map</td>
+<td class='scripting'>bumpmap</td>
+<td class='type'>image element</td>
+<td class='note'>
+to change the image set the <code>sourcepath</code> attribute on the image element
+</td>
+</tr>
+<tr>
+<td class='formal'>Normal Map</td>
+<td class='scripting'>normalmap</td>
+<td class='type'>image element</td>
+<td class='note'>
+to change the image set the <code>sourcepath</code> attribute on the image element
+</td>
+</tr>
+<tr>
+<td class='formal'>Bump Amount</td>
+<td class='scripting'>bumpamount</td>
+<td class='type'>number</td>
+<td class='note'>
+affects both bump and normal maps
+</td>
+</tr>
+<tr>
+<td class='formal'>Displacement Map</td>
+<td class='scripting'>displacementmap</td>
+<td class='type'>image element</td>
+<td class='note'>
+to change the image set the <code>sourcepath</code> attribute on the image element
+</td>
+</tr>
+<tr>
+<td class='formal'>Displacement Amount</td>
+<td class='scripting'>displaceamount</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Opacity</td>
+<td class='scripting'>opacity</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Opacity Map</td>
+<td class='scripting'>opacitymap</td>
+<td class='type'>image element</td>
+<td class='note'>
+to change the image set the <code>sourcepath</code> attribute on the image element
+</td>
+</tr>
+<tr>
+<td class='formal'>Emissive Power</td>
+<td class='scripting'>emissivepower</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Emissive Map</td>
+<td class='scripting'>emissivemap</td>
+<td class='type'>image element</td>
+<td class='note'>
+to change the image set the <code>sourcepath</code> attribute on the image element
+</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Material References</td></tr>
+<tr>
+<td class='formal'>Referenced Material</td>
+<td class='scripting'>referencedmaterial</td>
+<td class='type'>string</td>
+<td class='note'>
+relative or absolute element path
+</td>
+</tr>
+<tbody></tbody>
+<tr><th colspan="4">Images</td></tr>
+<tr>
+<td class='formal'>U Repeat</td>
+<td class='scripting'>scaleu</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>V Repeat</td>
+<td class='scripting'>scalev</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Texture Mapping</td>
+<td class='scripting'>mappingmode</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'UV Mapping'</code>, <code>'Environmental Mapping'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>U Tiling</td>
+<td class='scripting'>tilingmodehorz</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Tiled'</code>, <code>'Mirrored'</code>, <code>'No Tiling'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>V Tiling</td>
+<td class='scripting'>tilingmodevert</td>
+<td class='type'>string</td>
+<td class='note'>
+values: <code>'Tiled'</code>, <code>'Mirrored'</code>, <code>'No Tiling'</code>
+</td>
+</tr>
+<tr>
+<td class='formal'>UV Rotation</td>
+<td class='scripting'>rotationuv</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>U Position</td>
+<td class='scripting'>positionu</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>V Position</td>
+<td class='scripting'>positionv</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>U Pivot</td>
+<td class='scripting'>pivotu</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>V Pivot</td>
+<td class='scripting'>pivotv</td>
+<td class='type'>number</td>
+</tr>
+<tr>
+<td class='formal'>Sub-Presentation</td>
+<td class='scripting'>subpresentation</td>
+<td class='type'>string</td>
+<td class='note'>
+id of the sub-presentation to display
+</td>
+</tr>
+<tr>
+<td class='formal'>Source Path</td>
+<td class='scripting'>sourcepath</td>
+<td class='type'>string</td>
+<td class='note'>
+path to the image
+</td>
+</tr>
+</table>
+\endraw
diff --git a/src/api/studio3d/doc/src/attributenames.qdoc b/src/api/studio3d/doc/src/attributenames.qdoc
new file mode 100644
index 0000000..e499f17
--- /dev/null
+++ b/src/api/studio3d/doc/src/attributenames.qdoc
@@ -0,0 +1,71 @@
+!/****************************************************************************
+**
+** Copyright (C) 1993-2009 NVIDIA Corporation.
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// Pull in attributenames.html into qdoc. Note that attributenames.html is
+// manually maintained since 2.0 and is not auto-generated.
+
+/*!
+ \page qt3dstudio-opengl-runtime-attribute-names.html
+ \title Attribute Names
+ \keyword Attributes
+
+ Below is a list of the attributes that can be set on the various scene
+ objects via Q3DSPresentation::setAttribute() or Q3DSElement::setAttribute().
+
+ \note vector (e.g. a group's or model's \c rotation) and color (e.g. a
+ material's \c diffuse) attributes allow setting/getting all components in
+ one operation, and are mapped to QVector3D and QColor, respectively.
+
+ \note As of Qt 3D Studio 2.1 not all properties can be changed on the fly at
+ run time. As a general rule attributes that are animatable in the Qt 3D
+ Studio application are freely changeable by the applications during run time
+ as well.
+
+ \note When possible, applications are recommended to rely on the \c{data
+ input} functionality of Qt 3D Studio instead. This avoids the need to refer
+ to hard-coded attribute names, and instead allows the designers to expose
+ the interesting attributes with arbitrary data input names to the
+ application developers, thus offering a fixed, well-known interface from the
+ 3D presentation to the application code. See \l Q3DSDataInput, \l DataInput,
+ \l Q3DSDataOutput, and \l DataOutput for more information.
+
+ \include attributenames.html
+
+ Custom materials and effects have their custom set of properties that are
+ defined in the \c{.material} or \c{.effect} file. For example, an instances
+ of an effect with the following metadata will have an attribute \c HBlurBias
+ with the type \c number that can be set and queried as if it was a built-in
+ attribute.
+
+ \badcode
+ <Effect>
+ <MetaData>
+ <Property name="HBlurBias" formalName="Horizontal Blur" min="0" max="10" default="2" description="Amount of corona horizontally."/>
+ ...
+ \endcode
+*/
diff --git a/src/api/studio3d/doc/src/building-embedded.qdoc b/src/api/studio3d/doc/src/building-embedded.qdoc
new file mode 100644
index 0000000..ddd8b59
--- /dev/null
+++ b/src/api/studio3d/doc/src/building-embedded.qdoc
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+
+\title Building \RUNTIME for Embedded Linux
+\page building-opengl-runtime-embedded-linux.html
+
+Before you build the \RUNTIME for Embedded Linux, you will need to install Qt for Embedded Linux.
+
+\section1 Install Qt for Embedded Linux
+Follow the Installation guide for your specific target device.
+
+\section1 Build the \RUNTIME
+
+\list 1
+ \li
+ Clone the \RUNTIME repository from
+ \l {https://code.qt.io/cgit/qt3dstudio/ogl-runtime.git}.
+ You can clone the repo with the \c {git clone} command:
+ \badcode
+ git clone git://code.qt.io/qt3dstudio/ogl-runtime.git
+ \endcode
+
+ \note If you want to use the HTTPS protocol, you can clone the \RUNTIME repo with the
+ following command:
+ \badcode
+ git clone https://code.qt.io/qt3dstudio/ogl-runtime.git
+ \endcode
+ \li
+ Run the following \c{git submodule} command:
+ \badcode
+ git submodule update --init --recursive
+ \endcode
+ \li
+ Open \c{ogl-runtime.pro} in Qt Creator. \c{ogl-runtime.pro} is located in the root of the
+ cloned repository.
+
+ \image ogl-runtime-pro.png
+ \li
+ Select the desired prebuilt Embedded Linux component and select \uicontrol{Configure Project}.
+
+ \image embedded-linux.png
+ \li
+ Add a build step with argument \c{install}.
+
+ \image embedded-linux-2.png
+ \li
+ From the menu, select \uicontrol{Build > Build Project "opengl-runtime"}.
+\endlist
+
+\section1 Deploy the \RUNTIME
+
+Follow the
+\l{https://doc.qt.io/QtForDeviceCreation/b2qt-installation-guides.html}{Installation guide}
+for your specific target device.
+
+*/
diff --git a/src/api/studio3d/doc/src/building-integrity.qdoc b/src/api/studio3d/doc/src/building-integrity.qdoc
new file mode 100644
index 0000000..fb09a10
--- /dev/null
+++ b/src/api/studio3d/doc/src/building-integrity.qdoc
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+
+\title Building \RUNTIME for GHS Integrity
+\page building-opengl-runtime-integrity.html
+
+Before you build the \RUNTIME for Integrity, you will need to build
+\l{https://doc.qt.io/qt-5/integrity.html}{Qt for Integrity}.
+Then, follow the steps below:
+
+\list 1
+ \li
+ Clone the OpenGL Runtime repository from
+ \l {https://code.qt.io/cgit/qt3dstudio/ogl-runtime.git/}. You can clone the repo with the git
+ clone command:
+
+ \badcode
+ git clone git://code.qt.io/qt3dstudio/ogl-runtime.git
+ \endcode
+
+ \note If you want to use the HTTPS protocol, you can clone the \RUNTIME repo with the
+ following command:
+ \badcode
+ git clone https://code.qt.io/qt3dstudio/ogl-runtime.git
+ \endcode
+ \li
+ Run the following \c{git submodule} command:
+ \badcode
+ git submodule update --init --recursive
+ \endcode
+ \li
+ In the root folder of the cloned repo, run the \c qmake command:
+ \badcode
+ qmake
+ \endcode
+ \li
+ Next, run the \c make command:
+ \badcode
+ make
+ \endcode
+\endlist
+
+For deployment, see the \l {https://doc.qt.io/qt-5/integrity.html}{Qt for Integrity} documentation.
+
+*/
diff --git a/src/api/studio3d/doc/src/building-opengl-runtime.qdoc b/src/api/studio3d/doc/src/building-opengl-runtime.qdoc
new file mode 100644
index 0000000..b9d95b5
--- /dev/null
+++ b/src/api/studio3d/doc/src/building-opengl-runtime.qdoc
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+
+\title Building the \RUNTIME
+\page building-opengl-runtime.html
+
+\section1 Build Instructions
+
+\list
+ \li
+ \l {Building \RUNTIME for Embedded Linux}
+ \li
+ \l {Building \RUNTIME for GHS Integrity}
+ \li
+ \l {Building \RUNTIME for QNX}
+\endlist
+
+*/
diff --git a/src/api/studio3d/doc/src/building-qnx.qdoc b/src/api/studio3d/doc/src/building-qnx.qdoc
new file mode 100644
index 0000000..fba04ce
--- /dev/null
+++ b/src/api/studio3d/doc/src/building-qnx.qdoc
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+
+\title Building \RUNTIME for QNX
+\page building-opengl-runtime-qnx.html
+
+Before you build the \RUNTIME for QNX, you will need to install Qt for QNX and Qt 3D Studio.
+
+\section1 Install Qt for QNX
+
+\list 1
+ \li
+ Download and install QNX SDP 7.0 from the \l {http://www.qnx.com}{QNX software center}.
+ \li
+ Run the Qt online installer. You can get it from \l {https://www.qt.io/download}.
+ \li
+ Select the desired prebuilt QNX component, select \uicontrol Next.
+
+ \image qt-installer-qnx-prebuild.png
+ \li
+ Select the folder where your QNX SDP is installed.
+
+ \image qnx-sdp-folder.png
+ \li
+ Press \uicontrol Next, then press \uicontrol Install. The Qt Creator will now run.
+\endlist
+
+\section1 Build Qt 3D Studio
+
+\list 1
+ \li
+ Clone the Qt 3D Studio repository from \l {https://code.qt.io/qt3dstudio/qt3dstudio.git}.
+ You can clone the repo with the \c {git clone} command:
+
+ \badcode
+ git clone git://code.qt.io/qt3dstudio/qt3dstudio.git
+ \endcode
+
+ \note If you want to use the HTTPS protocol, you can clone the Qt 3D Studio with the following
+ command:
+
+ \badcode
+ git clone https://code.qt.io/qt3dstudio/qt3dstudio.
+ \endcode
+ \li
+ Run the following \c{git submodule} command:
+ \badcode
+ git submodule update --init --recursive
+ \endcode
+ \li
+ Open \c {qt3dstudio.pro} in the Qt Creator. \c {qt3dstudio.pro} is located in the root of the
+ cloned repository.
+
+ \image qt3dstudio-pro.png
+ \li
+ Select desired prebuilt QNX Component.
+
+ \image select-prebuilt-qnx-component.png
+ \li
+ Press \uicontrol{Configure Project}.
+ \li
+ Select the \uicontrol Project tab and \uicontrol{Build Settings}.
+ \li
+ Add a build step with the argument \c install.
+
+ \image add-build-step.png
+ \li
+ From the menu, select \uicontrol{Build > Build Project "qt3dstudio"}.
+\endlist
+
+\section1 Build the \RUNTIME
+
+\list 1
+ \li
+ Clone the \RUNTIME repository from
+ \l{https://code.qt.io/cgit/qt3dstudio/ogl-runtime.git}.
+ You can clone the repo with the \c {git clone} command:
+ \badcode
+ git clone git://code.qt.io/qt3dstudio/ogl-runtime.git
+ \endcode
+
+ \note If you want to use the HTTPS protocol, you can clone the \RUNTIME repo with
+ the following command:
+
+ \badcode
+ git clone https://code.qt.io/qt3dstudio/ogl-runtime.git
+ \endcode
+ \li
+ Run the following \ {git submodule} command:
+
+ \badcode
+ git submodule update --init --recursive
+ \endcode
+ \li
+ Open \c {ogl-runtime.pro} in Qt Creator. \c {ogl-runtime.pro} is located in the root of the
+ cloned repository.
+
+ \image ogl-runtime-pro.png
+ \li
+ Select the desired prebuilt QNX component and select \uicontrol{Configure Project}.
+
+ \image qnx-prebuild.png
+ \li
+ Add a build step with argument \c install.
+
+ \image add-build-step-qnx.png
+ \li
+ From the menu, select \uicontrol{Build > Build Project "opengl-runtime"}.
+ \li
+ The \RUNTIME is installed to the same folder where you have installed the QNX prebuilt
+ components. For example \c{~/Qt5.12/5.12.3/qnx7_x86_64/}.
+\endlist
+
+\section1 Deploy the \RUNTIME
+
+To deploy to the target device, follow the steps below:
+
+\list 1
+ \li
+ In Qt Creator, select \uicontrol{Tools > Options} from the menu.
+ \li
+ Select the \uicontrol Devices tab.
+
+ \image devices-tab.png
+ \li
+ Select \uicontrol Add.
+ \li
+ Select QNX Device, then press \uicontrol {Start Wizard}.
+
+ \image add-qnx-device.png
+ \li
+ Select \uicontrol {Deploy Qt Libraries}. This will also deploy Qt and Qt 3D Studio binaries
+ and libraries.
+\endlist
+
+*/
diff --git a/src/api/studio3d/doc/src/copyright.qdoc b/src/api/studio3d/doc/src/copyright.qdoc
new file mode 100644
index 0000000..bd431cd
--- /dev/null
+++ b/src/api/studio3d/doc/src/copyright.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page copyright-notices.html
+\title Copyright Notices
+\section1 Third-party Licenses
+
+The following table lists parts (modules) of \RUNTIME that
+incorporate code licensed under third-party open-source licenses:
+
+\annotatedlist attributions-qtstudio3d
+
+*/
diff --git a/src/api/studio3d/doc/src/embedded.qdoc b/src/api/studio3d/doc/src/embedded.qdoc
new file mode 100644
index 0000000..b468070
--- /dev/null
+++ b/src/api/studio3d/doc/src/embedded.qdoc
@@ -0,0 +1,32 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt3dstudio-opengl-runtime-embedded.html
+ \title Using the Runtime on Embedded Devices
+
+*/
diff --git a/src/api/studio3d/doc/src/examples.qdoc b/src/api/studio3d/doc/src/examples.qdoc
new file mode 100644
index 0000000..f7a78b4
--- /dev/null
+++ b/src/api/studio3d/doc/src/examples.qdoc
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Examples
+ \ingroup examples
+ \page qt3dstudio-opengl-runtime-examples.html
+
+ Included in the \RUNTIME you will find a set of examples. These are
+ located in the \c {examples} folder in the installation folder.
+
+ \section1 More Examples
+
+ You can find more examples from
+ \l{https://git.qt.io/public-demos/qt3dstudio}, these examples are more
+ visually appealing and suitable to use as demos for example.
+*/
diff --git a/src/api/studio3d/doc/src/gettingstarted.qdoc b/src/api/studio3d/doc/src/gettingstarted.qdoc
new file mode 100644
index 0000000..9289b54
--- /dev/null
+++ b/src/api/studio3d/doc/src/gettingstarted.qdoc
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt3dstudio-opengl-runtime-gettingstarted.html
+ \title Getting Started
+
+ The \RUNTIME provides C++ and QML APIs for integrating Qt 3D
+ Studio scenes into Qt applications, as well as the viewer application that
+ is used in combination with the Qt 3D Studio application during the design
+ phase.
+
+ Below is an example scene in the Qt 3D Studio application.
+
+ \image intro-editor.png
+
+ During the design phase, the standalone viewer is typically launched from
+ the editor several times to check and verify the presentation in the
+ runtime.
+
+ \image intro-viewer.png
+
+ Once the design is done and the \c{.uia}, \c{.uip}, and other asset files
+ are available, these can be loaded, rendered, and manipulated in Qt
+ applications. This is done via the APIs provided in the \c studio3d
+ module and the \c QtStudio3D.OpenGL QML plugin.
+
+ Below is the same scene loaded into a simple Qt Quick application
+ (the \l{Qt 3D Studio Runtime: Simple QML Example}{simpleqml
+ example}) that composes the 3D content with the other Qt Quick
+ items, for example the ones provided by \l{Qt Quick Controls
+ 2}. In addition to displaying the presentation, the application
+ can also control many aspects of it (slides, timeline, object
+ properties) and can react on certain conditions, such as when a 3D
+ object is clicked on (picked) by mouse or touch input.
+
+ \image intro-app.png
+
+ \section1 Rendering Scenes
+
+ APIs are provided for the following Qt UI technologies:
+
+ \list
+
+ \li Qt Quick: here applications import QtStudio3D.OpenGL \QtVer which
+ provides the \l [QML] Studio3D QML type, a Qt Quick item that can be
+ added to Qt Quick scenes. Under the hood this is similar to adding a
+ \l [QML] Scene3D (when working directly with the lower level Qt 3D
+ framework) or a custom item based on \l QQuickFramebufferObject into
+ the scene.
+
+ \li QWindow or offscreen render targets (OpenGL texture): Q3DSSurfaceViewer
+ can be used both to render to an on-screen QWindow, as well as off-screen
+ into an OpenGL texture. The latter allows reading back and saving the
+ frames, to generate pre-rendered video sequences for example.
+
+ \endlist
+
+ \section1 Manipulating Scenes
+
+ Rendering Qt 3D Studio scenes is only part of the story since many scenes
+ are not static and will not just display all their contents as they were
+ done by designers in the Qt 3D Studio application. Rather, properties of
+ scene objects (for example, the rotation property of a 3D model, or the
+ diffuse color of the material associated with such a model) may need to be
+ changed dynamically, at run time. The timeline or the current slide may
+ also need to be adjusted based on the user's actions or other application
+ state.
+
+ Above functionality is exposed via the following types:
+
+ \table
+ \header
+ \li C++ Class
+ \li QML Type
+ \row
+ \li Q3DSPresentation
+ \li \l [QML] Presentation
+ \row
+ \li Q3DSElement
+ \li \l Element
+ \row
+ \li Q3DSSceneElement
+ \li \l [QML] SceneElement
+ \row
+ \li Q3DSDataInput
+ \li \l [QML] DataInput
+
+ \endtable
+
+ Advanced scene manipulation (for example, dynamically spawning and
+ removing objects in a 3D scene) will be introduced in future versions.
+*/
diff --git a/src/api/studio3d/doc/src/images/add-build-step-qnx.png b/src/api/studio3d/doc/src/images/add-build-step-qnx.png
new file mode 100644
index 0000000..8406b39
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/add-build-step-qnx.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/add-build-step.png b/src/api/studio3d/doc/src/images/add-build-step.png
new file mode 100644
index 0000000..d047bb7
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/add-build-step.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/add-qnx-device.png b/src/api/studio3d/doc/src/images/add-qnx-device.png
new file mode 100644
index 0000000..c1f5aca
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/add-qnx-device.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/customsignal.png b/src/api/studio3d/doc/src/images/customsignal.png
new file mode 100644
index 0000000..eb0e0ba
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/customsignal.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/devices-tab.png b/src/api/studio3d/doc/src/images/devices-tab.png
new file mode 100644
index 0000000..10f2884
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/devices-tab.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/embedded-linux-2.png b/src/api/studio3d/doc/src/images/embedded-linux-2.png
new file mode 100644
index 0000000..d46da08
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/embedded-linux-2.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/embedded-linux.png b/src/api/studio3d/doc/src/images/embedded-linux.png
new file mode 100644
index 0000000..b8e0efb
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/embedded-linux.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/intro-app.png b/src/api/studio3d/doc/src/images/intro-app.png
new file mode 100644
index 0000000..3658190
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/intro-app.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/intro-editor.png b/src/api/studio3d/doc/src/images/intro-editor.png
new file mode 100644
index 0000000..52e5a69
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/intro-editor.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/intro-viewer.png b/src/api/studio3d/doc/src/images/intro-viewer.png
new file mode 100644
index 0000000..f964b58
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/intro-viewer.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/ogl-runtime-pro.png b/src/api/studio3d/doc/src/images/ogl-runtime-pro.png
new file mode 100644
index 0000000..d49dbdf
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/ogl-runtime-pro.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/qnx-prebuild.png b/src/api/studio3d/doc/src/images/qnx-prebuild.png
new file mode 100644
index 0000000..09ce65d
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/qnx-prebuild.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/qnx-sdp-folder.png b/src/api/studio3d/doc/src/images/qnx-sdp-folder.png
new file mode 100644
index 0000000..269374a
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/qnx-sdp-folder.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/qt-installer-qnx-prebuild.png b/src/api/studio3d/doc/src/images/qt-installer-qnx-prebuild.png
new file mode 100644
index 0000000..8dc7389
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/qt-installer-qnx-prebuild.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/qt3dstudio-pro.png b/src/api/studio3d/doc/src/images/qt3dstudio-pro.png
new file mode 100644
index 0000000..8d8a5d5
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/qt3dstudio-pro.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/select-prebuilt-qnx-component.png b/src/api/studio3d/doc/src/images/select-prebuilt-qnx-component.png
new file mode 100644
index 0000000..4ef68fe
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/select-prebuilt-qnx-component.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/images/twolayers.png b/src/api/studio3d/doc/src/images/twolayers.png
new file mode 100644
index 0000000..2f4b66f
--- /dev/null
+++ b/src/api/studio3d/doc/src/images/twolayers.png
Binary files differ
diff --git a/src/api/studio3d/doc/src/index.qdoc b/src/api/studio3d/doc/src/index.qdoc
new file mode 100644
index 0000000..1888a87
--- /dev/null
+++ b/src/api/studio3d/doc/src/index.qdoc
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\title \RUNTIME
+\page qt3dstudio-opengl-runtime-index.html
+
+\section1 Table of Contents
+
+\list
+ \li \l {Getting Started}
+ \li \l {System and Application Requirements}
+ \li \l {Building the \RUNTIME}
+ \li \l {\RUNTIME C++ Classes}
+ \li \l {\RUNTIME QML Types}
+ \li \l {Attribute Names}{Scene Object Attribute List}
+ \li \l {Examples}
+ \li \l {Copyright Notices}
+\endlist
+
+*/
diff --git a/src/api/studio3d/doc/src/mobile.qdoc b/src/api/studio3d/doc/src/mobile.qdoc
new file mode 100644
index 0000000..2ede51a
--- /dev/null
+++ b/src/api/studio3d/doc/src/mobile.qdoc
@@ -0,0 +1,32 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt3dstudio-opengl-runtime-mobile.html
+ \title Using the OpenGL Runtime on Android/iOS Devices
+
+*/
diff --git a/src/api/studio3d/doc/src/module.qdoc b/src/api/studio3d/doc/src/module.qdoc
new file mode 100644
index 0000000..98b134e
--- /dev/null
+++ b/src/api/studio3d/doc/src/module.qdoc
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module OpenGLRuntime
+ \title \RUNTIME C++ Classes
+ \ingroup modules
+
+ \brief The \RUNTIME provides a number of C++ classes to
+ integrate and control Qt 3D Studio presentations in Qt applications.
+
+ To include the definitions of the module's classes, use the following directive:
+
+ \code
+ #include <QtStudio3D>
+ \endcode
+
+ To link against the module, add this line to your \l qmake \c .pro file:
+
+ \badcode
+ QT += studio3d
+ \endcode
+
+ \section1 Integrating
+
+ The main class is \l Q3DSSurfaceViewer. Q3DSSurfaceViewer allows targeting a QWindow or an
+ offscreen render target (an OpenGL texture).
+
+ \note Qt applications based on QML and Qt Quick will rather want to use the
+ \l Studio3D type from \l {\RUNTIME QML Types}.
+
+ \section1 Controlling
+
+ Each \l Q3DSSurfaceViewer instance exposes a \l
+ Q3DSPresentation. This, possibly in combination with \l Q3DSDataInput or
+ \l Q3DSElement objects, allows:
+
+ \list
+
+ \li changing scene object properties (for example, the transform of a
+ model, colors and other settings of a material, etc.),
+
+ \li changing slides (thus starting the relevant animations and applying the
+ scene object property changes associated with the new slide),
+
+ \li and controlling the timeline (the current playback position for the
+ key-frame based animations) both on the main scene and on individual
+ Component nodes.
+
+ \endlist
+
+ \section1 Classes
+*/
+
+/*!
+ \qmlmodule QtStudio3D.OpenGL \QtVer
+ \title \RUNTIME QML Types
+ \ingroup qmlmodules
+
+ \brief QML Types for the \RUNTIME module.
+
+ The \RUNTIME provides a number of QML types to integrate and
+ control Qt 3D Studio presentations in Qt Quick applications. These types
+ can be imported into your application using the following import statement
+ in your \c{.qml} file:
+
+ \qml \QtVer
+ import QtStudio3D.OpenGL \1
+ \endqml
+
+ The main type for embedding a Qt 3D Studio presentations into a Qt Quick
+ scene is \l Studio3D. Many of the other types correspond to a C++ class in
+ the API offered to non-QML based applications, providing the same level of
+ control described in \l{\RUNTIME C++ Classes}{the C++ reference}.
+
+ There are also QML types that offer functionality not available via the C++
+ classes. The \l SubPresentationSettings type allows defining \c{QML
+ sub-presentations} (live Qt Quick scenes composed into the 3D scene either
+ as Qt 3D Studio layers or as texture maps) in-line, inside a Studio3D
+ element, without having to deploy them as separate \c .qml files.
+
+ \note the \l Behavior type is to be used by \c{behavior scripts} (\c .qml
+ snippets associated with scene objects during the design phase in Qt 3D
+ Studio) and is not available in the main application code.
+
+ \section1 QML Types
+*/
diff --git a/src/api/studio3d/doc/src/requirements.qdoc b/src/api/studio3d/doc/src/requirements.qdoc
new file mode 100644
index 0000000..f93483c
--- /dev/null
+++ b/src/api/studio3d/doc/src/requirements.qdoc
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qt3dstudio-opengl-runtime-requirements.html
+ \title System and Application Requirements
+
+ \section1 OpenGL Requirements
+
+ Qt 3D Studio requires OpenGL or OpenGL ES. The recommended minimum versions
+ are \c{3.3 core profile} and \c{3.0}, respectively.
+
+ When it comes to OpenGL ES, a limited subset of the functionality is
+ available when running on plain \c{OpenGL ES 2.0} implementations. In
+ practice this means losing shadow mapping, image based lighting, and many
+ other advanced features and is therefore not recommended. On the other hand,
+ this allows bringing up Qt 3D Studio scenes on boards like the Raspberry Pi
+ (with the original proprietary graphics stack) or the Beaglebone Black, or
+ in hypervisor-based virtualized environments where the GPU virtualization
+ only supports GLES 2.0, and can therefore still be valuable in certain
+ special situations.
+
+ Non-native implementations, like \c ANGLE or software implementations like
+ \c{Mesa's llvmpipe} may work but are not tested and can fail in unexpected
+ ways.
+
+ \section1 Application Integration Notes
+
+ \section2 C++
+
+ A typical Qt C++ application using the \RUNTIME is expected to
+ query and honor the runtime's \c{ideal surface format}. This way the OpenGL
+ contexts will all be created with the OpenGL version and profile that best
+ match the runtime's needs:
+
+ \code
+ #include <Q3DSSurfaceViewer> // or <q3dsruntimeglobal.h> if only Q3DS::surfaceFormat() is interesting for main()
+
+ int main(int argc, char *argv[])
+ {
+ QApplication app(argc, argv);
+
+ QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat());
+
+ Q3DSSurfaceViewer w;
+ ...
+ return app.exec();
+ }
+ \endcode
+
+ To enable using Qt 3D Studio headers and libraries in the application, add
+ the \c studio3d module in the application's \c{.pro} file:
+
+ \badcode
+ QT += studio3d
+ \endcode
+
+ \section2 QML/Qt Quick
+
+ When no C++ classes are used, the \c studio3d module can be omitted
+ in the \c{.pro}. To use the \l Studio3D element in QML code, it is
+ enough to add the corresponding import statement:
+
+ \qml
+ import QtStudio3D.OpenGL \QtVer
+ \endqml
+
+ It is nonetheless strongly recommended to set the the default surface format
+ as shown above. Make sure the
+ \c{QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat())} call is made
+ after constructing QGuiApplication but before the first QQuickWindow or
+ QQuickView. When this is not possible, for example because the QML contents
+ is hosted in an application that has no knowledge of the Qt Quick scene's 3D
+ needs, Studio3D may still be usable but this may be dependent on the OpenGL
+ implementation and the context versions it offers, and is therefore more fragile.
+*/
diff --git a/src/api/studio3d/doc/src/toc.qdoc b/src/api/studio3d/doc/src/toc.qdoc
new file mode 100644
index 0000000..979f084
--- /dev/null
+++ b/src/api/studio3d/doc/src/toc.qdoc
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt 3D Studio.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\contentspage \RUNTIME
+\page qt3dstudio-opengl-runtime-toc.html
+\title \RUNTIME TOC
+
+\omit
+This file is used for generating a TOC in a .qch file.
+\endomit
+
+\list
+ \li \l {\RUNTIME}{Overview}
+\endlist
+*/
diff --git a/src/api/studio3d/doc/style/qt5-sidebar.html b/src/api/studio3d/doc/style/qt5-sidebar.html
new file mode 100644
index 0000000..435d52a
--- /dev/null
+++ b/src/api/studio3d/doc/style/qt5-sidebar.html
@@ -0,0 +1,26 @@
+<div class="sectionlist normallist">
+ <div>
+ <a name="reference"></a>
+ <h2 id="reference">Qt 3D OpenGL Studio Runtime</h2>
+ </div>
+ <div class="indexboxcont indexboxbar">
+ <ul>
+ <li><a href="qt3dstudio-opengl-runtime-index.html">Home</a></li>
+ <li><a href="qt3dstudio-opengl-runtime-gettingstarted.html">Getting Started</a></li>
+ <li><a href="qtstudio3d-opengl-qmlmodule.html">QML API Reference</a></li>
+ <li><a href="openglruntime-module.html">C++ API Reference</a></li>
+ <li><a href="copyright-notices.html">Copyright Notices</a></li>
+ </ul>
+ </div>
+</div>
+<div class="sectionlist normallist">
+ <div>
+ <a name="reference"></a>
+ <h2 id="reference">Qt 3D Studio</h2>
+ </div>
+ <div class="indexboxcont indexboxbar">
+ <ul>
+ <li><a href="../index.html">Home</a></li>
+ </ul>
+ </div>
+</div>
diff --git a/src/api/studio3d/q3dscommandqueue.cpp b/src/api/studio3d/q3dscommandqueue.cpp
index c6071aa..e9eed29 100644
--- a/src/api/studio3d/q3dscommandqueue.cpp
+++ b/src/api/studio3d/q3dscommandqueue.cpp
@@ -61,6 +61,7 @@ CommandQueue::CommandQueue()
, m_showRenderStats(false)
, m_matteColor(Qt::black)
, m_delayedLoading(false)
+ , m_matteEnabled(false)
, m_size(0)
{
qRegisterMetaType<CommandType>();
@@ -207,6 +208,7 @@ void CommandQueue::copyCommands(CommandQueue &fromQueue)
m_globalAnimationTimeChanged
= m_globalAnimationTimeChanged || fromQueue.m_globalAnimationTimeChanged;
m_delayedLoadingChanged = m_delayedLoadingChanged || fromQueue.m_delayedLoadingChanged;
+ m_matteEnabledChanged = m_matteEnabledChanged || fromQueue.m_matteEnabledChanged;
if (fromQueue.m_visibleChanged)
m_visible = fromQueue.m_visible;
@@ -226,6 +228,8 @@ void CommandQueue::copyCommands(CommandQueue &fromQueue)
m_globalAnimationTime = fromQueue.m_globalAnimationTime;
if (fromQueue.m_delayedLoadingChanged)
m_delayedLoading = fromQueue.m_delayedLoading;
+ if (fromQueue.m_matteEnabledChanged)
+ m_matteEnabled = fromQueue.m_matteEnabled;
// Pending queue may be synchronized multiple times between queue processing, so let's append
// to the existing queue rather than clearing it.
@@ -304,6 +308,7 @@ void CommandQueue::clear(bool deleteCommandData)
m_variantListChanged = false;
m_globalAnimationTimeChanged = false;
m_delayedLoadingChanged = false;
+ m_matteEnabledChanged = false;
if (deleteCommandData) {
for (int i = 0; i < m_size; ++i) {
diff --git a/src/api/studio3d/q3dscommandqueue_p.h b/src/api/studio3d/q3dscommandqueue_p.h
index 12d1b7e..effb72e 100644
--- a/src/api/studio3d/q3dscommandqueue_p.h
+++ b/src/api/studio3d/q3dscommandqueue_p.h
@@ -142,6 +142,7 @@ public:
bool m_variantListChanged;
bool m_globalAnimationTimeChanged;
bool m_delayedLoadingChanged;
+ bool m_matteEnabledChanged;
bool m_visible;
Q3DSViewerSettings::ScaleMode m_scaleMode;
@@ -152,6 +153,7 @@ public:
QStringList m_variantList;
qint64 m_globalAnimationTime;
bool m_delayedLoading;
+ bool m_matteEnabled;
void clear(bool deleteCommandData);
int size() const { return m_size; }
diff --git a/src/api/studio3d/q3dsdatainput.cpp b/src/api/studio3d/q3dsdatainput.cpp
index a15f9fb..2a52963 100644
--- a/src/api/studio3d/q3dsdatainput.cpp
+++ b/src/api/studio3d/q3dsdatainput.cpp
@@ -38,9 +38,10 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype DataInput
\instantiates Q3DSDataInput
- \inqmlmodule Qt3DStudio
+ \inqmlmodule QtStudio3D.OpenGL
\ingroup OpenGLRuntime
\brief Controls a data input entry in a Qt 3D Studio presentation.
+
This class is a convenience class for controlling a data input in a presentation.
DataInput provides a clean contract between the presentation design and the code.
It hides the presentation details from the code while providing a contractual access
@@ -49,11 +50,40 @@ QT_BEGIN_NAMESPACE
multiple aspects of the design (e.g. DataInput for speed can change the color of
the speedometer, angle of the needle).
+ As an example:
+
+ \qml
+ Studio3D {
+ ...
+ Presentation {
+ id: presentation
+ ...
+ property string text: ""
+ DataInput {
+ name: "inputForSomeTextNode"
+ value: presentation.text
+ }
+ }
+ }
+
+ Button {
+ onClicked: presentation.text = "Hello World"
+ }
+ \endqml
+
+ The example assumes that a data input connection was made in Qt 3D Studio
+ presentation using Qt 3D Studio editor between the \c textstring property of
+ target property and a data input name \c inputForSomeTextNode. As the value
+ is now set via a property, the full set of QML property bindings techniques
+ are available.
+
\note There is a performance cost for each registered DataInput, so try to avoid
creating unnecessary DataInputs.
- \sa Presentation, DataOutput, Presentation::slideExited, Presentation::slideEntered
- \sa Presentation::customSignalEmitted
+ \sa Presentation, DataOutput
+ \sa {QtStudio3D.OpenGL::Presentation::slideExited()}{Presentation.slideExited()}
+ \sa {QtStudio3D.OpenGL::Presentation::slideEntered()}{Presentation.slideEntered()}
+ \sa {QtStudio3D.OpenGL::Presentation::customSignalEmitted()}{Presentation.customSignalEmitted()}
*/
/*!
@@ -82,6 +112,10 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \dontdocument QMetaTypeId
+*/
+
+/*!
\internal
*/
Q3DSDataInput::Q3DSDataInput(QObject *parent)
@@ -101,6 +135,8 @@ Q3DSDataInput::Q3DSDataInput(const QString &name, QObject *parent)
}
/*!
+ \fn Q3DSDataInput::Q3DSDataInput(Q3DSPresentation *presentation, const QString &name, QObject *parent)
+
Constructs a Q3DSDataInput instance and initializes the \a name. The
constructed instance is automatically associated with the specified \a
presentation. An optional \a parent object can be specified.
@@ -257,6 +293,8 @@ bool Q3DSDataInput::isValid() const
}
/*!
+ \qmlmethod string DataInput::metadata(string key)
+
Returns the metadata defined for this datainput with metadata \a key.
Metadata is user-defined key-value table that can be used, for example, to better describe the
@@ -265,8 +303,8 @@ bool Q3DSDataInput::isValid() const
\note Datainput metadata is read-only.
*/
+
/*!
- \qmlmethod string DataInput::metadata
Returns the metadata defined for this datainput with metadata \a key.
Metadata is user-defined key-value table that can be used, for example, to better describe the
@@ -290,13 +328,6 @@ QString Q3DSDataInput::metadata(const QString &key) const
\sa metadata
*/
-/*!
- \qmlmethod var DataInput::metadataKeys
- Returns the metadata keys defined for this datainput.
-
- \note Datainput metadata is read-only.
- \sa metadata
- */
QStringList Q3DSDataInput::metadataKeys() const
{
if (!d_ptr->m_presentation)
@@ -360,50 +391,6 @@ void Q3DSDataInputPrivate::setCommandQueue(CommandQueue *queue)
setValue(m_value);
}
-
-/*!
- \qmltype DataInput
- \instantiates Q3DSDataInput
- \inqmlmodule QtStudio3D
- \ingroup OpenGLRuntime
-
- \brief Controls a data input entry in a Qt 3D Studio presentation.
-
- This type is a convenience for controlling a data in a presentation. Its functionality is
- equivalent to \c{Presentation::setDataInputValue()}, however it has a big advantage
- of being able to use QML property bindings, thus avoiding the need to having to resort
- to a JavaScript function call for every value change.
-
- As an example:
-
- \qml
- Studio3D {
- ...
- Presentation {
- id: presentation
- ...
- property string text: ""
- DataInput {
- name: "inputForSomeTextNode"
- value: presentation.text
- }
- }
- }
-
- Button {
- onClicked: presentation.text = "Hello World"
- }
- \endqml
-
- The example assumes that a data input connection was made in Qt 3D Studio
- presentation using Qt 3D Studio editor between the \c textstring property of
- target property and a data input name \c inputForSomeTextNode. As the value
- is now set via a property, the full set of QML property bindings techniques
- are available.
-
- \sa Studio3D, Presentation
-*/
-
/*!
\qmlproperty string DataInput::name
@@ -448,4 +435,12 @@ void Q3DSDataInputPrivate::setCommandQueue(CommandQueue *queue)
\note This value is read-only.
*/
+/*!
+ \qmlproperty list<string> DataInput::metadataKeys
+
+ Contains the metadata keys specified for this datainput.
+
+ \note This value is read-only.
+*/
+
QT_END_NAMESPACE
diff --git a/src/api/studio3d/q3dsdatainput.h b/src/api/studio3d/q3dsdatainput.h
index 3617dcd..3f81c65 100644
--- a/src/api/studio3d/q3dsdatainput.h
+++ b/src/api/studio3d/q3dsdatainput.h
@@ -48,6 +48,7 @@ class Q_STUDIO3D_EXPORT Q3DSDataInput : public QObject
Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
Q_PROPERTY(float max READ max CONSTANT)
Q_PROPERTY(float min READ min CONSTANT)
+ Q_PROPERTY(QStringList metadataKeys READ metadataKeys CONSTANT)
public:
explicit Q3DSDataInput(QObject *parent = nullptr);
explicit Q3DSDataInput(const QString &name, QObject *parent = nullptr);
@@ -69,7 +70,7 @@ public:
bool isValid() const;
Q_INVOKABLE QString metadata(const QString &key) const;
- Q_INVOKABLE QStringList metadataKeys() const;
+ QStringList metadataKeys() const;
public Q_SLOTS:
void setName(const QString &name);
diff --git a/src/api/studio3d/q3dsdataoutput.cpp b/src/api/studio3d/q3dsdataoutput.cpp
index 3cb13a0..9ca0d03 100644
--- a/src/api/studio3d/q3dsdataoutput.cpp
+++ b/src/api/studio3d/q3dsdataoutput.cpp
@@ -34,9 +34,10 @@
/*!
\qmltype DataOutput
\instantiates Q3DSDataOutput
- \inqmlmodule Qt3DStudio
+ \inqmlmodule QtStudio3D.OpenGL
\ingroup OpenGLRuntime
\brief Provides notifications from data output entries in Qt 3D Studio presentation.
+
This class is a convenience class for listening for changes in the Qt 3D Studio
presentation attributes. DataOutput provides a clean contract between the presentation
design and the code. It hides the presentation details from the code while providing a
@@ -59,6 +60,7 @@
\inmodule OpenGLRuntime
\since Qt 3D Studio 2.4
\brief Provides notifications from data output entries in Qt 3D Studio presentation.
+
This class is a convenience class for listening for changes in the Qt 3D Studio
presentation attributes. DataOutput provides a clean contract between the presentation
design and the code. It hides the presentation details from the code while providing a
@@ -66,8 +68,8 @@
(e.g. movement of an element in the presentation due to timeline animation).
DataOutput can be attached to same attributes in the design as DataInput is, including
- presentation timeline. Only excaption is slide changes Slide changes are already notified
- through \c{Q3DSPresentation::slideEntered} and \c{Q3DSPresentation::slideExited} signals.
+ presentation timeline. Only exception is slide changes (slide changes are already notified
+ through \c{Q3DSPresentation::slideEntered} and \c{Q3DSPresentation::slideExited} signals).
\note There is a performance cost for each registered DataOutput, so try to avoid
creating unnecessary DataOutputs.
@@ -135,7 +137,8 @@ void Q3DSDataOutput::setName(const QString &name)
}
/*!
- \qmlproperty DataOutput::value
+ \qmlproperty var DataOutput::value
+ \readonly
Contains the read-only value of the controlled data output element in the
presentation.
@@ -161,17 +164,17 @@ QVariant Q3DSDataOutput::value() const
}
/*!
- * \qmlsignal DataOutput::valueChanged
- Emitted when the value of the observed DataOutput has changed in the
- presentation.
- \param newValue The new value of the observed DataOutput.
+ \qmlsignal DataOutput::valueChanged(var newValue)
+
+ Emitted when the value of the observed DataOutput has changed to
+ \a newValue in the presentation.
*/
/*!
- \fn Q3DSDataOutput::valueChanged
- Emitted when the value of the observed DataOutput has changed in the
- presentation.
- \param newValue The new value of the observed DataOutput.
+ \fn Q3DSDataOutput::valueChanged(const QVariant &newValue)
+
+ Emitted when the value of the observed DataOutput has changed to
+ \a newValue in the presentation.
*/
/*!
diff --git a/src/api/studio3d/q3dselement.cpp b/src/api/studio3d/q3dselement.cpp
index 16ae110..5731001 100644
--- a/src/api/studio3d/q3dselement.cpp
+++ b/src/api/studio3d/q3dselement.cpp
@@ -40,7 +40,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Element
\instantiates Q3DSElement
- \inqmlmodule Qt3DStudio
+ \inqmlmodule QtStudio3D.OpenGL
\ingroup OpenGLRuntime
\brief Control type for elements in a Qt 3D Studio presentation.
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
\inmodule OpenGLRuntime
\since Qt 3D Studio 2.0
- \brief Controls a scene object (node) in a Qt 3D Studio presentation.
+ \brief Controls a scene object (element) in a Qt 3D Studio presentation.
This class is provided for backwards compatibility. We recommend using
DataInput and DataOutput APIs for contractual and clean API between
@@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE
object (such as, model, material, camera, layer) in a Qt 3D Studio
presentation.
- \sa Q3DSWidget, Q3DSSurfaceViewer, Q3DSSceneElement
+ \sa Q3DSSurfaceViewer, Q3DSSceneElement
*/
/*!
diff --git a/src/api/studio3d/q3dsgeometry.cpp b/src/api/studio3d/q3dsgeometry.cpp
index bfc66a9..f4b650a 100644
--- a/src/api/studio3d/q3dsgeometry.cpp
+++ b/src/api/studio3d/q3dsgeometry.cpp
@@ -31,51 +31,239 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class Q3DSGeometry
+ \inmodule OpenGLRuntime
+ \since Qt 3D Studio 2.4
+
+ \brief Represents a mesh geometry.
+
+ This class describes the mesh geometry for dynamic mesh creation.
+ The geometry consists of a vertex buffer and an optional index buffer.
+ Geometry attributes are used to define how the data in these buffers should be interpreted.
+
+ For example, create a simple textured pyramid geometry:
+
+ \badcode
+ // A vertex in vertex buffer consists of position, normal, and texture coordinates
+ struct Vertex {
+ QVector3D position;
+ QVector3D normal;
+ QVector2D uv;
+ };
+
+ // The vertex buffer
+ QVector<Vertex> vertices;
+
+ // Creates a triangle into the vertex buffer
+ auto createTriangle = [&](const QVector3D &xyz1, const QVector2D &uv1,
+ const QVector3D &xyz2, const QVector2D &uv2,
+ const QVector3D &xyz3, const QVector2D &uv3) {
+ QVector3D n = QVector3D::crossProduct(xyz2 - xyz1, xyz3 - xyz1).normalized();
+ vertices.append({xyz1, n, uv1});
+ vertices.append({xyz2, n, uv2});
+ vertices.append({xyz3, n, uv3});
+ };
+
+ // Pyramid corner coordinates in local space
+ QVector3D xyz[5] = {{0, 0, 50}, {50, 50, -50}, {50, -50, -50}, {-50, -50, -50}, {-50, 50, -50}};
+
+ // Possible texture coordinates for triangle corners
+ QVector2D uv[4] = {{1, 1}, {1, 0}, {0, 0}, {0, 1}};
+
+ // Pyramid consists of four side triangles and a bottom quad made of two triangles
+ createTriangle(xyz[0], uv[0], xyz[1], uv[1], xyz[2], uv[2]);
+ createTriangle(xyz[0], uv[0], xyz[2], uv[1], xyz[3], uv[2]);
+ createTriangle(xyz[0], uv[0], xyz[3], uv[1], xyz[4], uv[2]);
+ createTriangle(xyz[0], uv[0], xyz[4], uv[1], xyz[1], uv[2]);
+ createTriangle(xyz[1], uv[0], xyz[4], uv[2], xyz[3], uv[1]);
+ createTriangle(xyz[1], uv[0], xyz[3], uv[3], xyz[2], uv[2]);
+
+ // Make a byte array out of the vertex buffer
+ QByteArray vertexBuffer(reinterpret_cast<const char *>(vertices.constData()),
+ vertices.size() * int(sizeof(Vertex)));
+
+ // Create the geometry. Triangle is the default primitive type, so we don't specify it.
+ // The order of the added attributes must match the order of the attribute data in the
+ // vertex buffer.
+ Q3DSGeometry pyramid;
+ pyramid.setVertexData(vertexBuffer);
+ pyramid.addAttribute(Q3DSGeometry::Attribute::PositionSemantic);
+ pyramid.addAttribute(Q3DSGeometry::Attribute::NormalSemantic);
+ pyramid.addAttribute(Q3DSGeometry::Attribute::TexCoordSemantic);
+ \endcode
+
+ \sa Q3DSPresentation::createMesh
+ */
+
+/*!
+ \enum Q3DSGeometry::PrimitiveType
+
+ This enumeration specifies the possible rendering primitives for the geometry.
+ For more information about rendering primitives and how they affect the vertex data,
+ see OpenGL documentation.
+
+ \value UnknownType Primitive type is unknown.
+ \value Points Geometry uses point primitives.
+ \value LineStrip Geometry uses line strip primitives.
+ \value LineLoop Geometry uses line loop primitives.
+ \value Lines Geometry uses line primitives.
+ \value TriangleStrip Geometry uses triangle strip primitives.
+ \value TriangleFan Geometry uses triangle fan primitives.
+ \value Triangles Geometry uses triangle primitives. This is the default primitive type.
+ \value Patches Geometry uses patch primitives.
+*/
+
+/*!
+ \enum Q3DSGeometry::Attribute::Semantic
+
+ This enumeration specifies the possible attribute semantics for the geometry.
+ The attribute semantic indicates the purpose of the attribute.
+
+ \value UnknownSemantic Attribute semantic is unknown.
+ \value IndexSemantic Attribute specifies index buffer data type.
+ \value PositionSemantic Attribute specifies vertex position attribute
+ (\c{attr_pos} in shaders).
+ Attribute has three components.
+ \value NormalSemantic Attribute specifies vertex normal attribute
+ (\c{attr_norm} in shaders).
+ Attribute has three components.
+ \value TexCoordSemantic Attribute specifies vertex texture coordinate attribute
+ (\c{attr_uv0} in shaders).
+ Attribute has two components.
+ \value TangentSemantic Attribute specifies vertex tangent attribute
+ (\c{attr_textan} in shaders).
+ Attribute has three components.
+ \value BinormalSemantic Attribute specifies vertex binormal attribute
+ (\c{attr_binormal} in shaders).
+ Attribute has three components.
+*/
+
+/*!
+ \enum Q3DSGeometry::Attribute::ComponentType
+
+ This enumeration specifies the possible attribute component types for the geometry.
+ The attribute component type indicates how the attribute component data should be interpreted.
+
+ \value DefaultType Use the default type for the attribute.
+ \value U8Type Component data is unsigned 8 bit integer.
+ \value I8Type Component data is signed 8 bit integer.
+ \value U16Type Component data is unsigned 16 bit integer.
+ \value I16Type Component data is signed 16 bit integer.
+ \value U32Type Component data is unsigned 32 bit integer.
+ Default component type for attributes with IndexSemantic.
+ \value I32Type Component data is signed 32 bit integer.
+ \value U64Type Component data is unsigned 64 bit integer.
+ \value I64Type Component data is signed 64 bit integer.
+ \value F16Type Component data is 16 bit float.
+ \value F32Type Component data is 32 bit float.
+ Default component type for attributes with a semantic other than IndexSemantic.
+ \value F64Type Component data is 64 bit float.
+*/
+
+/*!
+ Constructs a new Q3DSGeometry instance.
+ */
Q3DSGeometry::Q3DSGeometry()
: d_ptr(new Q3DSGeometryPrivate(this))
{
}
+/*!
+ Destructor.
+ */
Q3DSGeometry::~Q3DSGeometry()
{
delete d_ptr;
}
+/*!
+ Sets the vertex buffer to \a data. The \a data must contain all attribute data in interleaved
+ format. You must also add attributes to the geometry to specify how the vertex buffer
+ data should be interpreted.
+
+ \sa addAttribute
+ \sa vertexBuffer
+ */
void Q3DSGeometry::setVertexData(const QByteArray &data)
{
d_ptr->m_meshData.m_vertexBuffer = data;
}
+/*!
+ Sets the index buffer to \a data.
+ You must also add an attribute with \c IndexSemantic to the geometry.
+
+ \sa addAttribute
+ \sa indexBuffer
+ \sa Attribute::Semantic
+ */
void Q3DSGeometry::setIndexData(const QByteArray &data)
{
d_ptr->m_meshData.m_indexBuffer = data;
}
+/*!
+ Returns the currently set vertex buffer data.
+
+ \sa setVertexData
+ */
const QByteArray &Q3DSGeometry::vertexBuffer() const
{
return d_ptr->m_meshData.m_vertexBuffer;
}
+/*!
+ This is an overloaded function.
+ */
QByteArray &Q3DSGeometry::vertexBuffer()
{
return d_ptr->m_meshData.m_vertexBuffer;
}
+/*!
+ Returns the currently set index buffer data.
+
+ \sa setIndexData
+ */
const QByteArray &Q3DSGeometry::indexBuffer() const
{
return d_ptr->m_meshData.m_indexBuffer;
}
+/*!
+ This is an overloaded function.
+ */
QByteArray &Q3DSGeometry::indexBuffer()
{
return d_ptr->m_meshData.m_indexBuffer;
}
+/*!
+ Returns the number of attributes set to this geometry.
+
+ \sa addAttribute
+ */
int Q3DSGeometry::attributeCount() const
{
return d_ptr->m_meshData.m_attributeCount;
}
+/*!
+ Sets an attribute to this geometry. The geometry attributes specify how the data in vertex and
+ index buffers should be interpreted. Each attribute is composed of a \a semantic, which
+ indicates which vertex attribute this attribute refers to and \a componentType, which indicates
+ the data type of each component of the attribute data. The \a semantic also determines
+ the component count in vertex buffer for the attribute. The component count is two for
+ TexCoordSemantic and three for other vertex buffer semantics.
+ Component count for index buffer is always one.
+
+ For example, PositionSemantic specifies the vertex position in local space, so it is composed
+ of three components: x, y, and z-coordinates.
+
+ The order of addAttribute calls must match the order of the attributes in vertex data.
+ The order is relevant as it is used to calculate the offset and stride of each attribute.
+ */
void Q3DSGeometry::addAttribute(Q3DSGeometry::Attribute::Semantic semantic,
Q3DSGeometry::Attribute::ComponentType componentType)
{
@@ -98,11 +286,20 @@ void Q3DSGeometry::addAttribute(Q3DSGeometry::Attribute::Semantic semantic,
d_ptr->m_meshData.m_stride = d_ptr->getNextAttributeOffset();
}
+/*!
+ This is an overloaded function.
+ */
void Q3DSGeometry::addAttribute(const Q3DSGeometry::Attribute &att)
{
addAttribute(att.semantic, att.componentType);
}
+/*!
+ Returns an added attribute with index \a idx.
+
+ \sa addAttribute
+ \sa attributeCount
+ */
Q3DSGeometry::Attribute Q3DSGeometry::attribute(int idx) const
{
Attribute att;
@@ -113,16 +310,31 @@ Q3DSGeometry::Attribute Q3DSGeometry::attribute(int idx) const
return att;
}
+/*!
+ Returns the primitive type of this geometry.
+
+ \sa setPrimitiveType
+ */
Q3DSGeometry::PrimitiveType Q3DSGeometry::primitiveType() const
{
return static_cast<Q3DSGeometry::PrimitiveType>(d_ptr->m_meshData.m_primitiveType);
}
+/*!
+ Sets the primitive type of this geometry to \a type.
+
+ \sa primitiveType
+ */
void Q3DSGeometry::setPrimitiveType(Q3DSGeometry::PrimitiveType type)
{
d_ptr->m_meshData.m_primitiveType = static_cast<Q3DSViewer::MeshData::PrimitiveType>(type);
}
+/*!
+ Removes all added attributes and buffers and resets the geometry to an uninitialized state.
+
+ \sa primitiveType
+ */
void Q3DSGeometry::clear()
{
d_ptr->m_meshData.clear();
diff --git a/src/api/studio3d/q3dspresentation.cpp b/src/api/studio3d/q3dspresentation.cpp
index c07922c..cd9ecfa 100644
--- a/src/api/studio3d/q3dspresentation.cpp
+++ b/src/api/studio3d/q3dspresentation.cpp
@@ -79,9 +79,54 @@ QT_BEGIN_NAMESPACE
information is available regardless.
\note This class should not be instantiated directly when working with the
- C++ APIs. Q3DSSurfaceViewer and Q3DSWidget create a Q3DSPresentation
+ C++ APIs. Q3DSSurfaceViewer creates a Q3DSPresentation
instance implicitly. This can be queried via
- Q3DSSurfaceViewer::presentation() or Q3DSWidget::presentation().
+ Q3DSSurfaceViewer::presentation().
+ */
+
+/*!
+ \qmltype Presentation
+ \instantiates Q3DSPresentationItem
+ \inqmlmodule QtStudio3D.OpenGL
+ \ingroup OpenGLRuntime
+ \inherits Q3DSPresentation
+ \keyword Studio3D
+
+ \brief Represents a Qt 3D Studio presentation.
+
+ This item provides properties and methods for controlling a
+ presentation.
+
+ Qt 3D Studio supports multiple presentations in one project. There
+ is always a main presentation and zero or more
+ sub-presentations. The sub-presentations are composed into the
+ main presentations either as contents of Qt 3D Studio layers or as
+ texture maps.
+
+ In the filesystem each presentation corresponds to one \c{.uip}
+ presentation file. When present, the \c{.uia} project file ties
+ these together by specifying a name for each of the
+ (sub-)presentations and specifies which one is the main one.
+
+ The \c{.uia} project also defines \l{DataInput}s and
+ \l{DataOutput}s that are exported by the presentations.
+ \l{DataInput}s provide a way to provide input to the presentation
+ to e.g. control a timeline of a subpresentation from code.
+ \l{DataOutput}s provide a way to get notified when an attribute
+ is changed in the presentation by animation timeline,
+ by behavior scripts or by a \l{DataInput}.
+
+ The Presentation type handles child objects of the types \l Element, \l
+ SceneElement, \l DataInput, \l DataOutput, and \l SubPresentationSettings specially. These
+ will get automatically associated with the presentation and can control
+ certain aspects of it from that point on.
+
+ From the API point of view Presentation corresponds to the
+ main presentation. The source property can refer either to a
+ \c{.uia} or \c{.uip} file. When specifying a file with \c{.uip}
+ extension and a \c{.uia} is present with the same name, the
+ \c{.uia} is loaded automatically and thus sub-presentation
+ information is available regardless.
*/
/*!
@@ -299,7 +344,7 @@ Q3DSDataOutput *Q3DSPresentation::registeredDataOutput(const QString &name) cons
interface to set a datainput value using datainput name, or call Q3DSDataInput::setValue
directly for a specific datainput.
- \sa setDataInputValue
+ \sa setDataInputValue()
\sa Q3DSDataInput
*/
QVector<Q3DSDataInput *> Q3DSPresentation::dataInputs() const
@@ -327,7 +372,7 @@ QVector<Q3DSDataInput *> Q3DSPresentation::dataInputs() const
interface to set a datainput value using datainput name, or call Q3DSDataInput::setValue
directly for a specific datainput.
- \sa setDataInputValue
+ \sa setDataInputValue()
\sa Q3DSDataInput
*/
QVariantList Q3DSPresentation::getDataInputs() const
@@ -342,19 +387,19 @@ QVariantList Q3DSPresentation::getDataInputs() const
}
/*!
+ \qmlmethod var Presentation::getDataInputs(string metadataKey)
Returns a list of datainputs defined for this presentation that have the specified
\a metadataKey.
- \sa setDataInputValue
- \sa Q3DSDataInput
+ \sa DataInput
*/
/*!
- \qmlmethod var Presentation::getDataInputs
Returns a list of datainputs defined for this presentation that have the specified
\a metadataKey.
- \sa DataInput
+ \sa setDataInputValue()
+ \sa Q3DSDataInput
*/
QVariantList Q3DSPresentation::getDataInputs(const QString &metadataKey) const
{
@@ -371,7 +416,7 @@ QVariantList Q3DSPresentation::getDataInputs(const QString &metadataKey) const
Returns a list of datainputs defined for this presentation that have the specified
\a metadataKey.
- \sa setDataInputValue
+ \sa setDataInputValue()
\sa Q3DSDataInput
*/
QVector<Q3DSDataInput *> Q3DSPresentation::dataInputs(const QString &metadataKey) const
@@ -405,7 +450,7 @@ QVector<Q3DSDataOutput *> Q3DSPresentation::dataOutputs() const
\c{valueChanged()} signal in the required \l{DataOutput}s to get notified
when the value tracked by the DataOutput is changed.
- \sa SDataOutput
+ \sa Q3DSDataOutput
*/
/*!
* \brief Q3DSPresentation::getDataOutputs Returns \l{DataOutput}s.
@@ -465,16 +510,44 @@ void Q3DSPresentation::setDelayedLoading(bool enable)
}
/*!
- \qmlmethod Presentation::preloadSlide
- Preloads slide resources to memory. All resources required by the given slide will be
- loaded in the background. This function has effect only when delayed loading is enabled.
- \param elementPath
+ \qmlmethod Presentation::preloadSlide(string elementPath)
+
+ Preloads slide resources identified by \a elementPath to memory. All resources required
+ by the given slide will load in the background.
+
+ \a elementPath is the identifier of a slide in a presentation and component.
+
+ The presentation, component and slide are separated by ":", for example
+ My-presentation:Scene.Layer.Speedometer:Main-slide.
+
+ If \a elementPath does not contain any ":", then it specifies the name of a slide in the
+ main presentation and main component. If it contains one ":", it specifies component:slide
+ in the main presentation, and if it contains two ":", it
+ specifies presentation:component:slide.
+
+ If you want to indicate the main slide in a sub-presentation, you will need to specify the
+ full path. For example My-sub-presentation:Scene:Main-slide.
+
+ This function has effect only when delayed loading is enabled.
*/
/*!
- \brief Q3DSPresentation::preloadSlide
- Preloads slide resources to memory. All resources required by the given slide will be
- loaded in the background. This function has effect only when delayed loading is enabled.
- \param elementPath
+ Preloads slide resources identified by \a elementPath to memory. All resources required
+ by the given slide will load in the background.
+
+ \a elementPath is the identifier of a slide in a presentation and component.
+
+ The presentation, component and slide are separated by ":", for example
+ My-presentation:Scene.Layer.Speedometer:Main-slide.
+
+ If \a elementPath does not contain any ":", then it specifies the name of a slide in the
+ main presentation and main component. If it contains one ":", it specifies component:slide
+ in the main presentation, and if it contains two ":", it
+ specifies presentation:component:slide.
+
+ If you want to indicate the main slide in a sub-presentation, you will need to specify the
+ full path. For example My-sub-presentation:Scene:Main-slide.
+
+ This function has effect only when delayed loading is enabled.
*/
void Q3DSPresentation::preloadSlide(const QString &elementPath)
{
@@ -485,17 +558,45 @@ void Q3DSPresentation::preloadSlide(const QString &elementPath)
}
/*!
- \qmlmethod Presentation::unloadSlide
- Unloads slide resources from memory. If the slide is current, then the resources are unloaded
- when the slide is changed. This function has effect only when delayed loading is enabled.
- \param elementPath
+ \qmlmethod Presentation::unloadSlide(string elementPath)
+
+ Unloads slide resources identified by \a elementPath from memory. If the
+ slide is current, the resources are unloaded when the slide is changed.
+
+ \a elementPath is the identifier of a slide in a presentation and component.
+
+ The presentation, component and slide are separated by ":", for example
+ my-presentation:Scene.Layer.Speedometer:Main-slide.
+
+ If \a elementPath does not contain any ":", then it specifies the name of a slide in the
+ main presentation and main component. If it contains one ":", it specifies component:slide
+ in the main presentation, and if it contains two ":", it
+ specifies presentation:component:slide.
+
+ If you want to indicate the main slide in a sub-presentation, you will need to specify the
+ full path. For example My-sub-presentation:Scene:Main-slide.
+
+ This function has effect only when delayed loading is enabled.
*/
/*!
- \brief Q3DSPresentation::unloadSlide
- Unloads slide resources from memory. If the slide is current, then the resources are unloaded
- when the slide is changed. This function has effect only when delayed loading is enabled.
- \param elementPath
+ Unloads slide resources identified by \a elementPath from memory. If the
+ slide is current, the resources are unloaded when the slide is changed.
+
+ \a elementPath is the identifier of a slide in a presentation and component.
+
+ The presentation, component and slide are separated by ":", for example
+ My-presentation:speedometer:main-slide.
+
+ If \a elementPath does not contain any ":", then it specifies the name of a slide in the
+ main presentation and main component. If it contains one ":", it specifies component:slide
+ in the main presentation, and if it contains two ":", it
+ specifies presentation:Scene.Layer.Speedometer:Main-slide.
+
+ If you want to indicate the main slide in a sub-presentation, you will need to specify the
+ full path. For example My-sub-presentation:Scene:Main-slide.
+
+ This function has effect only when delayed loading is enabled.
*/
void Q3DSPresentation::unloadSlide(const QString &elementPath)
{
@@ -506,7 +607,7 @@ void Q3DSPresentation::unloadSlide(const QString &elementPath)
}
/*!
- This API is for backwards compatibility. We recommend using \l{DataInput}s to control
+ This function is for backwards compatibility. We recommend using \l{DataInput}s to control
slide changes. \l{DataInput} provides stronger contract between the design and
code as it avoids use of elementPath (a reference to design's internal structure).
@@ -531,7 +632,7 @@ void Q3DSPresentation::goToSlide(const QString &elementPath, unsigned int index)
}
/*!
- This API is for backwards compatibility. We recommend using \l{DataInput}s to control
+ This function is for backwards compatibility. We recommend using \l{DataInput}s to control
slide changes. \l{DataInput} provides stronger contract between the design and
code as it avoids use of elementPath (a reference to design's internal structure).
@@ -557,7 +658,7 @@ void Q3DSPresentation::goToSlide(const QString &elementPath, const QString &name
}
/*!
- This API is for backwards compatibility. We recommend using \l{DataInput}s to control
+ This function is for backwards compatibility. We recommend using \l{DataInput}s to control
slide changes. \l{DataInput} provides stronger contract between the design and
code as it avoids use of elementPath (a reference to design's internal structure).
@@ -584,12 +685,12 @@ void Q3DSPresentation::goToSlide(const QString &elementPath, bool next, bool wra
}
/*!
- This API is for backwards compatibility. We recommend using \l{DataInput}s to control
+ This function is for backwards compatibility. We recommend using \l{DataInput}s to control
slide changes. \l{DataInput} provides stronger contract between the design and
code as it avoids use of elementPath (a reference to design's internal structure).
Moves the timeline for a time context (a Scene or a Component element) to a
- specific position. The position is given in seconds in \a timeSeconds.
+ specific position. The position is given in seconds in \a time.
If \a elementPath points to a time context, that element is
controlled. For all other element types the time context owning
@@ -624,7 +725,7 @@ void Q3DSPresentation::goToTime(const QString &elementPath, float time)
}
/*!
- This API is for backwards compatibility. We recommend using \l{DataInput}s to control
+ This function is for backwards compatibility. We recommend using \l{DataInput}s to control
attributes in the presentation. \l{DataInput} provides stronger contract between the
design and code as it avoids use of elementPath (a reference to design's
internal structure).
@@ -778,12 +879,18 @@ void Q3DSPresentation::setDataInputValue(const QString &name, const QVariant &va
The element is ready for use once elementsCreated() signal is received for it.
- \sa createElements
- \sa createMaterial
- \sa createMesh
- \sa elementsCreated
- \sa setAttribute
- \sa dataInputs
+ \note If your application is creating and deleting a lot of elements, it is recommended that
+ you reuse previously deleted element names when creating new elements.
+ This is because the internal string table implementation of Qt 3D Studio ogl-runtime doesn't
+ support removing strings for performance reasons, so always using new unique names
+ will leak memory.
+
+ \sa createElements()
+ \sa createMaterial()
+ \sa createMesh()
+ \sa elementsCreated()
+ \sa setAttribute()
+ \sa dataInputs()
*/
void Q3DSPresentation::createElement(const QString &parentElementPath, const QString &slideName,
const QHash<QString, QVariant> &properties)
@@ -798,8 +905,8 @@ void Q3DSPresentation::createElement(const QString &parentElementPath, const QSt
specified with \a slideName. Element properties are specified in \a properties.
For more details, see createElement().
- \sa createElement
- \sa elementsCreated
+ \sa createElement()
+ \sa elementsCreated()
*/
void Q3DSPresentation::createElements(const QString &parentElementPath, const QString &slideName,
const QVector<QHash<QString, QVariant>> &properties)
@@ -820,8 +927,8 @@ void Q3DSPresentation::createElements(const QString &parentElementPath, const QS
Deleting elements is supported only for elements that have been dynamically created with
createElement() or createElements().
- \sa deleteElements
- \sa createElement
+ \sa deleteElements()
+ \sa createElement()
*/
void Q3DSPresentation::deleteElement(const QString &elementPath)
{
@@ -835,7 +942,7 @@ void Q3DSPresentation::deleteElement(const QString &elementPath)
Deleting elements is supported only for elements that have been dynamically created with
createElement() or createElements().
- \sa deleteElement
+ \sa deleteElement()
*/
void Q3DSPresentation::deleteElements(const QStringList &elementPaths)
{
@@ -852,6 +959,7 @@ void Q3DSPresentation::deleteElements(const QStringList &elementPaths)
/*!
\qmlproperty list<string> Presentation::createdElements
+ \readonly
This property contains a list of all dynamically created elements on this presentation.
@@ -859,8 +967,8 @@ void Q3DSPresentation::deleteElements(const QStringList &elementPaths)
\note Elements can only be dynamically created via C++ API.
- \sa createElement
- \sa createElements
+ \sa createElement()
+ \sa createElements()
*/
/*!
@@ -870,8 +978,8 @@ void Q3DSPresentation::deleteElements(const QStringList &elementPaths)
This property is read-only.
- \sa createElement
- \sa createElements
+ \sa createElement()
+ \sa createElements()
*/
QStringList Q3DSPresentation::createdElements() const
{
@@ -898,15 +1006,21 @@ QStringList Q3DSPresentation::createdElements() const
The material is ready for use once materialsCreated() signal is received for it.
+ \note If your application is creating and deleting a lot of materials, it is recommended that
+ you reuse previously deleted material names when creating new materials.
+ This is because the internal string table implementation of Qt 3D Studio ogl-runtime doesn't
+ support removing strings for performance reasons, so always using new unique names
+ will leak memory.
+
\note Creating materials that utilise custom shaders with mipmapped textures can in some cases
corrupt the textures on other elements if the same textures are already used by existing basic
materials in the scene, as basic materials do not create mipmaps for their textures.
Typical symptom of this is black texture on another element after creating a new element using
the custom material.
- \sa createMaterials
- \sa createElement
- \sa materialsCreated
+ \sa createMaterials()
+ \sa createElement()
+ \sa materialsCreated()
*/
void Q3DSPresentation::createMaterial(const QString &materialDefinition,
const QString &subPresId)
@@ -923,8 +1037,8 @@ void Q3DSPresentation::createMaterial(const QString &materialDefinition,
For more details, see createMaterial().
- \sa createMaterial
- \sa materialsCreated
+ \sa createMaterial()
+ \sa materialsCreated()
*/
void Q3DSPresentation::createMaterials(const QStringList &materialDefinitions,
const QString &subPresId)
@@ -947,8 +1061,8 @@ void Q3DSPresentation::createMaterials(const QStringList &materialDefinitions,
Deleting materials is supported only for materials that have been dynamically created with
createMaterial() or createMaterials().
- \sa deleteMaterials
- \sa createMaterial
+ \sa deleteMaterials()
+ \sa createMaterial()
*/
void Q3DSPresentation::deleteMaterial(const QString &materialName)
{
@@ -965,7 +1079,7 @@ void Q3DSPresentation::deleteMaterial(const QString &materialName)
Deleting materials is supported only for materials that have been dynamically created with
createMaterial() or createMaterials().
- \sa deleteMaterial
+ \sa deleteMaterial()
*/
void Q3DSPresentation::deleteMaterials(const QStringList &materialNames)
{
@@ -982,6 +1096,7 @@ void Q3DSPresentation::deleteMaterials(const QStringList &materialNames)
/*!
\qmlproperty list<string> Presentation::createdMaterials
+ \readonly
This property contains a list of all dynamically created materials on this presentation.
@@ -989,8 +1104,8 @@ void Q3DSPresentation::deleteMaterials(const QStringList &materialNames)
\note Materials can only be dynamically created via C++ API.
- \sa createMaterial
- \sa createMaterials
+ \sa createMaterial()
+ \sa createMaterials()
*/
/*!
@@ -1000,8 +1115,8 @@ void Q3DSPresentation::deleteMaterials(const QStringList &materialNames)
This property is read-only.
- \sa createMaterial
- \sa createMaterials
+ \sa createMaterial()
+ \sa createMaterials()
*/
QStringList Q3DSPresentation::createdMaterials() const
{
@@ -1014,9 +1129,9 @@ QStringList Q3DSPresentation::createdMaterials() const
The mesh is ready for use once meshesCreated() signal is received for it.
- \sa createElement
- \sa createMeshes
- \sa meshesCreated
+ \sa createElement()
+ \sa createMeshes()
+ \sa meshesCreated()
*/
void Q3DSPresentation::createMesh(const QString &meshName, const Q3DSGeometry &geometry)
{
@@ -1031,8 +1146,14 @@ void Q3DSPresentation::createMesh(const QString &meshName, const Q3DSGeometry &g
The ownership of supplied geometries stays with the caller.
- \sa createMesh
- \sa meshesCreated
+ \note If your application is creating and deleting a lot of meshes, it is recommended that
+ you reuse previously deleted mesh names when creating new materials.
+ This is because the internal string table implementation of \RUNTIME doesn't
+ support removing strings for performance reasons, so always using new unique names
+ will leak memory.
+
+ \sa createMesh()
+ \sa meshesCreated()
*/
void Q3DSPresentation::createMeshes(const QHash<QString, const Q3DSGeometry *> &meshData)
{
@@ -1058,8 +1179,8 @@ void Q3DSPresentation::createMeshes(const QHash<QString, const Q3DSGeometry *> &
Deleting meshes is supported only for meshes that have been dynamically created with
createMesh() or createMeshes().
- \sa deleteMeshes
- \sa createMesh
+ \sa deleteMeshes()
+ \sa createMesh()
*/
void Q3DSPresentation::deleteMesh(const QString &meshName)
{
@@ -1073,7 +1194,7 @@ void Q3DSPresentation::deleteMesh(const QString &meshName)
Deleting meshes is supported only for meshes that have been dynamically created with
createMesh() or createMeshes().
- \sa deleteMesh
+ \sa deleteMesh()
*/
void Q3DSPresentation::deleteMeshes(const QStringList &meshNames)
{
@@ -1090,6 +1211,7 @@ void Q3DSPresentation::deleteMeshes(const QStringList &meshNames)
/*!
\qmlproperty list<string> Presentation::createdMeshes
+ \readonly
This property contains a list of all dynamically created meshes on this presentation.
@@ -1097,8 +1219,8 @@ void Q3DSPresentation::deleteMeshes(const QStringList &meshNames)
\note Meshes can only be dynamically created via C++ API.
- \sa createMesh
- \sa createMeshes
+ \sa createMesh()
+ \sa createMeshes()
*/
/*!
@@ -1108,8 +1230,8 @@ void Q3DSPresentation::deleteMeshes(const QStringList &meshNames)
This property is read-only.
- \sa createMesh
- \sa createMeshes
+ \sa createMesh()
+ \sa createMeshes()
*/
QStringList Q3DSPresentation::createdMeshes() const
{
@@ -1213,125 +1335,171 @@ void Q3DSPresentation::keyReleaseEvent(QKeyEvent *e)
}
}
-// #TODO: QT3DS-3562 Most Presentation signals missing documentation
/*!
- * \qmlsignal Presentation::slideEntered
- * Emitted when
- * \param elementPath
- * \param index
- * \param name
+ \qmlsignal Presentation::slideEntered(string elementPath, int index, string name)
+
+ Emitted when a slide in a presentation or component is entered. \a elementPath
+ specifies the slide path. \a index and \a name contain the index and
+ the name of the entered slide.
+
+ This signal is emitted for each component, meaning that it can be emitted multiple
+ times on one slide change.
*/
/*!
- * \fn Q3DSPresentation::slideEntered
- * Emitted when
- * \param elementPath
- * \param index
- * \param name
+ \fn Q3DSPresentation::slideEntered(const QString &elementPath, unsigned int index, const QString &name)
+
+ Emitted when a slide in a presentation or component is entered. \a elementPath
+ specifies the slide path. \a index and \a name contain the index and
+ the name of the entered slide.
+
+ This signal is emitted for each component, meaning that it can be emitted multiple
+ times on one slide change.
*/
/*!
- * \qmlsignal Presentation::slideExited
- * Emitted when
- * \param elementPath
- * \param index
- * \param name
+ \qmlsignal Presentation::slideExited(string elementPath, int index, string name)
+
+ Emitted when a slide in a presentation or component is exited. \a elementPath
+ specifies the slide path. \a index and \a name contain the index and
+ the name of the exited slide.
+
+ This signal is emitted for each component, meaning that it can be emitted multiple
+ times on one slide change.
*/
/*!
- * \fn Q3DSPresentation::slideExited
- * Emitted when
- * \param elementPath
- * \param index
- * \param name
- */
+ \fn Q3DSPresentation::slideExited(const QString &elementPath, unsigned int index, const QString &name)
+
+ Emitted when a slide in a presentation or component is exited. \a elementPath
+ specifies the slide path. \a index and \a name contain the index and
+ the name of the exited slide.
+
+ This signal is emitted for each component, meaning that it can be emitted multiple
+ times on one slide change.
+*/
/*!
- * \fn Q3DSPresentation::dataInputsReady
- * Emitted when \l{DataInput}s in the Studio project have been parsed and data inputs are available
- * through dataInputs() and getDataInputs() methods.
- */
+ \fn Q3DSPresentation::dataInputsReady()
+
+ Emitted when \l{DataInput}s in the Studio project have been parsed and data inputs are available
+ through dataInputs() and getDataInputs() methods.
+*/
/*!
- * \fn Q3DSPresentation::dataOutputsReady
- * Emitted when \l{DataOutput}s in the Studio project have been parsed and data outputs are available
- * through dataOutputs() and getDataOutputs() methods.
+ \fn Q3DSPresentation::dataOutputsReady()
+
+ Emitted when \l{DataOutput}s in the Studio project have been parsed and data outputs are available
+ through dataOutputs() and getDataOutputs() methods.
*/
/*!
- * \qmlsignal Presentation::customSignalEmitted
- * Emitted when
- * \param elementPath
- * \param name
+ \qmlsignal Presentation::customSignalEmitted(string elementPath, string name)
+
+ Emitted when an action with the \c{Emit Signal}
+ handler is executed in the Qt 3D Studio presentation. \a
+ elementPath specifies \c{Target Object}, and \a name specifies \c{Signal Name}.
+
+ Connecting to this signal offers a way of reacting upon certain
+ events in the Qt 3D Studio presentation.
+
+ \image customsignal.png
+
+ In this example, pressing or tapping on the Cluster object will result in
+ emitting \c{customSignalEmitted("Cluster", "clusterPressed")}.
*/
/*!
- * \fn Q3DSPresentation::customSignalEmitted
- * Emitted when
- * \param elementPath
- * \param name
+ \fn Q3DSPresentation::customSignalEmitted(const QString &elementPath, const QString &name)
+
+ Emitted when an action with the \c{Emit Signal}
+ handler is executed in the Qt 3D Studio presentation. \a
+ elementPath specifies \c{Target Object}, and \a name specifies \c{Signal Name}.
+
+ Connecting to this signal offers a way of reacting upon certain
+ events in the Qt 3D Studio presentation.
+
+ \image customsignal.png
+
+ In this example, pressing or tapping on the Cluster object will result in
+ emitting \c{customSignalEmitted("Cluster", "clusterPressed")}.
*/
/*!
- \qmlsignal Presentation::elementsCreated
+ \qmlsignal Presentation::elementsCreated(list<string> elementPaths, string error)
+
Emitted when one or more elements have been created in response to createElement()
or createElements() calls. The \a elementPaths list contains the element paths of the created
- elements. If creation failed, \a error string indicates the reason.
+ elements.
+
+ If creation failed, \a error string indicates the reason.
- \sa createElement
- \sa createElements
+ \sa createElement()
+ \sa createElements()
*/
/*!
- \fn Q3DSPresentation::elementsCreated
+ \fn Q3DSPresentation::elementsCreated(const QStringList &elementPaths, const QString &error)
+
Emitted when one or more elements have been created in response to createElement()
or createElements() calls. The \a elementPaths list contains the element paths of the created
elements. If creation failed, \a error string indicates the reason.
- \sa createElement
- \sa createElements
+ \sa createElement()
+ \sa createElements()
*/
/*!
- \qmlsignal Presentation::materialsCreated
+ \qmlsignal Presentation::materialsCreated(list<string> materialNames, string error)
+
Emitted when one or more materials have been created in response to createMaterial()
or createMaterials() calls. The \a materialNames list contains the names of the created
materials. If the material is created into a subpresentation, the name is prefixed with
subpresentation ID followed by a colon.
+
If creation failed, \a error string indicates the reason.
- \sa createMaterial
- \sa createMaterials
+ \sa createMaterial()
+ \sa createMaterials()
*/
/*!
- \fn Q3DSPresentation::materialsCreated
+ \fn Q3DSPresentation::materialsCreated(const QStringList &materialNames, const QString &error)
+
Emitted when one or more materials have been created in response to createMaterial()
or createMaterials() calls. The \a materialNames list contains the names of the created
- materials. If creation failed, \a error string indicates the reason.
+ materials.
+
+ If creation failed, \a error string indicates the reason.
- \sa createMaterial
- \sa createMaterials
+ \sa createMaterial()
+ \sa createMaterials()
*/
/*!
- \qmlsignal Presentation::meshesCreated
+ \qmlsignal Presentation::meshesCreated(list<string> meshNames, string error)
+
Emitted when one or more meshes have been created in response to createMesh()
or createMeshes() calls. The \a meshNames list contains the names of the created
- meshes. If creation failed, \a error string indicates the reason.
+ meshes.
+
+ If creation failed, \a error string indicates the reason.
- \sa createMesh
- \sa createMeshes
+ \sa createMesh()
+ \sa createMeshes()
*/
/*!
- \fn Q3DSPresentation::meshesCreated
+ \fn Q3DSPresentation::meshesCreated(const QStringList &meshNames, const QString &error)
+
Emitted when one or more meshes have been created in response to createMesh()
or createMeshes() calls. The \a meshNames list contains the names of the created
- meshes. If creation failed, \a error string indicates the reason.
+ meshes.
+
+ If creation failed, \a error string indicates the reason.
- \sa createMesh
- \sa createMeshes
+ \sa createMesh()
+ \sa createMeshes()
*/
/*!
diff --git a/src/api/studio3d/q3dssceneelement.cpp b/src/api/studio3d/q3dssceneelement.cpp
index 3f860d6..8de03eb 100644
--- a/src/api/studio3d/q3dssceneelement.cpp
+++ b/src/api/studio3d/q3dssceneelement.cpp
@@ -40,7 +40,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype SceneElement
\instantiates Q3DSSceneElement
- \inqmlmodule Qt3DStudio
+ \inqmlmodule QtStudio3D.OpenGL
\ingroup OpenGLRuntime
\brief Controls the special Scene or Component scene objects in a Qt 3D
Studio presentation.
@@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE
\note The functionality of Q3DSSceneElement is equivalent to
Q3DSPresentation::goToTime() and Q3DSPresentation::goToSlide().
- \sa Q3DSPresentation, Q3DSWidget, Q3DSSurfaceViewer, Q3DSElement
+ \sa Q3DSPresentation, Q3DSSurfaceViewer, Q3DSElement
*/
/*!
@@ -156,11 +156,10 @@ void Q3DSSceneElement::setCurrentSlideIndex(int currentSlideIndex)
}
/*!
- \property int SceneElement::previousSlideIndex
+ \qmlproperty int SceneElement::previousSlideIndex
+ \readonly
Holds the index of the previously active slide of the tracked time context.
-
- Note: This property is read-only.
*/
/*!
\property Q3DSSceneElement::previousSlideIndex
@@ -224,11 +223,10 @@ void Q3DSSceneElement::setCurrentSlideName(const QString &currentSlideName)
}
/*!
- \qmlmproperty string SceneElement::previousSlideName
+ \qmlproperty string SceneElement::previousSlideName
+ \readonly
Holds the name of the previously active slide of the tracked time context.
-
- Note: This property is read-only.
*/
/*!
\property Q3DSSceneElement::previousSlideName
@@ -257,7 +255,7 @@ void Q3DSSceneElement::goToSlide(bool next, bool wrap)
/*!
Moves the timeline for a time context (a Scene or a Component element) to a
- specific position. The position is given in seconds in \a timeSeconds.
+ specific position. The position is given in seconds in \a time.
*/
void Q3DSSceneElement::goToTime(float time)
{
diff --git a/src/api/studio3d/q3dssurfaceviewer.cpp b/src/api/studio3d/q3dssurfaceviewer.cpp
index 32ffb99..899d771 100644
--- a/src/api/studio3d/q3dssurfaceviewer.cpp
+++ b/src/api/studio3d/q3dssurfaceviewer.cpp
@@ -94,7 +94,6 @@ QT_BEGIN_NAMESPACE
}
\endcode
- \sa Q3DSWidget
*/
/*!
@@ -259,8 +258,6 @@ bool Q3DSSurfaceViewer::isRunning() const
return d_ptr->m_viewerApp != nullptr;
}
-// #TODO QT3DS-3534
-
/*!
\property Q3DSSurfaceViewer::presentationId
*/
diff --git a/src/api/studio3d/q3dsviewersettings.cpp b/src/api/studio3d/q3dsviewersettings.cpp
index 187729a..9403a32 100644
--- a/src/api/studio3d/q3dsviewersettings.cpp
+++ b/src/api/studio3d/q3dsviewersettings.cpp
@@ -40,11 +40,11 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype ViewerSettings
\instantiates Q3DSViewerSettings
- \inqmlmodule Qt3DStudio
+ \inqmlmodule QtStudio3D.OpenGL
\ingroup OpenGLRuntime
\brief Qt 3D Studio presentation viewer settings.
- This type provides properties to define presentation independent viewer settings.
+ This type provides properties to define presentation-independent viewer settings.
\note ViewerSettings are only applicable when \l Studio3D is used in the
default mode, showing the final, composed image from the Qt 3D Studio
@@ -60,13 +60,12 @@ QT_BEGIN_NAMESPACE
\brief Qt 3D Studio presentation viewer settings.
- Q3DSViewerSettings provides properties to define presentation independent
+ Q3DSViewerSettings provides properties to define presentation-independent
viewer settings.
\note This class should not be instantiated directly when working with the
- C++ APIs. Q3DSSurfaceViewer and Q3DSWidget create a Q3DSViewerSettings
- instance implicitly. This can be queried via Q3DSSurfaceViewer::settings()
- or Q3DSWidget::settings().
+ C++ APIs. Q3DSSurfaceViewer creates a Q3DSViewerSettings
+ instance implicitly. This can be queried via Q3DSSurfaceViewer::settings().
*/
/*!
@@ -156,11 +155,15 @@ void Q3DSViewerSettings::setShowRenderStats(bool show)
}
}
-/*!
- \qmlproperty ViewerSettings::shadeMode
+/*
+ //! TODO
+ \internal
+ \qmlproperty enumeration ViewerSettings::shadeMode
*/
-/*!
+/*
+ // TODO
+ \internal
\property Q3DSViewerSettings::shadeMode
*/
Q3DSViewerSettings::ShadeMode Q3DSViewerSettings::shadeMode() const
@@ -226,20 +229,49 @@ void Q3DSViewerSettings::setScaleMode(Q3DSViewerSettings::ScaleMode mode)
}
/*!
- \qmmlmethod ViewerSettings::save
+ \qmlproperty bool ViewerSettings::matteEnabled
+
+ Specifies if the empty area around the presentation (applicable when
+ scaleMode is set to ScaleModeCenter or ScaleModeFit) should be filled with
+ a custom color.
+
+ The default value is \c false.
+ */
+/*!
+ \property Q3DSViewerSettings::matteEnabled
+
+ Specifies if the empty area around the presentation (applicable when
+ scaleMode is set to ScaleModeCenter or ScaleModeFit) should be filled with
+ a custom color.
+
+ The default value is \c false.
+
+ \sa matteColor
+ */
+bool Q3DSViewerSettings::matteEnabled() const
+{
+ return d_ptr->m_matteEnabled;
+}
+
+void Q3DSViewerSettings::setMatteEnabled(bool enabled)
+{
+ if (d_ptr->m_matteEnabled != enabled) {
+ d_ptr->setMatteEnabled(enabled);
+ Q_EMIT matteEnabledChanged(enabled);
+ }
+}
+
+
+/*!
+ \qmlmethod ViewerSettings::save(string group, string organization, string application)
+
Persistently saves the viewer \l{QSettings}{settings} using \a group, \a organization and
\a application.
- \param group
- \param organization
- \param application
*/
+
/*!
- * \brief Q3DSViewerSettings::save Persistently saves the viewer \l{QSettings}{settings}
Persistently saves the viewer \l{QSettings}{settings} using \a group, \a organization and
\a application.
- \param group
- \param organization
- \param application
*/
void Q3DSViewerSettings::save(const QString &group, const QString &organization,
const QString &application)
@@ -248,20 +280,14 @@ void Q3DSViewerSettings::save(const QString &group, const QString &organization,
}
/*!
- \qmlmethod ViewerSettings::load
+ \qmlmethod ViewerSettings::load(string group, string organization, string application)
Loads previously saved viewer \l{QSettings}{settings} using \a group, \a organization and
\a application.
- \param group
- \param organization
- \param application
*/
+
/*!
- * \brief Q3DSViewerSettings::load Loads previously saved viewer \l{QSettings}{settings}
Loads previously saved viewer \l{QSettings}{settings} using \a group, \a organization and
\a application.
- \param group
- \param organization
- \param application
*/
void Q3DSViewerSettings::load(const QString &group, const QString &organization,
const QString &application)
@@ -276,6 +302,7 @@ Q3DSViewerSettingsPrivate::Q3DSViewerSettingsPrivate(Q3DSViewerSettings *q)
, m_commandQueue(nullptr)
, m_matteColor(Qt::black)
, m_showRenderStats(false)
+ , m_matteEnabled(false)
, m_shadeMode(Q3DSViewerSettings::ShadeModeShaded)
, m_scaleMode(Q3DSViewerSettings::ScaleModeCenter)
, m_savedSettings(nullptr)
@@ -290,6 +317,7 @@ void Q3DSViewerSettingsPrivate::setViewerApp(Q3DSViewer::Q3DSViewerApp *app)
{
m_viewerApp = app;
if (m_viewerApp) {
+ setMatteEnabled(m_matteEnabled);
setMatteColor(m_matteColor);
setShowRenderStats(m_showRenderStats);
setShadeMode(m_shadeMode);
@@ -301,6 +329,7 @@ void Q3DSViewerSettingsPrivate::setCommandQueue(CommandQueue *queue)
{
m_commandQueue = queue;
if (m_commandQueue) {
+ setMatteEnabled(m_matteEnabled);
setMatteColor(m_matteColor);
setShowRenderStats(m_showRenderStats);
setShadeMode(m_shadeMode);
@@ -317,6 +346,7 @@ void Q3DSViewerSettingsPrivate::save(const QString &group, const QString &organi
m_savedSettings->setValue(QStringLiteral("showRenderStats"), m_showRenderStats);
m_savedSettings->setValue(QStringLiteral("shadeMode"), m_shadeMode);
m_savedSettings->setValue(QStringLiteral("scaleMode"), m_scaleMode);
+ m_savedSettings->setValue(QStringLiteral("matteEnabled"), m_matteEnabled);
}
void Q3DSViewerSettingsPrivate::load(const QString &group, const QString &organization,
@@ -330,6 +360,7 @@ void Q3DSViewerSettingsPrivate::load(const QString &group, const QString &organi
m_savedSettings->value(QStringLiteral("shadeMode")).toInt()));
q_ptr->setScaleMode(Q3DSViewerSettings::ScaleMode(
m_savedSettings->value(QStringLiteral("scaleMode")).toInt()));
+ q_ptr->setMatteEnabled(m_savedSettings->value(QStringLiteral("matteEnabled")).toBool());
}
void Q3DSViewerSettingsPrivate::setMatteColor(const QColor &color)
@@ -343,6 +374,17 @@ void Q3DSViewerSettingsPrivate::setMatteColor(const QColor &color)
}
}
+void Q3DSViewerSettingsPrivate::setMatteEnabled(bool enabled)
+{
+ m_matteEnabled = enabled;
+ if (m_viewerApp) {
+ m_viewerApp->setMatteColor(enabled);
+ } else if (m_commandQueue) {
+ m_commandQueue->m_matteEnabled = enabled;
+ m_commandQueue->m_matteEnabledChanged = true;
+ }
+}
+
void Q3DSViewerSettingsPrivate::setShowRenderStats(bool show)
{
m_showRenderStats = show;
diff --git a/src/api/studio3d/q3dsviewersettings.h b/src/api/studio3d/q3dsviewersettings.h
index 5d7abf6..7199e1c 100644
--- a/src/api/studio3d/q3dsviewersettings.h
+++ b/src/api/studio3d/q3dsviewersettings.h
@@ -45,9 +45,7 @@ class Q_STUDIO3D_EXPORT Q3DSViewerSettings : public QObject
Q_ENUMS(ShadeMode)
Q_ENUMS(ScaleMode)
-// #TODO: QT3DS-3542 Q3DSViewerSettings API is missing property matteEnabled compared to 2.3
-// Q_PROPERTY(bool matteEnabled READ matteEnabled WRITE setMatteEnabled NOTIFY matteEnabledChanged)
-
+ Q_PROPERTY(bool matteEnabled READ matteEnabled WRITE setMatteEnabled NOTIFY matteEnabledChanged)
Q_PROPERTY(QColor matteColor READ matteColor WRITE setMatteColor NOTIFY matteColorChanged)
Q_PROPERTY(bool showRenderStats READ isShowRenderStats WRITE setShowRenderStats NOTIFY showRenderStatsChanged)
Q_PROPERTY(ScaleMode scaleMode READ scaleMode WRITE setScaleMode NOTIFY scaleModeChanged)
@@ -67,6 +65,7 @@ public:
explicit Q3DSViewerSettings(QObject *parent = nullptr);
~Q3DSViewerSettings();
+ bool matteEnabled() const;
QColor matteColor() const;
bool isShowRenderStats() const;
ScaleMode scaleMode() const;
@@ -77,11 +76,13 @@ public:
const QString &application = QString());
public Q_SLOTS:
+ void setMatteEnabled(bool enabled);
void setMatteColor(const QColor &color);
void setShowRenderStats(bool show);
void setScaleMode(ScaleMode mode);
Q_SIGNALS:
+ void matteEnabledChanged(bool enabled);
void matteColorChanged(const QColor &color);
void showRenderStatsChanged(bool show);
void shadeModeChanged(ShadeMode mode);
diff --git a/src/api/studio3d/q3dsviewersettings_p.h b/src/api/studio3d/q3dsviewersettings_p.h
index 48fbae3..4628241 100644
--- a/src/api/studio3d/q3dsviewersettings_p.h
+++ b/src/api/studio3d/q3dsviewersettings_p.h
@@ -62,6 +62,7 @@ public:
void save(const QString &group, const QString &organization, const QString &application);
void load(const QString &group, const QString &organization, const QString &application);
+ void setMatteEnabled(bool enabled);
void setMatteColor(const QColor &color);
void setShowRenderStats(bool show);
void setShadeMode(Q3DSViewerSettings::ShadeMode mode);
@@ -78,6 +79,7 @@ private:
CommandQueue *m_commandQueue; // Not owned
QColor m_matteColor;
bool m_showRenderStats;
+ bool m_matteEnabled;
Q3DSViewerSettings::ShadeMode m_shadeMode;
Q3DSViewerSettings::ScaleMode m_scaleMode;
QSettings *m_savedSettings;
diff --git a/src/api/studio3d/studio3d.pro b/src/api/studio3d/studio3d.pro
index 8b9fbb0..6749a57 100644
--- a/src/api/studio3d/studio3d.pro
+++ b/src/api/studio3d/studio3d.pro
@@ -3,6 +3,8 @@ TARGET = QtStudio3D
include($$PWD/../../commoninclude.pri)
QT += opengl widgets qml
+include($$PWD/doc/doc.pri)
+
qtHaveModule(multimedia) {
DEFINES += PLATFORM_HAS_QT_MULTIMEDIA_LIB
QT += multimedia
diff --git a/src/api/studio3dqml/plugins.qmltypes b/src/api/studio3dqml/plugins.qmltypes
new file mode 100644
index 0000000..bb8f052
--- /dev/null
+++ b/src/api/studio3dqml/plugins.qmltypes
@@ -0,0 +1,438 @@
+import QtQuick.tooling 1.2
+
+// This file describes the plugin-supplied types contained in the library.
+// It is used for QML tooling purposes only.
+//
+// This file was auto-generated by:
+// 'qmlplugindump -nonrelocatable QtStudio3D.OpenGL 2.4'
+
+Module {
+ dependencies: ["QtQuick 2.12"]
+ Component {
+ name: "Q3DSDataInput"
+ prototype: "QObject"
+ exports: ["QtStudio3D.OpenGL/DataInput 2.4"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "name"; type: "string" }
+ Property { name: "value"; type: "QVariant" }
+ Property { name: "max"; type: "float"; isReadonly: true }
+ Property { name: "min"; type: "float"; isReadonly: true }
+ Property { name: "metadataKeys"; type: "QStringList"; isReadonly: true }
+ Method {
+ name: "setName"
+ Parameter { name: "name"; type: "string" }
+ }
+ Method {
+ name: "setValue"
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ Method {
+ name: "metadata"
+ type: "string"
+ Parameter { name: "key"; type: "string" }
+ }
+ }
+ Component {
+ name: "Q3DSDataOutput"
+ prototype: "QObject"
+ exports: ["QtStudio3D.OpenGL/DataOutput 2.4"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "name"; type: "string" }
+ Property { name: "value"; type: "QVariant"; isReadonly: true }
+ Signal {
+ name: "nameChanged"
+ Parameter { name: "newName"; type: "string" }
+ }
+ Signal {
+ name: "valueChanged"
+ Parameter { name: "newValue"; type: "QVariant" }
+ }
+ Method {
+ name: "setName"
+ Parameter { name: "name"; type: "string" }
+ }
+ }
+ Component {
+ name: "Q3DSElement"
+ prototype: "QObject"
+ exports: ["QtStudio3D.OpenGL/Element 2.4"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "elementPath"; type: "string" }
+ Signal {
+ name: "elementPathChanged"
+ Parameter { name: "elementPath"; type: "string" }
+ }
+ Method {
+ name: "setElementPath"
+ Parameter { name: "elementPath"; type: "string" }
+ }
+ Method {
+ name: "setAttribute"
+ Parameter { name: "attributeName"; type: "string" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ Method {
+ name: "fireEvent"
+ Parameter { name: "eventName"; type: "string" }
+ }
+ }
+ Component {
+ name: "Q3DSPresentation"
+ prototype: "QObject"
+ Property { name: "source"; type: "QUrl" }
+ Property { name: "variantList"; type: "QStringList" }
+ Property { name: "delayedLoading"; type: "bool" }
+ Property { name: "createdElements"; type: "QStringList"; isReadonly: true }
+ Property { name: "createdMaterials"; type: "QStringList"; isReadonly: true }
+ Property { name: "createdMeshes"; type: "QStringList"; isReadonly: true }
+ Signal {
+ name: "variantListChanged"
+ Parameter { name: "variantList"; type: "QStringList" }
+ }
+ Signal {
+ name: "sourceChanged"
+ Parameter { name: "source"; type: "QUrl" }
+ }
+ Signal {
+ name: "slideEntered"
+ Parameter { name: "elementPath"; type: "string" }
+ Parameter { name: "index"; type: "uint" }
+ Parameter { name: "name"; type: "string" }
+ }
+ Signal {
+ name: "slideExited"
+ Parameter { name: "elementPath"; type: "string" }
+ Parameter { name: "index"; type: "uint" }
+ Parameter { name: "name"; type: "string" }
+ }
+ Signal { name: "dataInputsReady" }
+ Signal { name: "dataOutputsReady" }
+ Signal {
+ name: "customSignalEmitted"
+ Parameter { name: "elementPath"; type: "string" }
+ Parameter { name: "name"; type: "string" }
+ }
+ Signal {
+ name: "delayedLoadingChanged"
+ Parameter { name: "enable"; type: "bool" }
+ }
+ Signal {
+ name: "elementsCreated"
+ Parameter { name: "elementPaths"; type: "QStringList" }
+ Parameter { name: "error"; type: "string" }
+ }
+ Signal {
+ name: "materialsCreated"
+ Parameter { name: "materialNames"; type: "QStringList" }
+ Parameter { name: "error"; type: "string" }
+ }
+ Signal {
+ name: "meshesCreated"
+ Parameter { name: "meshNames"; type: "QStringList" }
+ Parameter { name: "error"; type: "string" }
+ }
+ Method {
+ name: "setSource"
+ Parameter { name: "source"; type: "QUrl" }
+ }
+ Method {
+ name: "setVariantList"
+ Parameter { name: "variantList"; type: "QStringList" }
+ }
+ Method {
+ name: "goToSlide"
+ Parameter { name: "elementPath"; type: "string" }
+ Parameter { name: "index"; type: "uint" }
+ }
+ Method {
+ name: "goToSlide"
+ Parameter { name: "elementPath"; type: "string" }
+ Parameter { name: "name"; type: "string" }
+ }
+ Method {
+ name: "goToSlide"
+ Parameter { name: "elementPath"; type: "string" }
+ Parameter { name: "next"; type: "bool" }
+ Parameter { name: "wrap"; type: "bool" }
+ }
+ Method {
+ name: "goToTime"
+ Parameter { name: "elementPath"; type: "string" }
+ Parameter { name: "time"; type: "float" }
+ }
+ Method {
+ name: "setAttribute"
+ Parameter { name: "elementPath"; type: "string" }
+ Parameter { name: "attributeName"; type: "string" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ Method {
+ name: "setPresentationActive"
+ Parameter { name: "id"; type: "string" }
+ Parameter { name: "active"; type: "bool" }
+ }
+ Method {
+ name: "fireEvent"
+ Parameter { name: "elementPath"; type: "string" }
+ Parameter { name: "eventName"; type: "string" }
+ }
+ Method {
+ name: "setGlobalAnimationTime"
+ Parameter { name: "milliseconds"; type: "qlonglong" }
+ }
+ Method {
+ name: "setDataInputValue"
+ Parameter { name: "name"; type: "string" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "valueRole"; type: "Q3DSDataInput::ValueRole" }
+ }
+ Method {
+ name: "setDataInputValue"
+ Parameter { name: "name"; type: "string" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ Method { name: "getDataInputs"; type: "QVariantList" }
+ Method {
+ name: "getDataInputs"
+ type: "QVariantList"
+ Parameter { name: "metadataKey"; type: "string" }
+ }
+ Method { name: "getDataOutputs"; type: "QVariantList" }
+ Method {
+ name: "preloadSlide"
+ Parameter { name: "elementPath"; type: "string" }
+ }
+ Method {
+ name: "unloadSlide"
+ Parameter { name: "elementPath"; type: "string" }
+ }
+ }
+ Component {
+ name: "Q3DSPresentationItem"
+ defaultProperty: "qmlChildren"
+ prototype: "Q3DSPresentation"
+ exports: ["QtStudio3D.OpenGL/Presentation 2.4"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "qmlChildren"; type: "QObject"; isList: true; isReadonly: true }
+ Method {
+ name: "appendQmlChildren"
+ Parameter { name: "list"; type: "QObject"; isList: true; isPointer: true }
+ Parameter { name: "obj"; type: "QObject"; isPointer: true }
+ }
+ }
+ Component {
+ name: "Q3DSQmlStream"
+ defaultProperty: "item"
+ prototype: "QObject"
+ exports: ["QtStudio3D.OpenGL/QmlStream 2.4"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "presentationId"; type: "string" }
+ Property { name: "item"; type: "QQuickItem"; isPointer: true }
+ Signal {
+ name: "presentationIdChanged"
+ Parameter { name: "presentationId"; type: "string" }
+ }
+ Signal {
+ name: "itemChanged"
+ Parameter { name: "item"; type: "QQuickItem"; isPointer: true }
+ }
+ Method {
+ name: "setPresentationId"
+ Parameter { name: "presentationId"; type: "string" }
+ }
+ Method {
+ name: "setItem"
+ Parameter { name: "item"; type: "QQuickItem"; isPointer: true }
+ }
+ }
+ Component {
+ name: "Q3DSSceneElement"
+ prototype: "Q3DSElement"
+ exports: ["QtStudio3D.OpenGL/SceneElement 2.4"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "currentSlideIndex"; type: "int" }
+ Property { name: "previousSlideIndex"; type: "int"; isReadonly: true }
+ Property { name: "currentSlideName"; type: "string" }
+ Property { name: "previousSlideName"; type: "string"; isReadonly: true }
+ Signal {
+ name: "currentSlideIndexChanged"
+ Parameter { name: "currentSlideIndex"; type: "int" }
+ }
+ Signal {
+ name: "previousSlideIndexChanged"
+ Parameter { name: "previousSlideIndex"; type: "int" }
+ }
+ Signal {
+ name: "currentSlideNameChanged"
+ Parameter { name: "currentSlideName"; type: "string" }
+ }
+ Signal {
+ name: "previousSlideNameChanged"
+ Parameter { name: "previousSlideName"; type: "string" }
+ }
+ Method {
+ name: "setCurrentSlideIndex"
+ Parameter { name: "currentSlideIndex"; type: "int" }
+ }
+ Method {
+ name: "setCurrentSlideName"
+ Parameter { name: "currentSlideName"; type: "string" }
+ }
+ Method {
+ name: "goToSlide"
+ Parameter { name: "next"; type: "bool" }
+ Parameter { name: "wrap"; type: "bool" }
+ }
+ Method {
+ name: "goToTime"
+ Parameter { name: "time"; type: "float" }
+ }
+ }
+ Component {
+ name: "Q3DSStudio3D"
+ defaultProperty: "data"
+ prototype: "QQuickFramebufferObject"
+ exports: ["QtStudio3D.OpenGL/Studio3D 2.4"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "EventIgnoreFlags"
+ values: {
+ "EnableAllEvents": 0,
+ "IgnoreMouseEvents": 1,
+ "IgnoreWheelEvents": 2,
+ "IgnoreKeyboardEvents": 4,
+ "IgnoreAllInputEvents": 7
+ }
+ }
+ Property { name: "running"; type: "bool"; isReadonly: true }
+ Property { name: "presentation"; type: "Q3DSPresentationItem"; isReadonly: true; isPointer: true }
+ Property { name: "viewerSettings"; type: "Q3DSViewerSettings"; isReadonly: true; isPointer: true }
+ Property { name: "error"; type: "string"; isReadonly: true }
+ Property { name: "ignoredEvents"; type: "EventIgnoreFlags" }
+ Signal { name: "frameUpdate" }
+ Signal {
+ name: "runningChanged"
+ Parameter { name: "initialized"; type: "bool" }
+ }
+ Signal {
+ name: "errorChanged"
+ Parameter { name: "error"; type: "string" }
+ }
+ Signal { name: "presentationReady" }
+ Signal { name: "presentationLoaded" }
+ Method { name: "reset" }
+ }
+ Component {
+ name: "Q3DSSubPresentationSettings"
+ prototype: "QObject"
+ exports: ["QtStudio3D.OpenGL/SubPresentationSettings 2.4"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "qmlStreams"; type: "Q3DSQmlStream"; isList: true; isReadonly: true }
+ }
+ Component {
+ name: "Q3DSViewerSettings"
+ prototype: "QObject"
+ exports: ["QtStudio3D.OpenGL/ViewerSettings 2.4"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "ShadeMode"
+ values: {
+ "ShadeModeShaded": 0,
+ "ShadeModeShadedWireframe": 1
+ }
+ }
+ Enum {
+ name: "ScaleMode"
+ values: {
+ "ScaleModeFit": 0,
+ "ScaleModeFill": 1,
+ "ScaleModeCenter": 2
+ }
+ }
+ Property { name: "matteEnabled"; type: "bool" }
+ Property { name: "matteColor"; type: "QColor" }
+ Property { name: "showRenderStats"; type: "bool" }
+ Property { name: "scaleMode"; type: "ScaleMode" }
+ Signal {
+ name: "matteEnabledChanged"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Signal {
+ name: "matteColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "showRenderStatsChanged"
+ Parameter { name: "show"; type: "bool" }
+ }
+ Signal {
+ name: "shadeModeChanged"
+ Parameter { name: "mode"; type: "ShadeMode" }
+ }
+ Signal {
+ name: "scaleModeChanged"
+ Parameter { name: "mode"; type: "ScaleMode" }
+ }
+ Method {
+ name: "setMatteEnabled"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Method {
+ name: "setMatteColor"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Method {
+ name: "setShowRenderStats"
+ Parameter { name: "show"; type: "bool" }
+ }
+ Method {
+ name: "setScaleMode"
+ Parameter { name: "mode"; type: "ScaleMode" }
+ }
+ Method {
+ name: "save"
+ Parameter { name: "group"; type: "string" }
+ Parameter { name: "organization"; type: "string" }
+ Parameter { name: "application"; type: "string" }
+ }
+ Method {
+ name: "save"
+ Parameter { name: "group"; type: "string" }
+ Parameter { name: "organization"; type: "string" }
+ }
+ Method {
+ name: "save"
+ Parameter { name: "group"; type: "string" }
+ }
+ Method {
+ name: "load"
+ Parameter { name: "group"; type: "string" }
+ Parameter { name: "organization"; type: "string" }
+ Parameter { name: "application"; type: "string" }
+ }
+ Method {
+ name: "load"
+ Parameter { name: "group"; type: "string" }
+ Parameter { name: "organization"; type: "string" }
+ }
+ Method {
+ name: "load"
+ Parameter { name: "group"; type: "string" }
+ }
+ }
+ Component {
+ name: "QQuickFramebufferObject"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ Property { name: "textureFollowsItemSize"; type: "bool" }
+ Property { name: "mirrorVertically"; type: "bool" }
+ Signal {
+ name: "textureFollowsItemSizeChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "mirrorVerticallyChanged"
+ Parameter { type: "bool" }
+ }
+ }
+}
diff --git a/src/api/studio3dqml/q3dspresentationitem.cpp b/src/api/studio3dqml/q3dspresentationitem.cpp
index 6372f2f..4eb7c96 100644
--- a/src/api/studio3dqml/q3dspresentationitem.cpp
+++ b/src/api/studio3dqml/q3dspresentationitem.cpp
@@ -37,50 +37,6 @@
QT_BEGIN_NAMESPACE
-/*!
- \qmltype Presentation
- \instantiates Q3DSPresentationItem
- \inqmlmodule QtStudio3D
- \ingroup OpenGLRuntime
- \inherits Q3DSPresentation
- \keyword Studio3D
-
- \brief Represents a Qt 3D Studio presentation.
-
- This item provides properties and methods for controlling a
- presentation.
-
- Qt 3D Studio supports multiple presentations in one project. There
- is always a main presentation and zero or more
- sub-presentations. The sub-presentations are composed into the
- main presentations either as contents of Qt 3D Studio layers or as
- texture maps.
-
- In the filesystem each presentation corresponds to one \c{.uip}
- presentation file. When present, the \c{.uia} project file ties
- these together by specifying a name for each of the
- (sub-)presentations and specifies which one is the main one.
-
- The \c{.uia} project also defines \l{DataInput}s and
- \l{DataOutput}s that are exported by the presentations.
- \l{DataInput}s provide a way to provide input to the presentation
- to e.g. control a timeline of a subpresentation from code.
- \l{DataOutput}s provide a way to get notified when an attribute
- is changed in the presentation by animation timeline,
- by behavior scripts or by a \l{DataInput}.
-
- The Presentation type handles child objects of the types \l Element, \l
- SceneElement, \l DataInput, and \l SubPresentationSettings specially. These
- will get automatically associated with the presentation and can control
- certain aspects of it from that point on.
-
- From the API point of view Presentation corresponds to the
- main presentation. The source property can refer either to a
- \c{.uia} or \c{.uip} file. When specifying a file with \c{.uip}
- extension and a \c{.uia} is present with the same name, the
- \c{.uia} is loaded automatically and thus sub-presentation
- information is available regardless.
- */
Q3DSPresentationItem::Q3DSPresentationItem(QObject *parent)
: Q3DSPresentation(parent)
, m_subPresentationSettings(nullptr)
diff --git a/src/api/studio3dqml/q3dsrenderer.cpp b/src/api/studio3dqml/q3dsrenderer.cpp
index 7366d6a..e3fce5c 100644
--- a/src/api/studio3dqml/q3dsrenderer.cpp
+++ b/src/api/studio3dqml/q3dsrenderer.cpp
@@ -48,7 +48,8 @@ using namespace Q3DSViewer;
QT_BEGIN_NAMESPACE
-Q3DSRenderer::Q3DSRenderer(bool visibleFlag, qt3ds::Qt3DSAssetVisitor *assetVisitor)
+Q3DSRenderer::Q3DSRenderer(bool visibleFlag, qt3ds::Qt3DSAssetVisitor *assetVisitor,
+ QElapsedTimer *startupTimer)
: m_visibleFlag(visibleFlag)
, m_initElements(false)
, m_runtime(0)
@@ -58,8 +59,9 @@ Q3DSRenderer::Q3DSRenderer(bool visibleFlag, qt3ds::Qt3DSAssetVisitor *assetVisi
, m_visitor(assetVisitor)
, m_settings(new Q3DSViewerSettings(this))
, m_presentation(new Q3DSPresentation(this))
+ , m_startupTimer(startupTimer)
{
- m_startupTimer.start();
+
}
Q3DSRenderer::~Q3DSRenderer()
@@ -170,7 +172,7 @@ void Q3DSRenderer::draw()
bool Q3DSRenderer::initializeRuntime(QOpenGLFramebufferObject *inFbo)
{
- m_runtime = &Q3DSViewerApp::Create(nullptr, new Qt3DSAudioPlayerImpl(), &m_startupTimer);
+ m_runtime = &Q3DSViewerApp::Create(nullptr, new Qt3DSAudioPlayerImpl(), m_startupTimer);
Q_ASSERT(m_runtime);
// Connect presentation ready signal before initializing the app
@@ -286,6 +288,8 @@ void Q3DSRenderer::processCommands()
m_settings->setShowRenderStats(m_commands.m_showRenderStats);
if (m_commands.m_delayedLoadingChanged)
this->m_runtime->setDelayedLoading(m_commands.m_delayedLoading);
+ if (m_commands.m_matteEnabledChanged)
+ this->m_runtime->setMatteEnabled(m_commands.m_matteEnabled);
if (m_commands.m_globalAnimationTimeChanged)
m_presentation->setGlobalAnimationTime(m_commands.m_globalAnimationTime);
diff --git a/src/api/studio3dqml/q3dsrenderer_p.h b/src/api/studio3dqml/q3dsrenderer_p.h
index 6d044ff..8927f34 100644
--- a/src/api/studio3dqml/q3dsrenderer_p.h
+++ b/src/api/studio3dqml/q3dsrenderer_p.h
@@ -59,7 +59,8 @@ class Q3DSRenderer : public QObject,
Q_OBJECT
public:
- Q3DSRenderer(bool visibleFlag, qt3ds::Qt3DSAssetVisitor *assetVisitor);
+ Q3DSRenderer(bool visibleFlag, qt3ds::Qt3DSAssetVisitor *assetVisitor,
+ QElapsedTimer *startupTimer);
~Q3DSRenderer();
QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) override;
@@ -102,7 +103,7 @@ protected:
Q3DSViewerSettings *m_settings;
Q3DSPresentation *m_presentation;
QString m_error;
- QElapsedTimer m_startupTimer;
+ QElapsedTimer *m_startupTimer;
};
QT_END_NAMESPACE
diff --git a/src/api/studio3dqml/q3dsstudio3d.cpp b/src/api/studio3dqml/q3dsstudio3d.cpp
index 5a46089..38d32d4 100644
--- a/src/api/studio3dqml/q3dsstudio3d.cpp
+++ b/src/api/studio3dqml/q3dsstudio3d.cpp
@@ -40,13 +40,14 @@
#include <QtCore/qdebug.h>
#include <QtCore/qfileinfo.h>
#include <QtQuick/qquickwindow.h>
+#include <QtQml/qqmlcontext.h>
QT_BEGIN_NAMESPACE
/*!
\qmltype Studio3D
\instantiates Q3DSStudio3D
- \inqmlmodule QtStudio3D
+ \inqmlmodule QtStudio3D.OpenGL
\ingroup OpenGLRuntime
\inherits Item
\keyword Studio3D
@@ -151,6 +152,8 @@ Q3DSStudio3D::Q3DSStudio3D()
connect(this, &Q3DSStudio3D::visibleChanged, this, &Q3DSStudio3D::handleVisibleChanged);
updateEventMasks();
+ m_startupTimer.reset(new QElapsedTimer());
+ m_startupTimer->restart();
}
Q3DSStudio3D::~Q3DSStudio3D()
@@ -171,10 +174,13 @@ Q3DSPresentationItem *Q3DSStudio3D::presentation() const
return m_presentation;
}
-// #TODO: QT3DS-3566 viewerSettings is missing documentation
/*!
\qmlproperty ViewerSettings Studio3D::viewerSettings
+ Accessor for the viewerSettings. Applications are expected to create a single
+ ViewerSettings child object for Studio3D. If this is omitted, ViewerSettings
+ is created automatically.
+
This property is read-only.
*/
Q3DSViewerSettings *Q3DSStudio3D::viewerSettings() const
@@ -271,7 +277,12 @@ void Q3DSStudio3D::componentComplete()
m_presentation->d_ptr->setCommandQueue(&m_pendingCommands);
// Ensure qml stream proxy gets created on main thread
- m_presentation->d_ptr->streamProxy();
+ QQmlContext *ctx = QQmlEngine::contextForObject(this);
+ m_presentation->d_ptr->streamProxy()->setEngine(ctx->engine());
+
+ QObject::connect(m_presentation, &Q3DSPresentationItem::sourceChanged, [this]() {
+ m_startupTimer->restart();
+ });
QQuickFramebufferObject::componentComplete();
}
@@ -291,6 +302,8 @@ void Q3DSStudio3D::handleWindowChanged(QQuickWindow *window)
connect(window, &QQuickWindow::afterAnimating, this, &Q3DSStudio3D::tick);
// Call update after the frame is handled to queue another frame
connect(window, &QQuickWindow::afterSynchronizing, this, &Q3DSStudio3D::update);
+
+ reset();
}
/*!
@@ -310,9 +323,9 @@ void Q3DSStudio3D::reset()
{
// Fake a source change to trigger a reloading of the presentation
m_pendingCommands.m_sourceChanged = true;
- m_pendingCommands.m_source = m_presentation->source();
+ m_pendingCommands.m_source = m_presentation ? m_presentation->source() : QString();
m_pendingCommands.m_variantListChanged = true;
- m_pendingCommands.m_variantList = m_presentation->variantList();
+ m_pendingCommands.m_variantList = m_presentation ? m_presentation->variantList() : QStringList();
}
/*!
@@ -366,7 +379,8 @@ QQuickFramebufferObject::Renderer *Q3DSStudio3D::createRenderer() const
// It is "illegal" to create a connection between the renderer
// and the plugin, and vice-versa. The only valid time the two
// may communicate is during Q3DSRenderer::synchronize().
- Q3DSRenderer *renderer = new Q3DSRenderer(isVisible(), m_presentation->d_ptr->streamProxy());
+ Q3DSRenderer *renderer = new Q3DSRenderer(isVisible(), m_presentation->d_ptr->streamProxy(),
+ m_startupTimer.get());
connect(renderer, &Q3DSRenderer::enterSlide,
m_presentation->d_ptr, &Q3DSPresentationPrivate::handleSlideEntered);
diff --git a/src/api/studio3dqml/q3dsstudio3d_p.h b/src/api/studio3dqml/q3dsstudio3d_p.h
index eed8459..0fa91d6 100644
--- a/src/api/studio3dqml/q3dsstudio3d_p.h
+++ b/src/api/studio3dqml/q3dsstudio3d_p.h
@@ -45,6 +45,7 @@
#include <QtStudio3D/private/q3dscommandqueue_p.h>
#include <QtGui/qopenglframebufferobject.h>
#include <QtQuick/qquickframebufferobject.h>
+#include <QtCore/qelapsedtimer.h>
QT_BEGIN_NAMESPACE
@@ -128,6 +129,7 @@ protected:
CommandQueue m_pendingCommands;
qreal m_pixelRatio;
QString m_error;
+ QScopedPointer<QElapsedTimer> m_startupTimer;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(Q3DSStudio3D::EventIgnoreFlags)