Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSGNode Class Reference

\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes More...

#include <qsgnode.h>

+ Inheritance diagram for QSGNode:
+ Collaboration diagram for QSGNode:

Public Types

enum  NodeType {
  BasicNodeType , GeometryNodeType , TransformNodeType , ClipNodeType ,
  OpacityNodeType , RootNodeType , RenderNodeType
}
 Can be used to figure out the type of node. More...
 
enum  Flag {
  OwnedByParent = 0x0001 , UsePreprocess = 0x0002 , OwnsGeometry = 0x00010000 , OwnsMaterial = 0x00020000 ,
  OwnsOpaqueMaterial = 0x00040000 , IsVisitableNode = 0x01000000
}
 The QSGNode::Flag enum describes flags on the QSGNode. More...
 
enum  DirtyStateBit {
  DirtySubtreeBlocked = 0x0080 , DirtyMatrix = 0x0100 , DirtyNodeAdded = 0x0400 , DirtyNodeRemoved = 0x0800 ,
  DirtyGeometry = 0x1000 , DirtyMaterial = 0x2000 , DirtyOpacity = 0x4000 , DirtyForceUpdate = 0x8000 ,
  DirtyUsePreprocess = UsePreprocess , DirtyPropagationMask
}
 Used in QSGNode::markDirty() to indicate how the scene graph has changed. More...
 

Public Member Functions

 QSGNode ()
 Constructs a new node.
 
virtual ~QSGNode ()
 Destroys the node.
 
QSGNodeparent () const
 Returns the parent node of this node.
 
void removeChildNode (QSGNode *node)
 Removes node from this node's list of children.
 
void removeAllChildNodes ()
 Removes all child nodes from this node's list of children.
 
void prependChildNode (QSGNode *node)
 Prepends node to this node's the list of children.
 
void appendChildNode (QSGNode *node)
 Appends node to this node's list of children.
 
void insertChildNodeBefore (QSGNode *node, QSGNode *before)
 Inserts node to this node's list of children before the node specified with before.
 
void insertChildNodeAfter (QSGNode *node, QSGNode *after)
 Inserts node to this node's list of children after the node specified with after.
 
void reparentChildNodesTo (QSGNode *newParent)
 
int childCount () const
 Returns the number of child nodes.
 
QSGNodechildAtIndex (int i) const
 Returns the child at index i.
 
QSGNodefirstChild () const
 Returns the first child of this node.
 
QSGNodelastChild () const
 Returns the last child of this node.
 
QSGNodenextSibling () const
 Returns the node after this in the parent's list of children.
 
QSGNodepreviousSibling () const
 Returns the node before this in the parent's list of children.
 
NodeType type () const
 Returns the type of this node.
 
QT_DEPRECATED void clearDirty ()
 
void markDirty (DirtyState bits)
 Notifies all connected renderers that the node has dirty bits.
 
QT_DEPRECATED DirtyState dirtyState () const
 
virtual bool isSubtreeBlocked () const
 Returns whether this node and its subtree is available for use.
 
Flags flags () const
 Returns the set of flags for this node.
 
void setFlag (Flag, bool=true)
 Sets the flag f on this node if enabled is true; otherwise clears the flag.
 
void setFlags (Flags, bool=true)
 Sets the flags f on this node if enabled is true; otherwise clears the flags.
 
virtual void preprocess ()
 Override this function to do processing on the node before it is rendered.
 

Protected Member Functions

 QSGNode (NodeType type)
 Constructs a new node with the given node type.
 
 QSGNode (QSGNodePrivate &dd, NodeType type)
 Constructs a new node with the given node type.
 

Protected Attributes

QScopedPointer< QSGNodePrivated_ptr
 

Friends

class QSGRootNode
 
class QSGBatchRenderer::Renderer
 
class QSGRenderer
 
class QSGNodePrivate
 

Detailed Description

\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes

Nodes that can be used as part of the scene graph.

This page lists the nodes in \l {Qt Quick}'s \l {scene graph}{Qt Quick Scene Graph}.

