Class: QgsModelChildAlgorithmGraphicItem

A graphic item representing a child algorithm in the model designer.

Warning

Not stable API

Added in version 3.14.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.gui.QgsModelChildAlgorithmGraphicItem

Base classes

QgsModelComponentGraphicItem

Base class for graphic items representing model components in the model designer.

QGraphicsObject

QObject

QGraphicsItem

Constructor

__init__

Methods

indexForInput

Returns the index for the input with the specified parameter name, or -1 if the parameter could not be matched.

indexForOutput

Returns the index for the output with the specified name, or -1 if the output could not be matched.

results

Returns the results for this child algorithm for the last model execution through the dialog.

setOutdated

Flags the algorithm as possibly being outdated (i.e. previous results are invalid due to changes elsewhere in the model).

setProgress

Sets the child's progress.

setResults

Sets the results obtained for this child algorithm for the last model execution through the dialog.

setSinkFeatureCount

Sets the feature count for the sink attached to the specified output.

setSourceFeatureCount

Sets the feature count for the source attached to the specified input.

setStarted

Flags the algorithm as having started.

Signals

rebuildConfigurationDockWidget

Requests that any associated configuration dock widget is rebuilt to reflect the current state of the child algorithm.

runFromHere

Emitted when the user opts to run the model from this child algorithm.

runSelected

Emitted when the user opts to run selected steps from the model.

showLog

Emitted when the user opts to view the previous log from this child algorithm.

showPreviousResults

Emitted when the user opts to view previous results from this child algorithm.

class qgis.gui.QgsModelChildAlgorithmGraphicItem[source]

Bases: QgsModelComponentGraphicItem

__init__(child: QgsProcessingModelChildAlgorithm | None, model: QgsProcessingModelAlgorithm | None, parent: QGraphicsItem | None)

Constructor for QgsModelChildAlgorithmGraphicItem for the specified child, with the specified parent item.

The model argument specifies the associated processing model. Ownership of model is not transferred, and it must exist for the lifetime of this object.

Ownership of child is transferred to the item.

Parameters:
indexForInput(self, parameterName: str | None) int[source]

Returns the index for the input with the specified parameter name, or -1 if the parameter could not be matched.

See also

indexForOutput()

Added in version 4.2.

Parameters:

parameterName (Optional[str])

Return type:

int

indexForOutput(self, output: str | None) int[source]

Returns the index for the output with the specified name, or -1 if the output could not be matched.

See also

indexForInput()

Added in version 4.2.

Parameters:

output (Optional[str])

Return type:

int

signal rebuildConfigurationDockWidget[source]

Requests that any associated configuration dock widget is rebuilt to reflect the current state of the child algorithm.

Added in version 4.2.

results(self) QgsProcessingModelChildAlgorithmResult[source]

Returns the results for this child algorithm for the last model execution through the dialog.

Added in version 4.0.

Return type:

QgsProcessingModelChildAlgorithmResult

signal runFromHere[source]

Emitted when the user opts to run the model from this child algorithm.

Added in version 3.38.

signal runSelected[source]

Emitted when the user opts to run selected steps from the model.

Added in version 3.38.

setOutdated(self)[source]

Flags the algorithm as possibly being outdated (i.e. previous results are invalid due to changes elsewhere in the model).

Added in version 4.2.

setProgress(self, progress: float)[source]

Sets the child’s progress.

Parameters:

progress (float)

setResults(self, results: QgsProcessingModelChildAlgorithmResult)[source]

Sets the results obtained for this child algorithm for the last model execution through the dialog.

Parameters:

results (QgsProcessingModelChildAlgorithmResult)

setSinkFeatureCount(self, outputName: str | None, featureCount: int)[source]

Sets the feature count for the sink attached to the specified output.

This can be used to dynamically update the feature count badge for the matching arrow item.

Added in version 4.2.

Parameters:
  • outputName (Optional[str])

  • featureCount (int)

setSourceFeatureCount(self, parameterName: str | None, featureCount: int)[source]

Sets the feature count for the source attached to the specified input.

This can be used to dynamically update the feature count badge for the matching arrow item.

Added in version 4.2.

Parameters:
  • parameterName (Optional[str])

  • featureCount (int)

setStarted(self)[source]

Flags the algorithm as having started.

Added in version 4.2.

signal showLog[source]

Emitted when the user opts to view the previous log from this child algorithm.

Added in version 3.38.

signal showPreviousResults[source]

Emitted when the user opts to view previous results from this child algorithm.

Added in version 3.38.