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.Added in version 3.8.
QgsProcessingParameterScale(name: Optional[str], description: Optional[str] = ‘’, defaultValue: Any = None, optional: bool = False) Constructor for QgsProcessingParameterScale.
QgsProcessingParameterScale(a0:
QgsProcessingParameterScale
)Methods
- param outputType:
- rtype:
Optional[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 | None ¶
- Return type:
Optional[QgsProcessingParameterScale]
- 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
Added in version 3.34.
- fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterScale | None ¶
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]
- type(self) str ¶
- Return type:
str
- typeName() str ¶
Returns the type name for the parameter class.
- Return type:
str