Class: QgsProcessingParameterType¶
Makes metadata of processing parameters available.
Added in version 3.2.
Enums
alias of |
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. "from qgis.core import |
- class qgis.core.QgsProcessingParameterType[source]¶
Bases:
object- ParameterFlag¶
alias of
ProcessingParameterTypeFlag
- ParameterFlags¶
alias of
ProcessingParameterTypeFlags
- acceptedPythonTypes(self) List[str][source]¶
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
- Return type:
List[str]
- acceptedStringValues(self) List[str][source]¶
Returns a descriptive list of the possible string values acceptable for the parameter.
E.g. for a
QgsProcessingParameterVectorLayerthis may include “Path to a vector layer”, forQgsProcessingParameterBoolean“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
Added in version 3.8.
- Return type:
List[str]
- className(self) str[source]¶
Returns the corresponding class name for the parameter type.
See also
Added in version 3.6.
- Return type:
str
- create(self, name: str | None) QgsProcessingParameterDefinition | None[source]¶
Creates a new parameter of this type.
- Parameters:
name (Optional[str])
- Return type:
Optional[QgsProcessingParameterDefinition]
- description(self) str[source]¶
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.
- Return type:
str
- flags(self) Qgis.ProcessingParameterTypeFlags[source]¶
Determines if this parameter is available in the modeler. The default implementation returns
True.- Return type:
- id(self) str[source]¶
A static id for this type which will be used for storing this parameter type.
- Return type:
str
- metadata(self) Dict[str, Any][source]¶
Metadata for this parameter type. Can be used for example to define custom widgets. The default implementation returns an empty map.
- Return type:
Dict[str, Any]
- name(self) str[source]¶
A human readable and translatable short name for this parameter type. This will be used in comboboxes and list widgets.
- Return type:
str
- pythonImportString(self) str[source]¶
Returns a valid Python import string for importing the corresponding parameter type, e.g. “from qgis.core import
QgsProcessingParameterBoolean”.See also
Added in version 3.6.
- Return type:
str