The QSGNode class is the base class for all nodes in the scene graph.

\inmodule QtQuick

The QSGNode class can be used as a child container. Children are added with the appendChildNode(), prependChildNode(), insertChildNodeBefore() and insertChildNodeAfter(). The order of nodes is important as geometry nodes are rendered according to their ordering in the scene graph.

The scene graph nodes contain a mechanism that describes which parts of the scene have changed. This includes the combined matrices, accumulated opacity, changes to the node hierarchy, and so on. This information can be used for optimizations inside the scene graph renderer. For the renderer to properly render the nodes, it is important that users call QSGNode::markDirty() with the correct flags when nodes are changed. Most of the functions on the node classes will implicitly call markDirty(). For example, QSGNode::appendChildNode() will call markDirty() passing in QSGNode::DirtyNodeAdded.

If nodes change every frame, the preprocess() function can be used to apply changes to a node for every frame it is rendered. The use of preprocess() must be explicitly enabled by setting the QSGNode::UsePreprocess flag on the node.

The virtual isSubtreeBlocked() function can be used to disable a subtree all together. Nodes in a blocked subtree will not be preprocessed() and not rendered.

Note
All classes with QSG prefix should be used solely on the scene graph's rendering thread. See \l {Scene Graph and Rendering} for more information.

Definition at line 36 of file qsgnode.h.

Member Enumeration Documentation

◆ DirtyStateBit

Used in QSGNode::markDirty() to indicate how the scene graph has changed.

\value DirtyMatrix The matrix in a QSGTransformNode has changed. \value DirtyNodeAdded A node was added. \value DirtyNodeRemoved A node was removed. \value DirtyGeometry The geometry of a QSGGeometryNode has changed. \value DirtyMaterial The material of a QSGGeometryNode has changed. \value DirtyOpacity The opacity of a QSGOpacityNode has changed. \value DirtySubtreeBlocked The subtree has been blocked.

\omitvalue DirtyForceUpdate \omitvalue DirtyUsePreprocess \omitvalue DirtyPropagationMask

See also
QSGNode::markDirty()
Enumerator
DirtySubtreeBlocked 
DirtyMatrix 
DirtyNodeAdded 
DirtyNodeRemoved 
DirtyGeometry 
DirtyMaterial 
DirtyOpacity 
DirtyForceUpdate 
DirtyUsePreprocess 
DirtyPropagationMask 

Definition at line 69 of file qsgnode.h.

◆ Flag

The QSGNode::Flag enum describes flags on the QSGNode.

\value OwnedByParent The node is owned by its parent and will be deleted when the parent is deleted. \value UsePreprocess The node's virtual preprocess() function will be called before rendering starts. \value OwnsGeometry Only valid for QSGGeometryNode and QSGClipNode. The node has ownership over the QSGGeometry instance and will delete it when the node is destroyed or a geometry is assigned. \value OwnsMaterial Only valid for QSGGeometryNode. The node has ownership over the material and will delete it when the node is destroyed or a material is assigned. \value OwnsOpaqueMaterial Only valid for QSGGeometryNode. The node has 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

Enumerator
OwnedByParent 
UsePreprocess 
OwnsGeometry 
OwnsMaterial 
OwnsOpaqueMaterial 
IsVisitableNode 

Definition at line 49 of file qsgnode.h.

◆ NodeType

Can be used to figure out the type of node.

\value BasicNodeType The type of QSGNode \value GeometryNodeType The type of QSGGeometryNode \value TransformNodeType The type of QSGTransformNode \value ClipNodeType The type of QSGClipNode \value OpacityNodeType The type of QSGOpacityNode \value RenderNodeType The type of QSGRenderNode

\omitvalue RootNodeType

See also
type()
Enumerator
BasicNodeType 
GeometryNodeType 
TransformNodeType 
ClipNodeType 
OpacityNodeType 
RootNodeType 
RenderNodeType 

Definition at line 39 of file qsgnode.h.

Constructor & Destructor Documentation

◆ QSGNode() [1/3]

