Subgroup: Processing
Class: QgsProcessingDestinationParameter¶
-
class
qgis.core.
QgsProcessingDestinationParameter
¶ Bases:
qgis._core.QgsProcessingParameterDefinition
Base class for all parameter definitions which represent file or layer destinations, e.g. parameters which are used for the destination for layers output by an algorithm.
New in version 3.0: Methods
algorithm
Returns a pointer to the algorithm which owns this parameter. asScriptCode
Returns the parameter definition encoded in a string which can be used within a Python processing script. checkValueIsAcceptable
Checks whether the specified input
value is acceptable for the parameter.clone
Creates a clone of the parameter definition. createByDefault
Returns true if the destination should be created by default. defaultFileExtension
Returns the default file extension for destination file paths associated with this parameter. defaultValue
Returns the default value for the parameter. dependsOnOtherParameters
Returns a list of other parameter names on which this parameter is dependent (e.g. description
Returns the description for the parameter. dynamicLayerParameterName
Returns the name of the parameter for a layer linked to a dynamic parameter, or an empty string if this is not set. dynamicPropertyDefinition
Returns the property definition for dynamic properties. flags
Returns any flags associated with the parameter. fromVariantMap
generateTemporaryDestination
Generates a temporary destination value for this parameter. isDestination
isDynamic
Returns true if the parameter supports is dynamic, and can support data-defined values (i.e. metadata
Returns the parameter’s freeform metadata. name
Returns the name of the parameter. provider
Returns a pointer to the provider for the algorithm which owns this parameter. setCreateByDefault
Sets whether the destination should be created by default. setDefaultValue
Sets the default value
for the parameter.setDescription
Sets the description
for the parameter.setDynamicLayerParameterName
Sets the name
for the parameter for a layer linked to a dynamic parameter, or an empty string if this is not set.setDynamicPropertyDefinition
Sets the property definition
for dynamic properties.setFlags
Sets the flags
associated with the parameter.setIsDynamic
Sets whether the parameter is dynamic
, and can support data-defined values (i.e.setMetadata
Sets the parameter’s freeform metadata
.setName
Sets the name
of the parameter.setSupportsNonFileBasedOutputs
Sets whether the destination parameter supports non filed-based outputs, such as memory layers or direct database outputs. supportsNonFileBasedOutputs
Returns true if the destination parameter supports non filed-based outputs, such as memory layers or direct database outputs. toOutputDefinition
Returns a new QgsProcessingOutputDefinition corresponding to the definition of the destination parameter. toVariantMap
toolTip
Returns a formatted tooltip for use with the parameter, which gives helpful information like parameter description, ID, and extra content like default values (depending on parameter type). type
Unique parameter type name. valueAsPythonString
Returns a string version of the parameter input value
, which is suitable for use as an input parameter value when running an algorithm directly from a Python command.Attributes
FlagAdvanced
FlagHidden
FlagOptional
-
createByDefault
(self) → bool¶ Returns true if the destination should be created by default. For optional parameters, a return value of false indicates that the destination should not be created by default.
See also
-
defaultFileExtension
(self) → str¶ Returns the default file extension for destination file paths associated with this parameter.
-
fromVariantMap
(self, map: Dict[str, Any]) → bool¶
-
generateTemporaryDestination
(self) → str¶ Generates a temporary destination value for this parameter. The returned value will be a file path or QGIS data provider URI suitable for temporary storage of created layers and files.
-
isDestination
(self) → bool¶
-
setCreateByDefault
(self, createByDefault: bool)¶ Sets whether the destination should be created by default. For optional parameters, a value of false indicates that the destination should not be created by default.
See also
-
setSupportsNonFileBasedOutputs
(self, supportsNonFileBasedOutputs: bool)¶ Sets whether the destination parameter supports non filed-based outputs, such as memory layers or direct database outputs.
See also
-
supportsNonFileBasedOutputs
(self) → bool¶ Returns true if the destination parameter supports non filed-based outputs, such as memory layers or direct database outputs.
See also
-
toOutputDefinition
(self) → QgsProcessingOutputDefinition¶ Returns a new QgsProcessingOutputDefinition corresponding to the definition of the destination parameter.
-
toVariantMap
(self) → Dict[str, Any]¶
-