Class: QgsProcessingToolboxModelNode

class qgis.gui.QgsProcessingToolboxModelNode

Bases: PyQt5.QtCore.QObject

Abstract base class for nodes contained within a QgsProcessingToolboxModel.

Warning

Not part of stable API and may change in future QGIS releases.

Added in version 3.4:

Enums

NodeType

Bases: enum.IntEnum

Methods

addChildNode

Adds a child node to this node, transferring ownership of the node to this node.

childEvent

children

Returns a list of children belonging to the node.

connectNotify

customEvent

deleteChildren

Deletes all child nodes from this node.

disconnectNotify

getChildGroupNode

Tries to find a child node belonging to this node, which corresponds to a group node with the given group id.

isSignalConnected

nodeType

Returns the node's type.

parent

Returns the node's parent.

receivers

sender

senderSignalIndex

takeChild

Removes the specified node from this node's children, and gives ownership back to the caller.

timerEvent

class NodeType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.IntEnum

Enumeration of possible model node types

  • NodeProvider: Provider node

  • NodeGroup: Group node

  • NodeAlgorithm: Algorithm node

  • NodeRecent: Recent algorithms node

baseClass

alias of QgsProcessingToolboxModelNode

addChildNode(self, node: QgsProcessingToolboxModelNode | None)

Adds a child node to this node, transferring ownership of the node to this node.

Parameters:

node (Optional[QgsProcessingToolboxModelNode])

childEvent(self, a0: QChildEvent | None)
children(self) List[QgsProcessingToolboxModelNode]

Returns a list of children belonging to the node.

Return type:

List[QgsProcessingToolboxModelNode]

connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent | None)
deleteChildren(self)

Deletes all child nodes from this node.

disconnectNotify(self, signal: QMetaMethod)
getChildGroupNode(self, id: str | None) QgsProcessingToolboxModelGroupNode | None

Tries to find a child node belonging to this node, which corresponds to a group node with the given group id. Returns None if no matching child group node was found.

Parameters:

id (Optional[str])

Return type:

Optional[QgsProcessingToolboxModelGroupNode]

isSignalConnected(self, signal: QMetaMethod) bool
nodeType(self) QgsProcessingToolboxModelNode.NodeType

Returns the node’s type.

Return type:

QgsProcessingToolboxModelNode.NodeType

parent(self) QgsProcessingToolboxModelNode | None

Returns the node’s parent. If the node’s parent is None, then the node is a root node.

Return type:

Optional[QgsProcessingToolboxModelNode]

receivers(self, signal: PYQT_SIGNAL) int
sender(self) QObject | None
senderSignalIndex(self) int
takeChild(self, node: QgsProcessingToolboxModelNode | None) QgsProcessingToolboxModelNode | None

Removes the specified node from this node’s children, and gives ownership back to the caller.

Parameters:

node (Optional[QgsProcessingToolboxModelNode])

Return type:

Optional[QgsProcessingToolboxModelNode]

timerEvent(self, a0: QTimerEvent | None)