QSGNode::QSGNode ( )

Constructs a new node.

Definition at line 211 of file qsgnode.cpp.

◆ ~QSGNode()

QSGNode::~QSGNode ( )
virtual

Destroys the node.

Every child of this node that has the flag QSGNode::OwnedByParent set, will also be deleted.

Definition at line 282 of file qsgnode.cpp.

References qCDebug, and qt_node_count.

◆ QSGNode() [2/3]

QSGNode::QSGNode ( NodeType type)
protected

Constructs a new node with the given node type.

Definition at line 222 of file qsgnode.cpp.

◆ QSGNode() [3/3]

QSGNode::QSGNode ( QSGNodePrivate & dd,
NodeType type )
protected

Constructs a new node with the given node type.

Definition at line 240 of file qsgnode.cpp.

Member Function Documentation

◆ appendChildNode()

void QSGNode::appendChildNode ( QSGNode * node)

Appends node to this node's list of children.

Ordering of nodes is important as geometry nodes will be rendered in the order they are added to the scene graph.

Definition at line 398 of file qsgnode.cpp.

References DirtyNodeAdded, GeometryNodeType, markDirty(), Q_ASSERT_X, and type().

Referenced by QQuickBasicBusyIndicatorNode::QQuickBasicBusyIndicatorNode(), QQuickMaterialBusyIndicatorNode::QQuickMaterialBusyIndicatorNode(), QQuickMaterialRippleBackgroundNode::QQuickMaterialRippleBackgroundNode(), QQuickMaterialRippleWaveNode::QQuickMaterialRippleWaveNode(), QQuickTextEditPrivate::addCurrentTextNodeToRoot(), QSGInternalTextNode::addGlyphs(), QSGInternalTextNode::addImage(), QSGInternalTextNode::addRectangleNode(), QQuickTextNodeEngine::addToSceneGraph(), QQuickShapePrivate::createNode(), QQuickOpacityAnimatorJob::postSync(), reparentChildNodesTo(), QSGInternalTextNode::setCursor(), QQuickBasicProgressBarNode::sync(), QQuickMaterialProgressBarNode::sync(), QQuickUniversalBusyIndicatorNode::sync(), QQuickUniversalProgressBarNode::sync(), QQuickWindowPrivate::syncSceneGraph(), QQuickWindowPrivate::updateDirtyNode(), QSGCurveGlyphNode::updateGeometry(), QSGDefaultGlyphNode::updateGeometry(), QSGDistanceFieldGlyphNode::updateGeometry(), QQuickShapeCurveRenderer::updateNode(), QQuickShapeGenericRenderer::updateNode(), QQuickShaderEffectSource::updatePaintNode(), QQuickPaddedRectangle::updatePaintNode(), QDeclarativeGeoMap::updatePaintNode(), QQuickMaterialRipple::updatePaintNode(), QQuickTextArea::updatePaintNode(), and QQuickTextField::updatePaintNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ childAtIndex()

QSGNode * QSGNode::childAtIndex ( int i) const

Returns the child at index i.

Children are stored internally as a linked list, so iterating over the children via the index is suboptimal.

Definition at line 568 of file qsgnode.cpp.

References i.

◆ childCount()

int QSGNode::childCount ( ) const

Returns the number of child nodes.

Definition at line 556 of file qsgnode.cpp.

Referenced by QQuickBasicProgressBarNode::sync(), QQuickUniversalBusyIndicatorNode::updateCurrentTime(), QDeclarativeGeoMap::updatePaintNode(), QDeclarativeGeoMapItemBase::updatePaintNode(), and QQuickMaterialRipple::updatePaintNode().

+ Here is the caller graph for this function:

◆ clearDirty()

void QSGNode::clearDirty ( )
inline

Definition at line 112 of file qsgnode.h.

◆ dirtyState()

QSGNode::DirtyState QSGNode::dirtyState ( ) const
inline

Definition at line 114 of file qsgnode.h.

Referenced by QSGOpacityNode::setOpacity().

+ Here is the caller graph for this function:

