Class: QgsProcessingOutputDefinition

class qgis.core.QgsProcessingOutputDefinition

Bases: sip.wrapper

Base class for the definition of processing outputs.

Output definitions encapsulate the properties regarding the outputs from algorithms, such as generated layers or calculated values.

QgsProcessingOutputDefinition(name: str, description: str = ‘’) Constructor for QgsProcessingOutputDefinition.

QgsProcessingOutputDefinition(QgsProcessingOutputDefinition)

Methods

autoCreated

Returns True if the output was automatically created when adding a parameter.

description

Returns the description for the output.

name

Returns the name of the output.

setAutoCreated

Sets whether an output was automatically created when adding a parameter.

setDescription

Sets the description for the output.

setName

Sets the name of the output.

type

Unique output type name.

valueAsFormattedString

Returns a HTML string version of the parameter output value (if possible).

valueAsString

Returns a string version of the parameter output value (if possible).

autoCreated(self) bool

Returns True if the output was automatically created when adding a parameter.

See also

setAutoCreated()

Added in version 3.14.

Return type:

bool

description(self) str

Returns the description for the output. This is the user-visible string used to identify this output.

See also

setDescription()

Return type:

str

name(self) str

Returns the name of the output. This is the internal identifier by which algorithms access this output.

See also

setName()

Return type:

str

setAutoCreated(self, autoCreated: bool)

Sets whether an output was automatically created when adding a parameter.

Parameters:

autoCreated (bool) – set to True if the output is to be considered as automatically created.

See also

autoCreated()

Added in version 3.14.

setDescription(self, description: str)

Sets the description for the output. This is the user-visible string used to identify this output.

See also

description()

Parameters:

description (str)

setName(self, name: str)

Sets the name of the output. This is the internal identifier by which algorithms access this output.

See also

name()

Parameters:

name (str)

type(self) str

Unique output type name.

Return type:

str

valueAsFormattedString(self, value: Any, context: QgsProcessingContext) Tuple[str, bool]

Returns a HTML string version of the parameter output value (if possible).

By default this will return the same value as valueAsString().

Parameters:
Return type:

Tuple[str, bool]

Returns:

  • value converted to string

  • ok: will be set to True if value could be represented as a string.

See also

valueAsString()

Added in version 3.36.

valueAsString(self, value: Any, context: QgsProcessingContext) Tuple[str, bool]

Returns a string version of the parameter output value (if possible).

Parameters:
Return type:

Tuple[str, bool]

Returns:

  • value converted to string

  • ok: will be set to True if value could be represented as a string.

Added in version 3.36.