Class: QgsProcessingParameterEnum¶
-
class
qgis.core.
QgsProcessingParameterEnum
(name: str, description: str = '', options: Iterable[str] = [], allowMultiple: bool = False, defaultValue: Any = None, optional: bool = False)¶ Bases:
qgis._core.QgsProcessingParameterDefinition
Constructor for QgsProcessingParameterEnum.
QgsProcessingParameterEnum(QgsProcessingParameterEnum)
An enum based parameter for processing algorithms, allowing for selection from predefined values.
New in version 3.0: Enums
Methods
Returns
True
if the parameter allows multiple selected values.Creates a new parameter using the definition from a script code.
Returns the list of acceptable options for the parameter.
Sets whether the parameter allows multiple selected values.
Sets the list of acceptable
options
for the parameter.Returns the type name for the parameter class.
Signals
Attributes
-
allowMultiple
(self) → bool¶ Returns
True
if the parameter allows multiple selected values.See also
-
asPythonString
(self, outputType: QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) → str¶
-
asScriptCode
(self) → str¶
-
checkValueIsAcceptable
(self, input: Any, context: QgsProcessingContext = None) → bool¶
-
clone
(self) → QgsProcessingParameterDefinition¶
-
fromScriptCode
(name: str, description: str, isOptional: bool, definition: str) → QgsProcessingParameterEnum¶ Creates a new parameter using the definition from a script code.
-
fromVariantMap
(self, map: Dict[str, Any]) → bool¶
-
options
(self) → List[str]¶ Returns the list of acceptable options for the parameter.
See also
-
setAllowMultiple
(self, allowMultiple: bool)¶ Sets whether the parameter allows multiple selected values.
See also
-
setOptions
(self, options: Iterable[str])¶ Sets the list of acceptable
options
for the parameter.See also
-
toVariantMap
(self) → Dict[str, Any]¶
-
type
(self) → str¶
-
typeName
() → str¶ Returns the type name for the parameter class.
-
valueAsPythonString
(self, value: Any, context: QgsProcessingContext) → str¶
-