Class: QgsProcessingParameterMeshDatasetTime

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)

Added in version 3.18.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterMeshDatasetTime

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

Methods

datasetGroupParameterName

Returns the name of the dataset groups parameter

meshLayerParameterName

Returns the name of the mesh layer parameter

Static Methods

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.

typeName

Returns the type name for the parameter class.

valueAsTimeType

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.

class qgis.core.QgsProcessingParameterMeshDatasetTime[source]

Bases: QgsProcessingParameterDefinition

__init__(name: str | None, description: str | None = '', meshLayerParameterName: str | None = '', datasetGroupParameterName: str | None = '')

Constructor

Parameters:
  • name (Optional[str]) – name of the parameter

  • description (Optional[str] = '') – description of the parameter

  • meshLayerParameterName (Optional[str] = '') – name of the associated mesh layer parameter (QgsProcessingParameterMeshLayer)

  • datasetGroupParameterName (Optional[str] = '') – name of the associated dataset group parameter (QgsProcessingParameterMeshDatasetGroups)

__init__(a0: QgsProcessingParameterMeshDatasetTime)
Parameters:

a0 (QgsProcessingParameterMeshDatasetTime)

datasetGroupParameterName(self) str[source]

Returns the name of the dataset groups parameter

Return type:

str

meshLayerParameterName(self) str[source]

Returns the name of the mesh layer parameter

Return type:

str

static timeValueAsDatasetIndex(value: Any) QgsMeshDatasetIndex[source]

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

static timeValueAsDefinedDateTime(value: Any) QDateTime[source]

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

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str

static valueAsTimeType(value: Any) str[source]

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