Class: QgsProcessingParameterBoolean

class qgis.core.QgsProcessingParameterBoolean(name: str, description: str = '', defaultValue: Any = None, optional: bool = False)

Bases: QgsProcessingParameterDefinition

Constructor for QgsProcessingParameterBoolean.

QgsProcessingParameterBoolean(QgsProcessingParameterBoolean)

A boolean parameter for processing algorithms.

New in version 3.0.

Parameters
  • name (str) –

  • description (str = '') –

  • defaultValue (Any = None) –

  • optional

asScriptCode(self) → str
Return type

str

clone(self) → QgsProcessingParameterDefinition
Return type

QgsProcessingParameterDefinition

fromScriptCode(name: str, description: str, isOptional: bool, definition: str) → QgsProcessingParameterBoolean

Creates a new parameter using the definition from a script code.

Parameters
  • name (str) –

  • description (str) –

  • isOptional (bool) –

  • definition (str) –

Return type

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
Return type

str