◆ firstChild()

QSGNode * QSGNode::firstChild ( ) const
inline

Returns the first child of this node.

The children are stored in a linked list.

Definition at line 105 of file qsgnode.h.

Referenced by QSGRenderer::addNodesToPreprocess(), QSGInternalTextNode::clear(), QSGRenderer::removeNodesToPreprocess(), reparentChildNodesTo(), QQuickBasicBusyIndicatorNode::sync(), QQuickBasicProgressBarNode::sync(), QQuickMaterialProgressBarNode::sync(), QQuickMaterialRippleWaveNode::sync(), QQuickMaterialRippleBackgroundNode::sync(), QQuickUniversalBusyIndicatorNode::sync(), QQuickUniversalProgressBarNode::sync(), QQuickBasicBusyIndicatorNode::updateCurrentTime(), QQuickBasicProgressBarNode::updateCurrentTime(), QQuickMaterialBusyIndicatorNode::updateCurrentTime(), QQuickMaterialProgressBarNode::updateCurrentTime(), QQuickMaterialRippleWaveNode::updateCurrentTime(), QQuickMaterialRippleBackgroundNode::updateCurrentTime(), QQuickUniversalBusyIndicatorNode::updateCurrentTime(), QQuickUniversalProgressBarNode::updateCurrentTime(), QQuickWindowPrivate::updateDirtyNode(), QSGDefaultGlyphNode::updateGeometry(), QSGDistanceFieldGlyphNode::updateGeometry(), QQuickPaddedRectangle::updatePaintNode(), QDeclarativeGeoMap::updatePaintNode(), QQuickMaterialRipple::updatePaintNode(), QQuickTextArea::updatePaintNode(), QQuickTextField::updatePaintNode(), QSGNodeVisitor::visitChildren(), QSGNodeUpdater::visitChildren(), and QSGNodeVisitorEx::visitChildren().

+ Here is the caller graph for this function:

◆ flags()

QSGNode::Flags QSGNode::flags ( ) const
inline

Returns the set of flags for this node.

Definition at line 118 of file qsgnode.h.

Referenced by QSGBasicGeometryNode::~QSGBasicGeometryNode(), QSGGeometryNode::~QSGGeometryNode(), QSGRenderer::addNodesToPreprocess(), QSGRenderer::nodeChanged(), QSGRenderer::removeNodesToPreprocess(), QSGBasicGeometryNode::setGeometry(), QSGGeometryNode::setMaterial(), QSGGeometryNode::setOpaqueMaterial(), and QSGSoftwareRenderableNodeUpdater::updateNodes().

+ Here is the caller graph for this function:

◆ insertChildNodeAfter()

void QSGNode::insertChildNodeAfter ( QSGNode * node,
QSGNode * after )

Inserts node to this node's list of children after the node specified with after.

Ordering of nodes is important as geometry nodes will be rendered in the order they are added to the scene graph.

Definition at line 467 of file qsgnode.cpp.

References DirtyNodeAdded, GeometryNodeType, markDirty(), next, Q_ASSERT_X, and type().

+ Here is the call graph for this function:

◆ insertChildNodeBefore()

void QSGNode::insertChildNodeBefore ( QSGNode * node,
QSGNode * before )

Inserts node to this node's list of children before the node specified with before.

Ordering of nodes is important as geometry nodes will be rendered in the order they are added to the scene graph.

Definition at line 431 of file qsgnode.cpp.

References DirtyNodeAdded, GeometryNodeType, markDirty(), Q_ASSERT_X, and type().

Referenced by QQuickShapeCurveRenderer::updateNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSubtreeBlocked()

bool QSGNode::isSubtreeBlocked ( ) const
virtual

Returns whether this node and its subtree is available for use.

Blocked subtrees will not get their dirty states updated and they will not be rendered.

The QSGOpacityNode will return a blocked subtree when accumulated opacity is 0, for instance.

Reimplemented in QSGOpacityNode.

Definition at line 325 of file qsgnode.cpp.

