aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2018-02-13 11:05:22 +0100
committerMartin Smith <martin.smith@qt.io>2018-02-14 07:45:23 +0000
commit874cd47ae427e6f08a6e362f28af5038a2bc9872 (patch)
treeaa5dade6dd422c58a434681d12f9630339eec87c /src/quick/scenegraph
parentb704faaa45d3e3ca8bc7ce11aeb1e533a9563a0f (diff)
doc: Add documentation for undocumented things
There were several undocumented elements in the API that clang-qdoc warned about. These are now documented, although original authors might want to contribute better descriptions. A few uses of a macro "qdoc" were corrected to Q_CLANG_QDOC. Change-Id: I4e1d4c5f3266a334d7286e55ed1b113319de2273 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/coreapi/qsggeometry.cpp13
-rw-r--r--src/quick/scenegraph/coreapi/qsgmaterial.cpp5
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.cpp8
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.h7
-rw-r--r--src/quick/scenegraph/coreapi/qsgrendernode.cpp18
-rw-r--r--src/quick/scenegraph/util/qsgimagenode.cpp11
-rw-r--r--src/quick/scenegraph/util/qsgsimplematerial.h2
-rw-r--r--src/quick/scenegraph/util/qsgtexturematerial.cpp10
8 files changed, 65 insertions, 9 deletions
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.cpp b/src/quick/scenegraph/coreapi/qsggeometry.cpp
index 69a8c21ed2..52366bfc35 100644
--- a/src/quick/scenegraph/coreapi/qsggeometry.cpp
+++ b/src/quick/scenegraph/coreapi/qsggeometry.cpp
@@ -768,6 +768,19 @@ void QSGGeometry::updateColoredRectGeometry(QSGGeometry *g, const QRectF &rect)
v[3].y = rect.bottom();
}
+/*!
+ \enum QSGGeometry::AttributeType
+
+ This enum identifies several attribute types.
+
+ \value UnknownAttribute Don't care
+ \value PositionAttribute Position
+ \value ColorAttribute Color
+ \value TexCoordAttribute Texture coordinate
+ \value TexCoord1Attribute Texture coordinate 1
+ \value TexCoord2Attribute Texture coordinate 2
+
+ */
/*!
\enum QSGGeometry::DataPattern
diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp
index 07dc87a643..5c28f4c82f 100644
--- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp
+++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp
@@ -443,7 +443,12 @@ void QSGMaterialShader::compile()
otherwise returns \c false.
*/
+/*!
+ \fn bool QSGMaterialShader::RenderState::isCachedMaterialDataDirty() const
+ Returns \c true if the dirtyStates() contains the dirty cached material state,
+ otherwise returns \c false.
+ */
/*!
\fn QSGMaterialShader::RenderState::DirtyStates QSGMaterialShader::RenderState::dirtyStates() const
diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp
index 22d57001fc..550a2182f8 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.cpp
+++ b/src/quick/scenegraph/coreapi/qsgnode.cpp
@@ -114,6 +114,10 @@ static void qt_print_node_count()
\value DirtyOpacity The opacity of a QSGOpacityNode has changed.
\value DirtySubtreeBlocked The subtree has been blocked.
+ \omitvalue DirtyForceUpdate
+ \omitvalue DirtyUsePreprocess
+ \omitvalue DirtyPropagationMask
+
\sa QSGNode::markDirty()
*/
@@ -135,6 +139,8 @@ static void qt_print_node_count()
ownership over the opaque material and will delete it when the node is
destroyed or a material is assigned.
\value InternalReserved Reserved for internal use.
+
+ \omitvalue IsVisitableNode
*/
/*!
@@ -149,6 +155,8 @@ static void qt_print_node_count()
\value OpacityNodeType The type of QSGOpacityNode
\value RenderNodeType The type of QSGRenderNode
+ \omitvalue RootNodeType
+
\sa type()
*/
diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h
index f2708b2b96..cd9d689dc1 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.h
+++ b/src/quick/scenegraph/coreapi/qsgnode.h
@@ -77,9 +77,7 @@ public:
TransformNodeType,
ClipNodeType,
OpacityNodeType,
-#ifndef qdoc
RootNodeType,
-#endif
RenderNodeType
};
@@ -96,9 +94,8 @@ public:
OwnsOpaqueMaterial = 0x00040000,
// Uppermost 8 bits are reserved for internal use.
-#ifndef qdoc
IsVisitableNode = 0x01000000
-#else
+#ifdef Q_CLANG_QDOC
InternalReserved = 0x01000000
#endif
};
@@ -113,7 +110,6 @@ public:
DirtyMaterial = 0x2000,
DirtyOpacity = 0x4000,
-#ifndef qdoc
DirtyForceUpdate = 0x8000,
DirtyUsePreprocess = UsePreprocess,
@@ -122,7 +118,6 @@ public:
| DirtyNodeAdded
| DirtyOpacity
| DirtyForceUpdate
-#endif
};
Q_DECLARE_FLAGS(DirtyState, DirtyStateBit)
diff --git a/src/quick/scenegraph/coreapi/qsgrendernode.cpp b/src/quick/scenegraph/coreapi/qsgrendernode.cpp
index a8954848d6..5e259f2083 100644
--- a/src/quick/scenegraph/coreapi/qsgrendernode.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrendernode.cpp
@@ -213,6 +213,22 @@ void QSGRenderNode::releaseResources()
}
/*!
+ \enum QSGRenderNode::StateFlag
+
+ This enum is a bit mask identifying several states.
+
+ \value DepthState Depth
+ \value StencilState Stencil
+ \value ScissorState Scissor
+ \value ColorState Color
+ \value BlendState Blend
+ \value CullState Cull
+ \value ViewportState View poirt
+ \value RenderTargetState Render target
+
+ */
+
+/*!
\enum QSGRenderNode::RenderingFlag
Possible values for the bitmask returned from flags().
@@ -354,7 +370,7 @@ QSGRenderNode::RenderState::~RenderState()
*/
/*!
- \fn const QRegion *QSGRenderNode::clipRegion() const
+ \fn const QRegion *QSGRenderNode::RenderState::clipRegion() const
\return the current clip region or null for backends where clipping is
implemented via stencil or scissoring.
diff --git a/src/quick/scenegraph/util/qsgimagenode.cpp b/src/quick/scenegraph/util/qsgimagenode.cpp
index c03c91d1cb..b154023247 100644
--- a/src/quick/scenegraph/util/qsgimagenode.cpp
+++ b/src/quick/scenegraph/util/qsgimagenode.cpp
@@ -168,7 +168,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QSGImageNode::TextureCoordinatesTransformMode textureCoordinatesTransform() const
+ \fn QSGImageNode::TextureCoordinatesTransformMode QSGImageNode::textureCoordinatesTransform() const
Returns the mode used to generate texture coordinates for this node.
*/
@@ -187,6 +187,15 @@ QT_BEGIN_NAMESPACE
\return \c true if the node takes ownership of the texture; otherwise \c false.
*/
+/*!
+ Updates the geometry \a g with the \a texture, the coordinates
+ in \a rect, and the texture coordinates from \a sourceRect.
+
+ \a g is assumed to be a triangle strip of four vertices of type
+ QSGGeometry::TexturedPoint2D.
+
+ \a texCoordMode is used for normalizing the \a sourceRect.
+ */
void QSGImageNode::rebuildGeometry(QSGGeometry *g,
QSGTexture *texture,
const QRectF &rect,
diff --git a/src/quick/scenegraph/util/qsgsimplematerial.h b/src/quick/scenegraph/util/qsgsimplematerial.h
index b5b8815b4a..8a81917bd2 100644
--- a/src/quick/scenegraph/util/qsgsimplematerial.h
+++ b/src/quick/scenegraph/util/qsgsimplematerial.h
@@ -138,7 +138,7 @@ template <typename State>
class QSGSimpleMaterial : public QSGMaterial
{
public:
-#ifndef qdoc
+#ifndef Q_CLANG_QDOC
QSGSimpleMaterial(const State &aState, PtrShaderCreateFunc func)
: m_state(aState)
, m_func(func)
diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp
index fbc8f27a63..0f9ee9cfde 100644
--- a/src/quick/scenegraph/util/qsgtexturematerial.cpp
+++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp
@@ -304,7 +304,17 @@ void QSGOpaqueTextureMaterial::setTexture(QSGTexture *texture)
The default vertical wrap mode is \c QSGTexture::ClampToEdge.
*/
+/*!
+ \fn void QSGOpaqueTextureMaterial::setAnisotropyLevel(QSGTexture::AnisotropyLevel level)
+
+ Sets this material's anistropy level to \a level.
+*/
+
+/*!
+ \fn QSGTexture::AnisotropyLevel QSGOpaqueTextureMaterial::anisotropyLevel() const
+ Returns this material's anistropy level.
+*/
/*!
\internal