Class: QgsProcessingParameterDuration

class qgis.core.QgsProcessingParameterDuration

Bases: QgsProcessingParameterNumber

A double numeric parameter for duration values. The returned value will always be in milliseconds.

New in version 3.22.

QgsProcessingParameterDuration(name: str, description: str = ‘’, defaultValue: Any = None, optional: bool = False, minValue: float = -DBL_MAX+1, maxValue: float = DBL_MAX) Constructor for QgsProcessingParameterDuration.

QgsProcessingParameterDuration(QgsProcessingParameterDuration)

Methods

asPythonString

param outputType

clone

rtype

QgsProcessingParameterDuration

defaultUnit

Returns the default duration unit for the parameter.

fromVariantMap

param map

setDefaultUnit

Sets the default duration unit for the parameter.

toVariantMap

rtype

Dict[str, Any]

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) QgsProcessingParameterDuration
Return type

QgsProcessingParameterDuration

defaultUnit(self) QgsUnitTypes.TemporalUnit

Returns the default duration unit for the parameter.

See also

setDefaultUnit()

Return type

QgsUnitTypes.TemporalUnit

fromVariantMap(self, map: Dict[str, Any]) bool
Parameters

map (Dict[str) –

Return type

bool

setDefaultUnit(self, unit: QgsUnitTypes.TemporalUnit)

Sets the default duration unit for the parameter.

See also

defaultUnit()

Parameters

unit (QgsUnitTypes.TemporalUnit) –

toVariantMap(self) Dict[str, Any]
Return type

Dict[str, Any]

type(self) str
Return type

str

typeName() str

Returns the type name for the parameter class.

Return type

str