Referenced by QSGNodeUpdater::isNodeBlocked(), and QSGBatchRenderer::Renderer::nodeChanged().

+ Here is the caller graph for this function:

◆ lastChild()

QSGNode * QSGNode::lastChild ( ) const
inline

Returns the last child of this node.

The children are stored as a linked list.

Definition at line 106 of file qsgnode.h.

◆ markDirty()

void QSGNode::markDirty ( DirtyState bits)

Notifies all connected renderers that the node has dirty bits.

Definition at line 624 of file qsgnode.cpp.

References DirtyNodeAdded, DirtyNodeRemoved, and RootNodeType.

Referenced by appendChildNode(), QQuickNinePatchNode::initialize(), insertChildNodeAfter(), insertChildNodeBefore(), QQuickImageParticle::prepareNextFrame(), prependChildNode(), QSGOpenVGInternalImageNode::preprocess(), QSGSoftwareInternalImageNode::preprocess(), QSGBasicInternalImageNode::preprocess(), removeAllChildNodes(), removeChildNode(), QSGFramebufferObjectNode::render(), QQuickRhiItemNode::render(), SGFramebufferObjectNode::render(), QSGMapboxGLTextureNode::render(), QSGMapboxGLTextureNode::resize(), SGFramebufferObjectNode::scheduleRender(), QSGDefaultImageNode::setAnisotropyLevel(), QSGSoftwareInternalRectangleNode::setBottomLeftRadius(), QSGSoftwareInternalRectangleNode::setBottomRightRadius(), QSGOpenVGNinePatchNode::setBounds(), QSGSoftwareNinePatchNode::setBounds(), QSGSimpleRectNode::setColor(), QSGOpenVGRectangleNode::setColor(), QSGSoftwareInternalRectangleNode::setColor(), QSGSoftwareRectangleNode::setColor(), QSGBasicGlyphNode::setColor(), QSGDistanceFieldGlyphNode::setColor(), QSGDefaultRectangleNode::setColor(), QSGOpenVGPainterNode::setContentsScale(), QSGSoftwarePainterNode::setContentsScale(), QSGDefaultPainterNode::setContentsScale(), QSGVideoNode::setCurrentFrame(), QSGVivanteVideoNode::setCurrentFrame(), QSGOpenVGNinePatchNode::setDevicePixelRatio(), QSGSoftwareNinePatchNode::setDevicePixelRatio(), QSGOpenVGPainterNode::setDirty(), QSGSoftwarePainterNode::setDirty(), QSGDefaultPainterNode::setDirty(), QSGOpenVGPainterNode::setFillColor(), QSGSoftwarePainterNode::setFillColor(), QSGDefaultPainterNode::setFillColor(), QSGSimpleTextureNode::setFiltering(), QSGOpenVGInternalImageNode::setFiltering(), QSGOpenVGImageNode::setFiltering(), QSGSoftwareInternalImageNode::setFiltering(), QSGSoftwareImageNode::setFiltering(), QSGDefaultInternalImageNode::setFiltering(), QSGDefaultImageNode::setFiltering(), setFlag(), setFlags(), QSGBasicGeometryNode::setGeometry(), QSGSoftwareInternalRectangleNode::setGradientStops(), QSGSoftwareInternalRectangleNode::setGradientVertical(), QSGVideoNode::setHdrInfo(), QSGOpenVGInternalImageNode::setHorizontalWrapMode(), QSGSoftwareInternalImageNode::setHorizontalWrapMode(), QSGDefaultInternalImageNode::setHorizontalWrapMode(), QSGOpenVGInternalImageNode::setInnerSourceRect(), QSGSoftwareInternalImageNode::setInnerSourceRect(), QSGOpenVGInternalImageNode::setInnerTargetRect(), QSGSoftwareInternalImageNode::setInnerTargetRect(), QSGDefaultPainterNode::setLinearFiltering(), QSGGeometryNode::setMaterial(), QSGTransformNode::setMatrix(), QSGDefaultInternalImageNode::setMipmapFiltering(), QSGDefaultImageNode::setMipmapFiltering(), QSGOpenVGInternalImageNode::setMirror(), QSGSoftwareInternalImageNode::setMirror(), QSGOpacityNode::setOpacity(), QSGGeometryNode::setOpaqueMaterial(), QSGOpenVGNinePatchNode::setPadding(), QSGSoftwareNinePatchNode::setPadding(), QSGSoftwareInternalRectangleNode::setPenColor(), QSGSoftwareInternalRectangleNode::setPenWidth(), QSGSoftwareInternalRectangleNode::setRadius(), QSGSimpleRectNode::setRect(), QSGSimpleTextureNode::setRect(), QSGOpenVGRectangleNode::setRect(), QSGOpenVGImageNode::setRect(), QSGSoftwareInternalRectangleNode::setRect(), QSGSoftwareRectangleNode::setRect(), QSGSoftwareImageNode::setRect(), QSGDefaultImageNode::setRect(), QSGDefaultRectangleNode::setRect(), QSGSimpleTextureNode::setSourceRect(), QSGDefaultImageNode::setSourceRect(), QSGOpenVGInternalImageNode::setSubSourceRect(), QSGSoftwareInternalImageNode::setSubSourceRect(), QSGVideoNode::setSurfaceFormat(), QSGOpenVGInternalImageNode::setTargetRect(), QSGSoftwareInternalImageNode::setTargetRect(), QSGSimpleTextureNode::setTexture(), QSGOpenVGInternalImageNode::setTexture(), QSGOpenVGImageNode::setTexture(), QSGOpenVGNinePatchNode::setTexture(), QSGSoftwareInternalImageNode::setTexture(), QSGSoftwareImageNode::setTexture(), QSGSoftwareNinePatchNode::setTexture(), QSGBasicInternalImageNode::setTexture(), QSGDefaultImageNode::setTexture(), QSGSimpleTextureNode::setTextureCoordinatesTransform(), QSGDefaultImageNode::setTextureCoordinatesTransform(), QSGOpenVGImageNode::setTextureCoordinatesTransform(), QSGSoftwareImageNode::setTextureCoordinatesTransform(), QSGVideoNode::setTexturedRectGeometry(), QSGSoftwareInternalRectangleNode::setTopLeftRadius(), QSGSoftwareInternalRectangleNode::setTopRightRadius(), QSGOpenVGRectangleNode::setTransform(), QSGOpenVGInternalImageNode::setVerticalWrapMode(), QSGSoftwareInternalImageNode::setVerticalWrapMode(), QSGDefaultInternalImageNode::setVerticalWrapMode(), QSGRhiShaderEffectNode::syncMaterial(), QSGBasicInternalRectangleNode::update(), QSGCurveGlyphNode::update(), QSGDefaultGlyphNode::update(), QSGDefaultNinePatchNode::update(), QSGBasicInternalImageNode::updateGeometry(), QSGDistanceFieldGlyphNode::updateGeometry(), QQuickShapeSoftwareRenderer::updateNode(), QSGRhiShaderEffectNode::updateNormalizedTextureSubRect(), QQuickShaderEffectSource::updatePaintNode(), QQuick3DItem2D::updateSpatialNode(), and QGeoTiledMapRootNode::updateTiles().

