Class: QgsProcessingParameterScale

class qgis.core.QgsProcessingParameterScale

Bases: QgsProcessingParameterNumber

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.

QgsProcessingParameterScale(name: str, description: str = ‘’, defaultValue: Any = None, optional: bool = False) Constructor for QgsProcessingParameterScale.

QgsProcessingParameterScale(QgsProcessingParameterScale)

Methods

asPythonString

param outputType

clone

rtype

QgsProcessingParameterScale

fromScriptCode

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

type

rtype

str

typeName

Returns the type name for the parameter class.

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