summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2019-05-16 15:13:34 +0200
committerPaul Wicking <paul.wicking@qt.io>2019-06-07 13:45:54 +0000
commit614eddc31186a05bc37cfcb071caf9851ac1d010 (patch)
tree4d3f4b5a355857b60e2a2244e4a1205e4e639adb
parentad305807bd7005084ca8cadb281b6735651c9b02 (diff)
Doc: Extend Qt3D documentation
This change adds missing C++ and/or QML documentation for: * enum QBuffer::AccessType * QBuffer::accessType() * QBuffer::dataAvailable() * ForwardRenderer::externalRenderTargetSize * enumeration Qt3D.Render.Light::type * Qt3D.Render.Light::color * Qt3D.Render.Light::intensity Fixes: QTBUG-73071 Change-Id: I48b13cb8001558b20bd801b6f96f5b5933144d82 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/extras/defaults/qforwardrenderer.cpp9
-rw-r--r--src/render/geometry/qbuffer.cpp24
-rw-r--r--src/render/lights/qabstractlight.cpp25
3 files changed, 56 insertions, 2 deletions
diff --git a/src/extras/defaults/qforwardrenderer.cpp b/src/extras/defaults/qforwardrenderer.cpp
index 7548c45c6..5bf206ede 100644
--- a/src/extras/defaults/qforwardrenderer.cpp
+++ b/src/extras/defaults/qforwardrenderer.cpp
@@ -280,11 +280,18 @@ QObject *QForwardRenderer::surface() const
}
/*!
+ \qmlproperty QSize ForwardRenderer::externalRenderTargetSize
+
+ Contains the size of the external render target. External render
+ targets are relevant when rendering does not target a window
+ surface (as set in \l {surface}).
+*/
+/*!
\property QForwardRenderer::externalRenderTargetSize
Contains the size of the external render target. External render
targets are relevant when rendering does not target a window
- surface (as set in \l {QForwardRenderer::surface()}{surface()}).
+ surface (as set in \l {surface}).
*/
QSize QForwardRenderer::externalRenderTargetSize() const
{
diff --git a/src/render/geometry/qbuffer.cpp b/src/render/geometry/qbuffer.cpp
index fe065929d..e0574a4c5 100644
--- a/src/render/geometry/qbuffer.cpp
+++ b/src/render/geometry/qbuffer.cpp
@@ -117,6 +117,12 @@ QBufferPrivate::QBufferPrivate()
*/
/*!
+ * \fn void Qt3DRender::QBuffer::dataAvailable()
+ *
+ * This signal is emitted when data becomes available.
+ */
+
+/*!
\class Qt3DRender::QBufferDataGenerator
\inmodule Qt3DRender
@@ -252,6 +258,17 @@ QBufferPrivate::QBufferPrivate()
*/
/*!
+ * \enum QBuffer::AccessType
+ *
+ * \value Write
+ * Write access
+ * \value Read
+ * Read access
+ * \value ReadWrite
+ * Write|Read
+ */
+
+/*!
* \typedef Qt3DRender::QBufferDataGeneratorPtr
* \relates Qt3DRender::QBuffer
*/
@@ -443,6 +460,13 @@ bool QBuffer::isSyncData() const
return d->m_syncData;
}
+/*!
+ * \property Qt3DRender::QBuffer::accessType
+ *
+ * Returns the \l {QBuffer::}{AccessType} of the buffer.
+ *
+ * \sa QBuffer::AccessType
+ */
QBuffer::AccessType QBuffer::accessType() const
{
Q_D(const QBuffer);
diff --git a/src/render/lights/qabstractlight.cpp b/src/render/lights/qabstractlight.cpp
index e5376f712..5ad16d3b4 100644
--- a/src/render/lights/qabstractlight.cpp
+++ b/src/render/lights/qabstractlight.cpp
@@ -67,9 +67,22 @@ QAbstractLightPrivate::~QAbstractLightPrivate()
}
/*!
+ \qmlproperty enumeration Qt3D.Render::Light::type
+ \readonly
+
+ Holds the particular type of light.
+
+ \value Light.PointLight
+ A point light
+ \value Light.DirectionalLight
+ A directional light
+ \value Light.SpotLight
+ a spot light
+*/
+/*!
\property Qt3DRender::QAbstractLight::type
- Contains the type of light.
+ The type of light.
*/
/*!
\enum Qt3DRender::QAbstractLight::Type
@@ -118,6 +131,11 @@ QAbstractLight::Type QAbstractLight::type() const
}
/*!
+ * \qmlproperty QColor Qt3D.Render.Light::color
+ *
+ * Holds the current Light color.
+ */
+/*!
* \property Qt3DRender::QAbstractLight::color
*
* Holds the current QAbstractLight color.
@@ -138,6 +156,11 @@ void QAbstractLight::setColor(const QColor &c)
}
/*!
+ \qmlproperty float Qt3D.Render.Light::intensity
+
+ Holds the current Light intensity.
+*/
+/*!
\property Qt3DRender::QAbstractLight::intensity
Holds the current QAbstractLight intensity.