From d8cd4b289f5907eb164139037d26390dd41e4e22 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 11 May 2015 14:30:00 +0200 Subject: Doc: Add Qt3D QML and C++ skeleton comments for qdoc Add documentation structure and qdoc comments for \class, \qmltype, \property, and \qmlproperty, etc, for the Qt3DRender C++ and QML modules. The actual documentation (descriptions) are still missing, but this allows the QML type documentation to be generated and reduces the qdoc error count. Change-Id: I9e96241f07ca2388f1a8cc2a3677fa6d02a2404d Task-number: QTBUG-46037 Reviewed-by: Martin Smith --- src/render/doc/src/qt3drender-module.qdoc | 14 +++ .../frontend/framegraph-components/qframegraph.cpp | 52 ++++++--- .../framegraph-components/qframegraphnode.cpp | 44 ++++++-- .../framegraph-components/qlayerfilter.cpp | 33 ++++++ src/render/frontend/qabstracttextureimage.cpp | 55 +++++++++- src/render/frontend/qannotation.cpp | 40 +++++++ src/render/frontend/qblendstate.cpp | 106 +++++++++++++++++++ src/render/frontend/qlayer.cpp | 34 ++++++ src/render/frontend/qopenglfilter.cpp | 116 +++++++++++++++++++++ src/render/frontend/qparametermapping.cpp | 68 ++++++++++++ src/render/frontend/qpointlight.cpp | 51 ++++++--- src/render/frontend/qspotlight.cpp | 82 +++++++++++---- src/render/frontend/qtextureimage.cpp | 33 +++++- 13 files changed, 663 insertions(+), 65 deletions(-) diff --git a/src/render/doc/src/qt3drender-module.qdoc b/src/render/doc/src/qt3drender-module.qdoc index 37de124f1..1deb4bff8 100644 --- a/src/render/doc/src/qt3drender-module.qdoc +++ b/src/render/doc/src/qt3drender-module.qdoc @@ -47,3 +47,17 @@ Classes, types, and functions are declared under the \l [Qt3DCore]{Qt3D} namespace. */ + +/*! + \qmlmodule Qt3D.Render 2.0 + \title Qt3D Render QML Types + \ingroup qmlmodules + + \brief Provides Qt3D QML types for rendering. + + To import and use the module's QML types, use the following statement: + + \badcode + import Qt3D.Render 2.0 + \endcode +*/ diff --git a/src/render/frontend/framegraph-components/qframegraph.cpp b/src/render/frontend/framegraph-components/qframegraph.cpp index 67774808e..754e90ed3 100644 --- a/src/render/frontend/framegraph-components/qframegraph.cpp +++ b/src/render/frontend/framegraph-components/qframegraph.cpp @@ -55,6 +55,33 @@ QFrameGraphPrivate::QFrameGraphPrivate() } +/*! + \class FrameGraph + \inmodule Qt3DRender + \since 5.3 + + \brief Defines the rendering method to be used by the renderer + + FrameGraph is the Component that has an activeFrameGraph property + that should reference the root FrameGraphItem of a frame graph + tree. The Entity that contains a FrameGraph property defines the + rendering method to be used by the renderer. + + \note Only one FrameGraph can be active at any moment. + */ + +/*! + \qmltype FrameGraph + \instantiates Qt3D::QFrameGraph + \inherits Component3D + \inqmlmodule Qt3D.Render + \since 5.5 + \brief For OpenGL ... +*/ + +/*! \fn void Qt3D::QFrameGraph::copy(const QNode *ref) + Copies the \a ref instance into this one. + */ void QFrameGraph::copy(const QNode *ref) { QComponent::copy(ref); @@ -63,18 +90,9 @@ void QFrameGraph::copy(const QNode *ref) } /*! - * \class Qt3D::FrameGraph - * - * \brief Component that has an activeFrameGraph property that should - * reference the root FrameGraphItem of a frame graph tree. The Entity - * that contains a FrameGraph property defines the rendering method to - * be used by the renderer. - * - * Note that only a single FrameGraph can be active at any moment. - * - * \since 5.3 + \fn Qt3D::QFrameGraph::QFrameGraph(QNode *parent) + Constructs a new QFrameGraph with the specified \a parent. */ - QFrameGraph::QFrameGraph(QNode *parent) : QComponent(*new QFrameGraphPrivate, parent) { @@ -87,9 +105,15 @@ QFrameGraph::QFrameGraph(QFrameGraphPrivate &dd, QNode *parent) } /*! - * \property Qt3D::QFrameGraph::activeFrameGraph - * - * Holds the current activeFrameGraph root node. + \qmlproperty Qt3D.Render::FrameGraphNode Qt3D.Render::FrameGraph::activeFrameGraph + + Holds the current activeFrameGraph root node. +*/ + +/*! + \property Qt3D::QFrameGraph::activeFrameGraph + + Holds the current activeFrameGraph root node. */ QFrameGraphNode *QFrameGraph::activeFrameGraph() const { diff --git a/src/render/frontend/framegraph-components/qframegraphnode.cpp b/src/render/frontend/framegraph-components/qframegraphnode.cpp index edf4c127e..2f81b786e 100644 --- a/src/render/frontend/framegraph-components/qframegraphnode.cpp +++ b/src/render/frontend/framegraph-components/qframegraphnode.cpp @@ -37,17 +37,6 @@ #include "qframegraphnode.h" #include "qframegraphnode_p.h" -/*! - * \class Qt3D::FrameGraphNode - * - * \brief Base class of all FrameGraph configuration nodes. - * - * This is an abstract class so it cannot be instanced directly - * but rather through one of its subclasses. - * - * \since 5.3 - */ - QT_BEGIN_NAMESPACE namespace Qt3D { @@ -62,11 +51,38 @@ QFrameGraphNodePrivate::QFrameGraphNodePrivate() { } +/*! + \class QFrameGraphNode + \inmodule Qt3DRender + \since 5.5 + + \brief Base class of all FrameGraph configuration nodes. + + This is an abstract class so it cannot be instanced directly + but rather through one of its subclasses. + + */ + +/*! + \qmltype FrameGraphNode + \inqmlmodule Qt3D.Render + \instantiates QFrameGraphNode + \inherits Node + \since 5.5 + \qmlabstract +*/ + +/*! + The constructor creates an instance with the specified \a parent. + */ QFrameGraphNode::QFrameGraphNode(QNode *parent) : QNode(*new QFrameGraphNodePrivate, parent) { } +/*! + Returns a pointer to the parent. + */ QFrameGraphNode *QFrameGraphNode::parentFrameGraphNode() const { QFrameGraphNode *parentFGNode = Q_NULLPTR; @@ -86,6 +102,12 @@ QFrameGraphNode::QFrameGraphNode(QFrameGraphNodePrivate &dd, QNode *parent) { } +/*! + \qmlproperty bool Qt3D.Render::FrameGraphNode::enabled + + Holds whether the frame graph node is enabled or disabled. +*/ + /*! \property Qt3D::QFrameGraphNode::enabled diff --git a/src/render/frontend/framegraph-components/qlayerfilter.cpp b/src/render/frontend/framegraph-components/qlayerfilter.cpp index 4039ac2f7..cfccfb987 100644 --- a/src/render/frontend/framegraph-components/qlayerfilter.cpp +++ b/src/render/frontend/framegraph-components/qlayerfilter.cpp @@ -51,6 +51,25 @@ QLayerFilterPrivate::QLayerFilterPrivate() { } +/*! + \class QLayerFilter + \inmodule Qt3DRender + \since 5.5 + \brief The QLayerFilter class provides ... +*/ + +/*! + \qmltype LayerFilter + \instantiates Qt3D::QLayerFilter + \inherits FrameGraphNode + \inqmlmodule Qt3D.Render + \since 5.5 + \brief For ... +*/ + +/*! \fn void Qt3D::QLayerFilter::copy(const QNode *ref) + Copies the \a ref instance into this one. + */ void QLayerFilter::copy(const QNode *ref) { QFrameGraphNode::copy(ref); @@ -58,6 +77,10 @@ void QLayerFilter::copy(const QNode *ref) d_func()->m_layers = layer->d_func()->m_layers; } + +/*! \fn Qt3D::QLayerFilter::QLayerFilter(QNode *parent) + Constructs a new QLayerFilter with the specified \a parent. + */ QLayerFilter::QLayerFilter(QNode *parent) : QFrameGraphNode(*new QLayerFilterPrivate, parent) { @@ -69,6 +92,16 @@ QLayerFilter::QLayerFilter(QLayerFilterPrivate &dd, QNode *parent) { } +/*! + \property Qt3D::QLayerFilter::layers + + */ + +/*! + \qmlproperty stringlist Qt3D.Render::LayerFilter::layers + +*/ + void QLayerFilter::setLayers(const QStringList &layers) { Q_D(QLayerFilter); diff --git a/src/render/frontend/qabstracttextureimage.cpp b/src/render/frontend/qabstracttextureimage.cpp index 5f5d04c6f..96d679df6 100644 --- a/src/render/frontend/qabstracttextureimage.cpp +++ b/src/render/frontend/qabstracttextureimage.cpp @@ -48,16 +48,27 @@ namespace Qt3D { */ /*! - \class Qt3D::QAbstractTextureImage + \qmltype AbstractTextureImage + \instantiates Qt3D::QAbstractTextureImage + \inherits Node + \inqmlmodule Qt3D.Render + \qmlabstract + \since 5.5 + \brief Encapsulates the necessary information to create an OpenGL texture image. +*/ + +/*! + \class QAbstractTextureImage + \inmodule Qt3DRender \since 5.5 \brief Encapsulates the necessary information to create an OpenGL texture image. - Qt3D::QAbstractTextureImage should be used as the mean of providing image data to a - Qt3D::QAbstractTextureProvider. It contains the necessary informations: mipmap + QAbstractTextureImage should be used as the means of providing image data to a + QAbstractTextureProvider. It contains the necessary information: mipmap level, layer, cube face load at the proper place data into an OpenGL texture. The actual data is provided through a QTextureDataFunctor that will be - executed by Aspect jobs in the backend. Qt3D::QAbstractTextureImage should be + executed by Aspect jobs in the backend. QAbstractTextureImage should be subclassed to provide a functor and eventual additional properties needed by the functor to load actual data. @@ -73,10 +84,20 @@ QAbstractTextureImage::QAbstractTextureImage(QNode *parent) { } +/*! + The destructor. + */ QAbstractTextureImage::~QAbstractTextureImage() { } + +/*! + \qmlproperty int Qt3D.render::AbstractTextureImage::mipmapLevel + + Holds the mipmap level of the texture image. + */ + /*! \property Qt3D::QAbstractTextureImage::mipmapLevel @@ -88,6 +109,12 @@ int QAbstractTextureImage::mipmapLevel() const return d->m_mipmapLevel; } +/*! + \qmlproperty int Qt3D.Render::AbstractTextureImage::layer + + Holds the layer of the texture image. + */ + /*! \property Qt3D::QAbstractTextureImage::layer @@ -99,6 +126,23 @@ int QAbstractTextureImage::layer() const return d->m_layer; } +/*! + \qmlproperty enumeration Qt3D.Render::AbstractTextureImage::cubeMapFace + + Holds the cube map face of the texture image. + + \value CubeMapPositiveX 0x8515 GL_TEXTURE_CUBE_MAP_POSITIVE_X + \value CubeMapNegativeX 0x8516 GL_TEXTURE_CUBE_MAP_NEGATIVE_X + \value CubeMapPositiveY 0x8517 GL_TEXTURE_CUBE_MAP_POSITIVE_Y + \value CubeMapNegativeY 0x8518 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y + \value CubeMapPositiveZ 0x8519 GL_TEXTURE_CUBE_MAP_POSITIVE_Z + \value CubeMapNegativeZ 0x851A GL_TEXTURE_CUBE_MAP_NEGATIVE_Z + + \note The cube map face has a meaning only for + \l {QAbstractTextureProvider::}{TargetCubeMap} and + \l {QAbstractTextureProvider::}{TargetCubeMapArray}. + */ + /*! \property Qt3D::QAbstractTextureImage::cubeMapFace @@ -155,6 +199,9 @@ void QAbstractTextureImage::update() } } +/*! + Copies \a ref into this object. + */ void QAbstractTextureImage::copy(const QNode *ref) { const QAbstractTextureImage *imageRef = static_cast(ref); diff --git a/src/render/frontend/qannotation.cpp b/src/render/frontend/qannotation.cpp index fb56772f5..0476e1d6a 100644 --- a/src/render/frontend/qannotation.cpp +++ b/src/render/frontend/qannotation.cpp @@ -53,6 +53,25 @@ QAnnotationPrivate::QAnnotationPrivate() { } +/*! + \class QAnnotation + \inmodule Qt3DRender + \since 5.5 + \brief The QAnnotation class provides ... +*/ + +/*! + \qmltype Annotation + \instantiates Qt3D::QAnnotation + \inherits Node + \inqmlmodule Qt3D.Render + \since 5.5 + \brief For annotating ... +*/ + +/*! + Copies the annotation in \a ref into this annotation. + */ void QAnnotation::copy(const QNode *ref) { QNode::copy(ref); @@ -61,6 +80,9 @@ void QAnnotation::copy(const QNode *ref) d_func()->m_value = criterion->d_func()->m_value; } +/*! + The constructor creats a new annotation under \a parent. + */ QAnnotation::QAnnotation(QNode *parent) : QNode(*new QAnnotationPrivate, parent) { @@ -84,12 +106,30 @@ void QAnnotation::setName(const QString &name) } } +/*! + \property QAnnotation::value + +*/ + +/*! + \qmlproperty variant Qt3D.Render::Annotation::value +*/ + QVariant QAnnotation::value() const { Q_D(const QAnnotation); return d->m_value; } +/*! + \property QAnnotation::name + + */ + +/*! + \qmlproperty string Qt3D.Render::Annotation::name + */ + QString QAnnotation::name() const { Q_D(const QAnnotation); diff --git a/src/render/frontend/qblendstate.cpp b/src/render/frontend/qblendstate.cpp index 6f401d3e9..642ce03ab 100644 --- a/src/render/frontend/qblendstate.cpp +++ b/src/render/frontend/qblendstate.cpp @@ -64,11 +64,34 @@ public: QBlendState::Blending m_dstAlpha; }; +/*! + \class Qt3D::QBlendState + \inmodule Qt3DRender + \since 5.5 + \brief Encapsulates blending information. + */ + +/*! + \qmltype BlendState + \instantiates Qt3D::QBlendState + \inherits RenderState + \inqmlmodule Qt3D.Render + \since 5.5 + \brief Encapsulates blending information +*/ + +/*! + The constructor creates a new blend state object with the specified \a parent. + */ QBlendState::QBlendState(QNode *parent) : QRenderState(*new QBlendStatePrivate, parent) { } +/*! \fn void QBlendState::copy(const QNode *ref) + \internal + Copies \a ref into this object. + */ void QBlendState::copy(const QNode *ref) { QRenderState::copy(ref); @@ -79,11 +102,47 @@ void QBlendState::copy(const QNode *ref) d_func()->m_dstRGB = refState->d_func()->m_dstRGB; } +/*! + \internal +*/ QBlendState::QBlendState(QRenderState::Type type, QNode *parent) : QRenderState(*new QBlendStatePrivate(type), parent) { } +/*! + \enum Qt3D::QBlendState::Blending + + \value Zero 0 + \value One 1 + \value SrcColor 0x0300 + \value SrcAlpha 0x0302 + \value Src1Alpha + \value Src1Color + \value DstColor 0x0306 + \value DstAlpha 0x0304 + \value SrcAlphaSaturate 0x0308 + \value ConstantColor 0x8001 + \value ConstantAlpha 0x8003 + \value OneMinusSrcColor 0x0301 + \value OneMinusSrcAlpha 0x0303 + \value OneMinusDstAlpha 0x0305 + \value OneMinusDstColor 0x0307 + \value OneMinusConstantColor 0x8002 + \value OneMinusConstantAlpha 0x8004 + \value OneMinusSrc1Alpha + \value OneMinusSrc1Color0 +*/ + +/*! + \qmlproperty enumeration Qt3D.render::BlendState::srcRGB + + */ + +/*! + \property Qt3D::QBlendState::srcRGB + + */ QBlendState::Blending QBlendState::srcRGB() const { Q_D(const QBlendState); @@ -99,6 +158,15 @@ void QBlendState::setSrcRGB(QBlendState::Blending srcRGB) } } +/*! + \qmlproperty enumeration Qt3D.render::BlendState::dstRGB + + */ + +/*! + \property Qt3D::QBlendState::dstRGB + + */ QBlendState::Blending QBlendState::dstRGB() const { Q_D(const QBlendState); @@ -114,6 +182,15 @@ void QBlendState::setDstRGB(QBlendState::Blending dstRGB) } } +/*! + \qmlproperty enumeration Qt3D.render::BlendState::srcAlpha + + */ + +/*! + \property Qt3D::QBlendState::srcAlpha + + */ QBlendState::Blending QBlendState::srcAlpha() const { Q_D(const QBlendState); @@ -129,6 +206,15 @@ void QBlendState::setSrcAlpha(QBlendState::Blending srcAlpha) } } +/*! + \qmlproperty enumeration Qt3D.render::BlendState::dstAlpha + + */ + +/*! + \property Qt3D::QBlendState::dstAlpha + + */ QBlendState::Blending QBlendState::dstAlpha() const { Q_D(const QBlendState); @@ -144,6 +230,26 @@ void QBlendState::setDstAlpha(QBlendState::Blending dstAlpha) } } +/*! + \class QBlendStateSeparate + \inmodule Qt3DRender + \since 5.5 + \brief Encapsulates blending information. + */ + +/*! + \qmltype BlendStateSeparate + \instantiates Qt3D::QBlendStateSeparate + \inherits RenderState + \inqmlmodule Qt3D.Render + \since 5.5 + \brief Encapsulates blending information +*/ + +/*! + The constructor creates a QBlendStateSeparate with the + specified \a parent. + */ QBlendStateSeparate::QBlendStateSeparate(QNode *parent) : QBlendState(QRenderState::BlendStateSeparate, parent) { diff --git a/src/render/frontend/qlayer.cpp b/src/render/frontend/qlayer.cpp index f9e43d2be..afef8df3f 100644 --- a/src/render/frontend/qlayer.cpp +++ b/src/render/frontend/qlayer.cpp @@ -50,6 +50,26 @@ QLayerPrivate::QLayerPrivate() { } +/*! + \class QLayer + \inmodule Qt3DRender + \since 5.5 + \brief The QLayer class provides ... +*/ + +/*! + \qmltype Layer + \instantiates Qt3D::QLayer + \inherits Component3D + \inqmlmodule Qt3D.Render + \since 5.5 + \brief For ... +*/ + + +/*! \fn void Qt3D::QLayer::copy(const QNode *ref) + Copies the \a ref instance into this one. + */ void QLayer::copy(const QNode *ref) { QComponent::copy(ref); @@ -57,6 +77,10 @@ void QLayer::copy(const QNode *ref) d_func()->m_names = layer->d_func()->m_names; } +/*! \fn Qt3D::QLayer::QLayer(QObject *parent) + Constructs a new QLayer with the specified \a parent. + */ + QLayer::QLayer(QNode *parent) : QComponent(*new QLayerPrivate, parent) { @@ -68,6 +92,16 @@ QLayer::QLayer(QLayerPrivate &dd, QNode *parent) { } +/*! + \property Qt3D::QLayer::names + + */ + +/*! + \qmlproperty stringlist Qt3D.Render::Layer::names + +*/ + QStringList QLayer::names() const { Q_D(const QLayer); diff --git a/src/render/frontend/qopenglfilter.cpp b/src/render/frontend/qopenglfilter.cpp index 2c57daa3f..c6bf6da1a 100644 --- a/src/render/frontend/qopenglfilter.cpp +++ b/src/render/frontend/qopenglfilter.cpp @@ -63,11 +63,33 @@ public: QString m_vendor; }; +/*! + \class QOpenGLFilter + \inmodule Qt3DRender + \since 5.5 + \brief The QOpenGLFilter class provides ... +*/ + +/*! + \qmltype OpenGLFilter + \instantiates Qt3D::QOpenGLFilter + \inherits QtObject + \inqmlmodule Qt3D.Render + \since 5.5 + \brief For OpenGL ... +*/ + +/*! \fn Qt3D::QOpenGLFilter::QOpenGLFilter(QObject *parent) + Constructs a new QOpenGLFilter with the specified \a parent. + */ QOpenGLFilter::QOpenGLFilter(QObject *parent) : QObject(*new QOpenGLFilterPrivate, parent) { } +/*! \fn void Qt3D::QOpenGLFilter::copy(const QOpenGLFilter &ref) + Copies the \a ref instance into this one. + */ void QOpenGLFilter::copy(const QOpenGLFilter &ref) { Q_D(QOpenGLFilter); @@ -79,36 +101,119 @@ void QOpenGLFilter::copy(const QOpenGLFilter &ref) d->m_vendor = ref.vendor(); } +/*! + \enum Qt3D::QOpenGLFilter::Api + + \value ES QSurfaceFormat::OpenGLES + \value Desktop QSurfaceFormat::OpenGL + +*/ + +/*! + \enum Qt3D::QOpenGLFilter::Profile + + \value None QSurfaceFormat::NoProfile + \value Core QSurfaceFormat::CoreProfile + \value Compatibility QSurfaceFormat::CompatibilityProfile + +*/ + +/*! + \property Qt3D::QOpenGLFilter::api + +*/ + +/*! + \qmlproperty enumeration Qt3D.Render::OpenGLFilter::api + + + \value ES QSurfaceFormat::OpenGLES + \value Desktop QSurfaceFormat::OpenGL +*/ + QOpenGLFilter::Api QOpenGLFilter::api() const { Q_D(const QOpenGLFilter); return d->m_api; } +/*! + \property Qt3D::QOpenGLFilter::profile + +*/ + +/*! + \qmlproperty enumeration Qt3D.Render::OpenGLFilter::profile + + \value None QSurfaceFormat::NoProfile + \value Core QSurfaceFormat::CoreProfile + \value Compatibility QSurfaceFormat::CompatibilityProfile +*/ + QOpenGLFilter::Profile QOpenGLFilter::profile() const { Q_D(const QOpenGLFilter); return d->m_profile; } +/*! + \property Qt3D::QOpenGLFilter::minorVersion + + */ + +/*! + \qmlproperty int Qt3D.Render::OpenGLFilter::minorVersion + +*/ + int QOpenGLFilter::minorVersion() const { Q_D(const QOpenGLFilter); return d->m_minor; } +/*! + \property Qt3D::QOpenGLFilter::majorVersion + + */ + +/*! + \qmlproperty int Qt3D.Render::OpenGLFilter::majorVersion + +*/ + int QOpenGLFilter::majorVersion() const { Q_D(const QOpenGLFilter); return d->m_major; } +/*! + \property Qt3D::QOpenGLFilter::extensions + + */ + +/*! + \qmlproperty stringlist Qt3D.Render::OpenGLFilter::extensions + +*/ + QStringList QOpenGLFilter::extensions() const { Q_D(const QOpenGLFilter); return d->m_extensions; } +/*! + \property Qt3D::QOpenGLFilter::vendor + + */ + +/*! + \qmlproperty string Qt3D.Render::OpenGLFilter::vendor + +*/ + QString QOpenGLFilter::vendor() const { Q_D(const QOpenGLFilter); @@ -175,6 +280,10 @@ void QOpenGLFilter::setVendor(const QString &vendor) } } +/*! \fn bool Qt3D::operator ==(const QOpenGLFilter &reference, const QOpenGLFilter &sample) + \relates Qt3D::QOpenGLFilter + Returns true if \a reference and \a sample are equivalent. + */ bool operator ==(const QOpenGLFilter &reference, const QOpenGLFilter &sample) { if (sample.api() == reference.api() @@ -193,11 +302,18 @@ bool operator ==(const QOpenGLFilter &reference, const QOpenGLFilter &sample) return false; } +/*! \fn bool Qt3D::operator !=(const QOpenGLFilter &reference, const QOpenGLFilter &sample) + \relates Qt3D::QOpenGLFilter + Returns true if \a reference and \a sample are different. + */ bool operator !=(const QOpenGLFilter &reference, const QOpenGLFilter &sample) { return !(reference == sample); } +/*! \fn void Qt3D::QOpenGLFilter::openGLFilterChanged() + This signal is emitted when the value of any property is changed. +*/ } // Qt3D QT_END_NAMESPACE diff --git a/src/render/frontend/qparametermapping.cpp b/src/render/frontend/qparametermapping.cpp index ab61f4c77..e2b266f8d 100644 --- a/src/render/frontend/qparametermapping.cpp +++ b/src/render/frontend/qparametermapping.cpp @@ -50,7 +50,25 @@ QParameterMappingPrivate::QParameterMappingPrivate() , m_bindingType(QParameterMapping::Uniform) { } +/*! + \class QParameterMapping + \inmodule Qt3DRender + \since 5.5 + \brief The QParameterMapping class provides ... +*/ + +/*! + \qmltype ParameterMapping + \instantiates Qt3D::QParameterMapping + \inherits Node + \inqmlmodule Qt3D.Render + \since 5.5 + \brief For ... +*/ +/*! \fn void Qt3D::QParameterMapping::copy(const QNode *ref) + Copies the \a ref instance into this one. + */ void QParameterMapping::copy(const QNode *ref) { QNode::copy(ref); @@ -60,17 +78,34 @@ void QParameterMapping::copy(const QNode *ref) d_func()->m_bindingType = mapper->d_func()->m_bindingType; } +/*! \fn Qt3D::QParameterMapping::QParameterMapping(QNode *parent) + Constructs a new QParameterMapping with the specified \a parent. + */ QParameterMapping::QParameterMapping(QNode *parent) : QNode(*new QParameterMappingPrivate, parent) { } +/*! + \enum Qt3D::QParameterMapping::Binding + + \value Uniform + \value Attribute + \value StandardUniform + \value FragmentOutput + +*/ + /*! \internal */ QParameterMapping::QParameterMapping(QParameterMappingPrivate &dd, QNode *parent) : QNode(dd, parent) { } +/*! + This constructor takes a \a parameterName, a \a shaderParameterName, + a \a bindingType, and a \a parent. + */ QParameterMapping::QParameterMapping(const QString ¶meterName, const QString &shaderParameterName, QParameterMapping::Binding bindingType, QNode *parent) : QNode(*new QParameterMappingPrivate, parent) { @@ -80,6 +115,16 @@ QParameterMapping::QParameterMapping(const QString ¶meterName, const QString d->m_bindingType = bindingType; } +/*! + \property Qt3D::QParameterMapping::parameterName + +*/ + +/*! + \qmlproperty string Qt3D.Render::ParameterMapping::parameterName + +*/ + void QParameterMapping::setParameterName(const QString &name) { Q_D(QParameterMapping); @@ -89,6 +134,16 @@ void QParameterMapping::setParameterName(const QString &name) } } +/*! + \property Qt3D::QParameterMapping::shaderVariableName + +*/ + +/*! + \qmlproperty string Qt3D.Render::ParameterMapping::shaderVariableName + +*/ + void QParameterMapping::setShaderVariableName(const QString &name) { Q_D(QParameterMapping); @@ -98,6 +153,19 @@ void QParameterMapping::setShaderVariableName(const QString &name) } } +/*! + \property Qt3D::QParameterMapping::bindingType + +*/ + +/*! + \qmlproperty BindingType Qt3D.Render::ParameterMapping::bindingType + + \value Uniform + \value Attribute + \value StandardUniform + \value FragmentOutput +*/ void QParameterMapping::setBindingType(QParameterMapping::Binding type) { Q_D(QParameterMapping); diff --git a/src/render/frontend/qpointlight.cpp b/src/render/frontend/qpointlight.cpp index eca6af8b0..77cb68954 100644 --- a/src/render/frontend/qpointlight.cpp +++ b/src/render/frontend/qpointlight.cpp @@ -41,22 +41,21 @@ QT_BEGIN_NAMESPACE namespace Qt3D { -/*! - * - * Expected Shader struct - * - * \code - * - * struct PointLight - * { - * vec3 position; - * vec4 color; - * float intensity; - * }; - * - * uniform PointLight pointLights[10]; - * - * \endcode +/* + Expected Shader struct + + \code + + struct PointLight + { + vec3 position; + vec4 color; + float intensity; + }; + + uniform PointLight pointLights[10]; + + \endcode */ /*! @@ -68,6 +67,26 @@ QPointLightPrivate::QPointLightPrivate() { } +/*! + \class QPointLight + \inmodule Qt3DRender + \since 5.5 + + */ + +/*! + \qmltype PointLight + \instantiates Qt3D::QPointLight + \inherits AbstractLight + \inqmlmodule Qt3D.Render + \since 5.5 + \brief For OpenGL ... +*/ + +/*! + \fn Qt3D::QPointLight::QPointLight(QNode *parent) + Constructs a new QPointLight with the specified \a parent. + */ QPointLight::QPointLight(QNode *parent) : QAbstractLight(*new QPointLightPrivate, parent) { diff --git a/src/render/frontend/qspotlight.cpp b/src/render/frontend/qspotlight.cpp index bbac94b4c..cef18fe10 100644 --- a/src/render/frontend/qspotlight.cpp +++ b/src/render/frontend/qspotlight.cpp @@ -43,24 +43,23 @@ QT_BEGIN_NAMESPACE namespace Qt3D { -/*! - * - * Expected Shader struct - * - * \code - * - * struct SpotLight - * { - * vec3 position; - * vec3 direction; - * vec4 color; - * float intensity; - * float cutOffAngle; - * }; - * - * uniform SpotLight spotLights[10]; - * - * \endcode +/* + Expected Shader struct + + \code + + struct SpotLight + { + vec3 position; + vec3 direction; + vec4 color; + float intensity; + float cutOffAngle; + }; + + uniform SpotLight spotLights[10]; + + \endcode */ /*! @@ -73,6 +72,26 @@ QSpotLightPrivate::QSpotLightPrivate() { } +/*! + \class QSpotLight + \inmodule Qt3DRender + \since 5.5 + + */ + +/*! + \qmltype SpotLight + \instantiates Qt3D::QSpotLight + \inherits AbstractLight + \inqmlmodule Qt3D.Render + \since 5.5 + \brief For OpenGL ... +*/ + +/*! \fn void Qt3D::QSpotLight::copy(const QNode *ref) + Copies the \a ref instance into this one. + */ + void QSpotLight::copy(const QNode *ref) { const QSpotLight *light = static_cast(ref); @@ -83,6 +102,11 @@ void QSpotLight::copy(const QNode *ref) QAbstractLight::copy(ref); } + +/*! + \fn Qt3D::QSpotLight::QSpotLight(QNode *parent) + Constructs a new QSpotLight with the specified \a parent. + */ QSpotLight::QSpotLight(QNode *parent) : QAbstractLight(*new QSpotLightPrivate, parent) { @@ -94,12 +118,32 @@ QSpotLight::QSpotLight(QSpotLightPrivate &dd, QNode *parent) { } -QVector3D QSpotLight::direction() const +/*! + \qmlproperty vector3d Qt3D.Render::SpotLight::direction + +*/ + +/*! + \property Qt3D::QSpotLight::direction + + */ + + QVector3D QSpotLight::direction() const { Q_D(const QSpotLight); return d->m_direction; } + +/*! + \qmlproperty float Qt3D.Render::SpotLight::cutOffAngle + +*/ + +/*! + \property Qt3D::QSpotLight::cutOffAngle + + */ float QSpotLight::cutOffAngle() const { Q_D(const QSpotLight); diff --git a/src/render/frontend/qtextureimage.cpp b/src/render/frontend/qtextureimage.cpp index 8954b6334..e3ada359a 100644 --- a/src/render/frontend/qtextureimage.cpp +++ b/src/render/frontend/qtextureimage.cpp @@ -92,7 +92,8 @@ private: }; /*! - \class Qt3D::QTextureImage + \class QTextureImage + \inmodule Qt3DRender \since 5.5 \brief Encapsulates the necessary information to create an OpenGL texture image from an image source. @@ -101,6 +102,16 @@ private: source URL to load at the proper place data into an OpenGL texture. */ +/*! + \qmltype TextureImage + \instantiates Qt3D::QTextureImage + \inherits AbstractTextureImage + \inqmlmodule Qt3D.Render + \since 5.5 + \brief Encapsulates the necessary information to create an OpenGL texture + image from an image source. +*/ + /*! Constructs a new Qt3D::QTextureImage instance with \a parent as parent. */ @@ -109,6 +120,9 @@ QTextureImage::QTextureImage(QNode *parent) { } +/*! + The destructor. + */ QTextureImage::~QTextureImage() { } @@ -122,6 +136,20 @@ QUrl QTextureImage::source() const return d->m_source; } +/*! + \property Qt3D::QTextureImage::source + + This property holdsthe source url from which data for the texture + image will be loaded. +*/ + +/*! + \qmlproperty url Qt3D.Render::TextureImage::source + + This property holdsthe source url from which data for the texture + image will be loaded. +*/ + /*! Sets the source url of the texture image to \a source. \note This triggers a call to update() @@ -145,6 +173,9 @@ QTextureDataFunctorPtr QTextureImage::dataFunctor() const return QTextureDataFunctorPtr(new QImageTextureDataFunctor(source())); } +/*! + Copies \ref into this texture image. + */ void QTextureImage::copy(const QNode *ref) { QAbstractTextureImage::copy(ref); -- cgit v1.2.3