Class: QgsProcessingModelOutput

Represents a final output created by the model.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingModelOutput

Base classes

QgsProcessingModelComponent

Represents a component of a model algorithm.

class qgis.core.QgsProcessingModelOutput[source]

Bases: QgsProcessingModelComponent

__init__(name: str | None = '', description: str | None = '')

Constructor for QgsProcessingModelOutput with the specified name and description.

Parameters:
  • name (Optional[str] = '')

  • description (Optional[str] = '')

__init__(a0: QgsProcessingModelOutput)
Parameters:

a0 (QgsProcessingModelOutput)

childId(self) str[source]

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

See also

setChildId()

Return type:

str

childOutputName(self) str[source]

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

See also

setOutputName()

Return type:

str

defaultValue(self) Any[source]

Returns the default value for the model output parameter.

Added in version 3.2.

Return type:

Any

isMandatory(self) bool[source]

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()

Added in version 3.2.

Return type:

bool

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

Loads this output from a QVariantMap.

See also

toVariant()

Parameters:

map (Dict[str, Any])

Return type:

bool

name(self) str[source]

Returns the model output name.

See also

setName()

Return type:

str

setChildId(self, id: str | None)[source]

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

See also

childId()

Parameters:

id (Optional[str])

setChildOutputName(self, name: str | None)[source]

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

See also

outputName()

Parameters:

name (Optional[str])

setDefaultValue(self, value: Any)[source]

Sets the default value for the model output.

See also

defaultValue()

Added in version 3.2.

Parameters:

value (Any)

setMandatory(self, mandatory: bool)[source]

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()

Added in version 3.2.

Parameters:

mandatory (bool)

setName(self, name: str | None)[source]

Sets the model output name.

See also

name()

Parameters:

name (Optional[str])

toVariant(self) Any[source]

Saves this output to a QVariant.

See also

loadVariant()

Return type:

Any