Class: QgsProcessingModelComponent¶
- class qgis.core.QgsProcessingModelComponent¶
Bases:
sip.wrapper
Represents a component of a model algorithm.
QgsProcessingModelComponent(description: str = ‘’) Only subclasses can be created
QgsProcessingModelComponent(other:
QgsProcessingModelComponent
) Copies are protected to avoid slicingMethods
Clones the component.
Returns the color of the model component within the model designer.
Returns the comment attached to this component (may be
None
)Copies all non-specific definition properties from the
other
component definition.Returns the friendly description text for the component.
Returns
True
if the link points for the specifiededge
should be shown collapsed or not.Returns the position of the model component within the model designer.
Restores the component properties from a QVariantMap.
Saves the component properties to a QVariantMap.
Sets the
color
of the model component within the model designer.Sets the
comment
attached to this component.Sets the friendly
description
text for the component.Sets whether the link points for the specified
edge
for this component should be shown collapsed in the model designer.Sets the
position
of the model component within the model designer.Sets the
size
of the model component within the model designer.Returns the size of the model component within the model designer.
- clone(self) QgsProcessingModelComponent ¶
Clones the component.
Ownership is transferred to the caller.
- Return type:
- color(self) QColor ¶
Returns the color of the model component within the model designer.
An invalid color indicates that the default color for the component should be used.
See also
New in version 3.14.
- Return type:
QColor
- comment(self) QgsProcessingModelComment ¶
Returns the comment attached to this component (may be
None
)See also
- Return type:
- 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
- Return type:
str
- linksCollapsed(self, edge: Qt.Edge) bool ¶
Returns
True
if the link points for the specifiededge
should be shown collapsed or not.See also
- Parameters:
edge (Qt.Edge) –
- Return type:
bool
- position(self) QPointF ¶
Returns the position of the model component within the model designer.
See also
- Return type:
QPointF
- restoreCommonProperties(self, map: Dict[str, Any])¶
Restores the component properties from a QVariantMap.
See also
- Parameters:
map (Dict[str) –
- saveCommonProperties(self, map: Dict[str, Any])¶
Saves the component properties to a QVariantMap.
See also
- Parameters:
map (Dict[str) –
- setColor(self, color: QColor | Qt.GlobalColor | QGradient)¶
Sets the
color
of the model component within the model designer. An invalidcolor
indicates that the default color for the component should be used.See also
New in version 3.14.
- Parameters:
color (Union[QColor) –
- setComment(self, comment: QgsProcessingModelComment)¶
Sets the
comment
attached to this component.See also
- Parameters:
comment (QgsProcessingModelComment) –
- setDescription(self, description: str)¶
Sets the friendly
description
text for the component.See also
- 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 model designer.See also
- Parameters:
edge (Qt.Edge) –
collapsed (bool) –
- setPosition(self, position: QPointF | QPoint)¶
Sets the
position
of the model component within the model designer.See also
- Parameters:
position (Union[QPointF) –
- setSize(self, size: QSizeF)¶
Sets the
size
of the model component within the model designer.See also
New in version 3.14.
- Parameters:
size (QSizeF) –