Class: QgsProcessingModelComponent

class qgis.core.QgsProcessingModelComponent(description: str = '')

Bases: sip.wrapper

Only subclasses can be created

QgsProcessingModelComponent(other: QgsProcessingModelComponent) Copies are protected to avoid slicing

Represents a component of a model algorithm.

New in version 3.0.

Parameters

description

clone(self)QgsProcessingModelComponent

Clones the component.

Ownership is transferred to the caller.

Return type

QgsProcessingModelComponent

comment(self)QgsProcessingModelComment

Returns the comment attached to this component (may be None)

See also

setComment()

Return type

QgsProcessingModelComment

copyNonDefinitionProperties(self, other: QgsProcessingModelComponent)

Copies all non-specific definition properties from the other component definition.

This includes properties like the size and position of the component, but not properties like the specific algorithm or input details.

New in version 3.14.

Parameters

other (QgsProcessingModelComponent) –

description(self) → str

Returns the friendly description text for the component.

See also

setDescription()

Return type

str

linksCollapsed(self, edge: Qt.Edge) → bool

Returns True if the link points for the specified edge should be shown collapsed or not.

Parameters

edge (Qt.Edge) –

Return type

bool

position(self) → QPointF

Returns the position of the model component within the graphical modeler.

See also

setPosition()

Return type

QPointF

restoreCommonProperties(self, map: Dict[str, Any])

Restores the component properties from a QVariantMap.

Parameters

map (Dict[str) –

saveCommonProperties(self, map: Dict[str, Any])

Saves the component properties to a QVariantMap.

Parameters

map (Dict[str) –

setComment(self, comment: QgsProcessingModelComment)

Sets the comment attached to this component.

See also

comment()

Parameters

comment (QgsProcessingModelComment) –

setDescription(self, description: str)

Sets the friendly description text for the component.

See also

description()

Parameters

description (str) –

setLinksCollapsed(self, edge: Qt.Edge, collapsed: bool)

Sets whether the link points for the specified edge for this component should be shown collapsed in the graphical modeler.

See also

linksCollapsed()

Parameters
  • edge (Qt.Edge) –

  • collapsed (bool) –

setPosition(self, position: Union[QPointF, QPoint])

Sets the position of the model component within the graphical modeler.

See also

position()

Parameters

position (Union[QPointF) –

setSize(self, size: QSizeF)

Sets the size of the model component within the graphical modeler.

See also

size()

New in version 3.14.

Parameters

size (QSizeF) –

size(self) → QSizeF

Returns the size of the model component within the graphical modeler.

See also

setSize()

New in version 3.14.

Return type

QSizeF