Class: QgsProcessingParameterScale¶
- class qgis.core.QgsProcessingParameterScale¶
Bases:
QgsProcessingParameterNumber
A double numeric parameter for map scale values.
QgsProcessingParameterScale
should be evaluated by callingQgsProcessingAlgorithm.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
- param outputType:
- rtype:
QgsProcessingParameterScale
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.
- asPythonString(self, outputType: QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) str ¶
- Parameters:
outputType (QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) –
- Return type:
str
- clone(self) QgsProcessingParameterScale ¶
- Return type:
- 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
New in version 3.34.
- 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:
- type(self) str ¶
- Return type:
str
- typeName() str ¶
Returns the type name for the parameter class.
- Return type:
str