◆ nextSibling()

QSGNode * QSGNode::nextSibling ( ) const
inline

Returns the node after this in the parent's list of children.

The children are stored as a linked list.

Definition at line 107 of file qsgnode.h.

Referenced by QQuickBasicBusyIndicatorNode::sync(), QQuickBasicProgressBarNode::sync(), QQuickMaterialProgressBarNode::sync(), QQuickUniversalBusyIndicatorNode::sync(), QQuickBasicBusyIndicatorNode::updateCurrentTime(), QQuickBasicProgressBarNode::updateCurrentTime(), QQuickUniversalBusyIndicatorNode::updateCurrentTime(), QQuickWindowPrivate::updateDirtyNode(), and QSGDistanceFieldGlyphNode::updateGeometry().

+ Here is the caller graph for this function:

◆ parent()

QSGNode * QSGNode::parent ( ) const
inline

◆ prependChildNode()

void QSGNode::prependChildNode ( QSGNode * node)

Prepends node to this node's the list of children.

Ordering of nodes is important as geometry nodes will be rendered in the order they are added to the scene graph.

Definition at line 367 of file qsgnode.cpp.

References DirtyNodeAdded, GeometryNodeType, markDirty(), Q_ASSERT_X, and type().

+ Here is the call graph for this function:

◆ preprocess()

