Class: QgsProcessingParameterRange

A numeric range parameter for processing algorithms.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterRange

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

Methods

dataType

Returns the acceptable data type for the range.

setDataType

Sets the acceptable data type for the range.

Static Methods

fromScriptCode

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

typeName

Returns the type name for the parameter class.

class qgis.core.QgsProcessingParameterRange[source]

Bases: QgsProcessingParameterDefinition

__init__(name: str | None, description: str | None = '', type: Qgis.ProcessingNumberParameterType = Qgis.ProcessingNumberParameterType.Integer, defaultValue: Any = None, optional: bool = False)

Constructor for QgsProcessingParameterRange.

Parameters:
  • name (Optional[str])

  • description (Optional[str] = '')

  • type (Qgis.ProcessingNumberParameterType = Qgis.ProcessingNumberParameterType.Integer)

  • defaultValue (Any = None)

  • optional (bool = False)

__init__(a0: QgsProcessingParameterRange)
Parameters:

a0 (QgsProcessingParameterRange)

dataType(self) Qgis.ProcessingNumberParameterType[source]

Returns the acceptable data type for the range.

See also

setDataType()

Return type:

Qgis.ProcessingNumberParameterType

static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterRange | 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[QgsProcessingParameterRange]

setDataType(self, dataType: Qgis.ProcessingNumberParameterType)[source]

Sets the acceptable data type for the range.

See also

dataType()

Parameters:

dataType (Qgis.ProcessingNumberParameterType)

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str