Class: QgsProcessingParameterScale

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

Bases: QgsProcessingParameterNumber

Constructor for QgsProcessingParameterScale.

QgsProcessingParameterScale(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.

New in version 3.8.

Parameters
  • name (str) –

  • description (str = '') –

  • defaultValue (Any = None) –

  • optional

asPythonString(self, outputType: QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) → str
Parameters

outputType (QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) –

Return type

str

clone(self) → QgsProcessingParameterScale
Return type

QgsProcessingParameterScale

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

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

Parameters
  • name (str) –

  • description (str) –

  • isOptional (bool) –

  • definition (str) –

Return type

QgsProcessingParameterScale

type(self) → str
Return type

str

typeName() → str

Returns the type name for the parameter class.

Return type

str