void QSGNode::preprocess ( )
inlinevirtual

Override this function to do processing on the node before it is rendered.

Preprocessing needs to be explicitly enabled by setting the flag QSGNode::UsePreprocess. The flag needs to be set before the node is added to the scene graph and will cause the preprocess() function to be called for every frame the node is rendered.

Warning
Beware of deleting nodes while they are being preprocessed. It is possible, with a small performance hit, to delete a single node during its own preprocess call. Deleting a subtree which has nodes that also use preprocessing may result in a segmentation fault. This is done for performance reasons.

Reimplemented in QSGOpenVGInternalImageNode, QSGSoftwareInternalImageNode, QSGBasicInternalImageNode, QSGCurveGlyphNode, QSGDefaultGlyphNode, QSGDistanceFieldGlyphNode, QSGRhiShaderEffectNode, and SGFramebufferObjectNode.

Definition at line 122 of file qsgnode.h.

◆ previousSibling()

QSGNode * QSGNode::previousSibling ( ) const
inline

Returns the node before this in the parent's list of children.

The children are stored as a linked list.

Definition at line 108 of file qsgnode.h.

◆ removeAllChildNodes()

void QSGNode::removeAllChildNodes ( )

Removes all child nodes from this node's list of children.

Definition at line 527 of file qsgnode.cpp.

References DirtyNodeRemoved, and markDirty().

Referenced by QQuickBasicProgressBarNode::sync(), and QSGDefaultGlyphNode::updateGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeChildNode()

void QSGNode::removeChildNode ( QSGNode * node)

Removes node from this node's list of children.

Definition at line 500 of file qsgnode.cpp.

References DirtyNodeRemoved, markDirty(), next, parent(), and Q_ASSERT.

Referenced by QSGInternalTextNode::clearCursor(), reparentChildNodesTo(), QQuickWindowPrivate::updateDirtyNode(), and QQuickShapeGenericRenderer::updateNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reparentChildNodesTo()

void QSGNode::reparentChildNodesTo ( QSGNode * newParent)

Reparents all nodes of this node to newParent.

Definition at line 547 of file qsgnode.cpp.

References appendChildNode(), firstChild(), and removeChildNode().

Referenced by QQuickWindowPrivate::updateDirtyNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFlag()

◆ setFlags()

void QSGNode::setFlags ( Flags f,
bool enabled = true )

Sets the flags f on this node if enabled is true; otherwise clears the flags.

See also
flags()

Definition at line 605 of file qsgnode.cpp.

References DirtyUsePreprocess, markDirty(), Q_ASSERT, and UsePreprocess.

+ Here is the call graph for this function:

◆ type()

Friends And Related Symbol Documentation

◆ QSGBatchRenderer::Renderer

friend class QSGBatchRenderer::Renderer
friend

Definition at line 130 of file qsgnode.h.

◆ QSGNodePrivate

friend class QSGNodePrivate
friend

Definition at line 147 of file qsgnode.h.

◆ QSGRenderer

friend class QSGRenderer
friend

Definition at line 131 of file qsgnode.h.

◆ QSGRootNode

friend class QSGRootNode
friend

Definition at line 129 of file qsgnode.h.

Member Data Documentation

◆ d_ptr

QScopedPointer<QSGNodePrivate> QSGNode::d_ptr
protected

Definition at line 149 of file qsgnode.h.

Referenced by QSGNodePrivate::description(), and QSGNodePrivate::setDescription().


The documentation for this class was generated from the following files: