Class: QgsProcessingModelOutput

class qgis.core.QgsProcessingModelOutput

Bases: QgsProcessingModelComponent

Represents a final output created by the model.

New in version 3.0.

QgsProcessingModelOutput(name: str = ‘’, description: str = ‘’) Constructor for QgsProcessingModelOutput with the specified name and description.

QgsProcessingModelOutput(QgsProcessingModelOutput)

Methods

childId

Returns the child algorithm ID from which this output is generated.

childOutputName

Returns the child algorithm output name from which this output is generated.

clone

rtype

QgsProcessingModelOutput

comment

rtype

QgsProcessingModelComment

copyNonDefinitionProperties

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

defaultValue

Returns the default value for the model output parameter.

isMandatory

Returns True if the output is mandatory.

loadVariant

Loads this output from a QVariantMap.

name

Returns the model output name.

restoreCommonProperties

Restores the component properties from a QVariantMap.

saveCommonProperties

Saves the component properties to a QVariantMap.

setChildId

Sets the child algorithm id from which this output is generated.

setChildOutputName

Sets the child algorithm output name from which this output is generated.

setComment

param comment

setDefaultValue

Sets the default value for the model output.

setMandatory

Sets whether the output is mandatory.

setName

Sets the model output name.

toVariant

Saves this output to a QVariant.

childId(self) str

Returns the child algorithm ID from which this output is generated.

See also

setChildId()

Return type

str

childOutputName(self) str

Returns the child algorithm output name from which this output is generated.

See also

setOutputName()

Return type

str

clone(self) QgsProcessingModelOutput
Return type

QgsProcessingModelOutput

comment(self) QgsProcessingModelComment
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.

defaultValue(self) Any

Returns the default value for the model output parameter.

New in version 3.2.

Return type

Any

isMandatory(self) bool

Returns True if the output is mandatory. This may override the associated child algorithm’s parameter optional status - e.g. allowing an optional output from an algorithm to be mandatory within a model.

See also

setMandatory()

New in version 3.2.

Return type

bool

loadVariant(self, map: Dict[str, Any]) bool

Loads this output from a QVariantMap.

See also

toVariant()

Parameters

map (Dict[str) –

Return type

bool

name(self) str

Returns the model output name.

See also

setName()

Return type

str

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

Restores the component properties from a QVariantMap.

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

Saves the component properties to a QVariantMap.

setChildId(self, id: str)

Sets the child algorithm id from which this output is generated.

See also

childId()

Parameters

id (str) –

setChildOutputName(self, name: str)

Sets the child algorithm output name from which this output is generated.

See also

outputName()

Parameters

name (str) –

setComment(self, comment: QgsProcessingModelComment)
Parameters

comment (QgsProcessingModelComment) –

setDefaultValue(self, value: Any)

Sets the default value for the model output.

See also

defaultValue()

New in version 3.2.

Parameters

value (Any) –

setMandatory(self, mandatory: bool)

Sets whether the output is mandatory. This may override the associated child algorithm’s parameter optional status - e.g. allowing an optional output from an algorithm to be mandatory within a model.

See also

isMandatory()

New in version 3.2.

Parameters

mandatory (bool) –

setName(self, name: str)

Sets the model output name.

See also

name()

Parameters

name (str) –

toVariant(self) Any

Saves this output to a QVariant.

See also

loadVariant()

Return type

Any