Class: QgsProcessingParameterScale

A double numeric parameter for map scale values.

QgsProcessingParameterScale should be evaluated by calling QgsProcessingAlgorithm.parameterAsDouble(), which will return a numeric value representing the scale denominator.

Added in version 3.8.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterScale

Base classes

QgsProcessingParameterNumber

A numeric parameter for processing algorithms.

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

Static Methods

fromScriptCode

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

class qgis.core.QgsProcessingParameterScale[source]

Bases: QgsProcessingParameterNumber

__init__(name: str | None, description: str | None = '', defaultValue: Any = None, optional: bool = False)

Constructor for QgsProcessingParameterScale.

Parameters:
  • name (Optional[str])

  • description (Optional[str] = '')

  • defaultValue (Any = None)

  • optional (bool = False)

__init__(a0: QgsProcessingParameterScale)
Parameters:

a0 (QgsProcessingParameterScale)

static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterScale | None[source]

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[QgsProcessingParameterScale]