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
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
New 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
New 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
- 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
- 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:
value (Any) – value to convert
context (QgsProcessingContext) – processing context
- 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
New 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:
value (Any) – value to convert
context (QgsProcessingContext) – processing context
- 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
New in version 3.36.