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: Optional[str], description: Optional[str] = ‘’) Constructor for QgsProcessingOutputDefinition.
QgsProcessingOutputDefinition(a0:
QgsProcessingOutputDefinition
)Methods
Returns
True
if the output was automatically created when adding a parameter.Returns the description for the output.
Returns the name of the output.
Sets whether an output was automatically created when adding a parameter.
Sets the
description
for the output.Sets the
name
of the output.Unique output type name.
Returns a HTML string version of the parameter output
value
(if possible).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
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
- 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
- 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
Added in version 3.14.
- setDescription(self, description: str | None)¶
Sets the
description
for the output. This is the user-visible string used to identify this output.See also
- Parameters:
description (Optional[str])
- setName(self, name: str | None)¶
Sets the
name
of the output. This is the internal identifier by which algorithms access this output.See also
- Parameters:
name (Optional[str])
- type(self) str ¶
Unique output type name.
- Return type:
str
- valueAsFormattedString(self, value: Any, context: QgsProcessingContext)¶
Returns a HTML string version of the parameter output
value
(if possible).By default this will return the same value as
valueAsString()
.- Parameters:
value (Any) – value to convert
context (
QgsProcessingContext
) -> (str) – processing context
- Returns:
value converted to string
ok: will be set to
True
if value could be represented as a string.
See also
Added in version 3.36.
- valueAsString(self, value: Any, context: QgsProcessingContext)¶
Returns a string version of the parameter output
value
(if possible).- Parameters:
value (Any) – value to convert
context (
QgsProcessingContext
) -> (str) – processing context
- Returns:
value converted to string
ok: will be set to
True
if value could be represented as a string.
See also
Added in version 3.36.