Class: QgsProcessingParameterBoolean¶
- class qgis.core.QgsProcessingParameterBoolean¶
Bases:
QgsProcessingParameterDefinition
A boolean parameter for processing algorithms.
Added in version 3.0.
QgsProcessingParameterBoolean(name: Optional[str], description: Optional[str] = ‘’, defaultValue: Any = None, optional: bool = False) Constructor for QgsProcessingParameterBoolean.
QgsProcessingParameterBoolean(a0:
QgsProcessingParameterBoolean
)Methods
- rtype:
str
- rtype:
Optional[QgsProcessingParameterDefinition]
Default gui value for an algorithm parameter from settings
Creates a new parameter using the definition from a script code.
- rtype:
str
Returns the type name for the parameter class.
- param value:
- asScriptCode(self) str ¶
- Return type:
str
- clone(self) QgsProcessingParameterDefinition | None ¶
- Return type:
Optional[QgsProcessingParameterDefinition]
- defaultGuiValueFromSetting(self) Any ¶
Default gui value for an algorithm parameter from settings
- Returns:
default value from settings or invalid QVariant if there is no default value defined in the settings
Added in version 3.34.
- fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterBoolean | None ¶
Creates a new parameter using the definition from a script code.
- Parameters:
name (Optional[str])
description (Optional[str])
isOptional (bool)
definition (Optional[str])
- Return type:
Optional[QgsProcessingParameterBoolean]
- type(self) str ¶
- Return type:
str
- typeName() str ¶
Returns the type name for the parameter class.
- Return type:
str
- valueAsPythonString(self, value: Any, context: QgsProcessingContext) str ¶
- Parameters:
value (Any)
context (QgsProcessingContext)
- Return type:
str