Class: QgsProcessingParameterType¶
-
class
qgis.core.
QgsProcessingParameterType
¶ Bases:
sip.wrapper
Makes metadata of processing parameters available.
New in version 3.2: Enums
Methods
Returns a list of the Python data types accepted as values for the parameter.
Returns a descriptive list of the possible string values acceptable for the parameter.
Returns the corresponding class name for the parameter type.
Creates a new parameter of this type.
A human readable and translatable description for this parameter type.
Determines if this parameter is available in the modeler.
A static id for this type which will be used for storing this parameter type.
Metadata for this parameter type.
A human readable and translatable short name for this parameter type.
Returns a valid Python import string for importing the corresponding parameter type, e.g.
Signals
Attributes
-
ExposeToModeler
= 1¶
-
class
ParameterFlag
¶ Bases:
int
-
class
ParameterFlags
¶ Bases:
sip.wrapper
QgsProcessingParameterType.ParameterFlags(Union[QgsProcessingParameterType.ParameterFlags, QgsProcessingParameterType.ParameterFlag]) QgsProcessingParameterType.ParameterFlags(QgsProcessingParameterType.ParameterFlags)
-
acceptedPythonTypes
(self) → List[str]¶ Returns a list of the Python data types accepted as values for the parameter. E.g. “str”, “
QgsVectorLayer
”, “QgsMapLayer
”, etc.These values should should match the Python types exactly (e.g. “str” not “string”, “bool” not “boolean”). Extra explanatory help can be used (which must be translated), eg “str: as comma delimited list of numbers”.
See also
-
acceptedStringValues
(self) → List[str]¶ Returns a descriptive list of the possible string values acceptable for the parameter.
E.g. for a QgsProcessingParameterVectorLayer this may include “Path to a vector layer”, for
QgsProcessingParameterBoolean
“1 for true, 0 for false” etc.Extra explanatory help can be used (which must be translated), eg “a comma delimited list of numbers”.
See also
New in version 3.8.
-
className
(self) → str¶ Returns the corresponding class name for the parameter type.
See also
New in version 3.6.
-
create
(self, name: str) → QgsProcessingParameterDefinition¶ Creates a new parameter of this type.
-
description
(self) → str¶ A human readable and translatable description for this parameter type. This can be a longer description suitable for tooltips and other elements that give the user context for a given parameter.
-
flags
(self) → QgsProcessingParameterType.ParameterFlags¶ Determines if this parameter is available in the modeler. The default implementation returns
True
.
-
id
(self) → str¶ A static id for this type which will be used for storing this parameter type.
-
metadata
(self) → Dict[str, Any]¶ Metadata for this parameter type. Can be used for example to define custom widgets. The default implementation returns an empty map.
-
name
(self) → str¶ A human readable and translatable short name for this parameter type. This will be used in comboboxes and list widgets.
-
pythonImportString
(self) → str¶ Returns a valid Python import string for importing the corresponding parameter type, e.g. “from qgis.core import
QgsProcessingParameterBoolean
”.See also
New in version 3.6.
-