Class: QgsProcessingParameterMeshDatasetTime

class qgis.core.QgsProcessingParameterMeshDatasetTime

Bases: QgsProcessingParameterDefinition

A parameter for processing algorithms that need a list of mesh dataset index from time parameter.

A valid value for this parameter is a map (QVariantMap) with in this form:

  • “type” : the type of time settings “current-context-time”, “defined-date-time”, “dataset-time-step” or “none” if all the dataset groups are static

  • “value” : nothing if type is “static” or “current-context-time”, QDateTime if “defined-date-time” or, for “dataset_time_step”, list of two int representing the dataset index that is the reference for the time step

Note

This parameter is dependent on a mesh layer parameter (QgsProcessingParameterMeshLayer) and on mesh datast group parameter (QgsProcessingParameterMeshDatasetGroups)

New in version 3.18.

QgsProcessingParameterMeshDatasetTime(name: str, description: str = ‘’, meshLayerParameterName: str = ‘’, datasetGroupParameterName: str = ‘’) Constructor

Parameters

QgsProcessingParameterMeshDatasetTime(QgsProcessingParameterMeshDatasetTime)

Methods

asPythonString

param outputType

checkValueIsAcceptable

param input

clone

rtype

QgsProcessingParameterDefinition

datasetGroupParameterName

Returns the name of the dataset groups parameter

dependsOnOtherParameters

rtype

List[str]

meshLayerParameterName

Returns the name of the mesh layer parameter

timeValueAsDatasetIndex

Returns the value as a QgsMeshDatasetIndex if the value has "dataset-time-step" type.

timeValueAsDefinedDateTime

Returns the value as a QDateTime if the value has "defined-date-time" type.

type

rtype

str

typeName

Returns the type name for the parameter class.

valueAsPythonString

param value

valueAsTimeType

Returns the dataset value time type as a string : current-context-time : the time is store in the processing context (e.g.

asPythonString(self, outputType: QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) str
Parameters

outputType (QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) –

Return type

str

checkValueIsAcceptable(self, input: Any, context: QgsProcessingContext = None) bool
Parameters
Return type

bool

clone(self) QgsProcessingParameterDefinition
Return type

QgsProcessingParameterDefinition

datasetGroupParameterName(self) str

Returns the name of the dataset groups parameter

Return type

str

dependsOnOtherParameters(self) List[str]
Return type

List[str]

meshLayerParameterName(self) str

Returns the name of the mesh layer parameter

Return type

str

timeValueAsDatasetIndex(value: Any) QgsMeshDatasetIndex

Returns the value as a QgsMeshDatasetIndex if the value has “dataset-time-step” type. If the value has the wrong type return an invalid dataset index

Parameters

value (Any) –

Return type

QgsMeshDatasetIndex

timeValueAsDefinedDateTime(value: Any) QDateTime

Returns the value as a QDateTime if the value has “defined-date-time” type. If the value has the wrong type return an invalid QDatetime

Parameters

value (Any) –

Return type

QDateTime

type(self) str
Return type

str

typeName() str

Returns the type name for the parameter class.

Return type

str

valueAsPythonString(self, value: Any, context: QgsProcessingContext) str
Parameters
Return type

str

valueAsTimeType(value: Any) str

Returns the dataset value time type as a string : current-context-time : the time is store in the processing context (e.g. current canvas time), in this case the value does not contain any time value defined-date-time : absolute time of type QDateTime dataset-time-step : a time step of existing dataset, in this case the time takes the form of a QMeshDatasetIndex with value to the corresponding dataset index static : dataset groups are all static, in this case the value does not contain any time value

Parameters

value (Any) –

Return type

str