Class: QgsProcessingParameterMeshDatasetTime¶
- class qgis.core.QgsProcessingParameterMeshDatasetTime(name: str, description: str = '', meshLayerParameterName: str = '', datasetGroupParameterName: str = '')¶
Bases:
QgsProcessingParameterDefinition
Constructor
- Parameters
name – name of the parameter
description – description of the parameter
meshLayerParameterName – name of the associated mesh layer parameter (
QgsProcessingParameterMeshLayer
)datasetGroupParameterName – name of the associated dataset group parameter (
QgsProcessingParameterMeshDatasetGroups
)
QgsProcessingParameterMeshDatasetTime(
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
)Methods
- param outputType
- param input
- rtype
QgsProcessingParameterDefinition
Returns the name of the dataset groups parameter
- rtype
List[str]
Returns the name of the mesh layer parameter
Returns the
value
as aQgsMeshDatasetIndex
if the value has “dataset-time-step” type.Returns the
value
as a QDateTime if the value has “defined-date-time” type.- rtype
str
Returns the type name for the parameter class.
- param value
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
input (Any) –
context (
QgsProcessingContext
= None) –
- Return type
bool
- clone(self) → QgsProcessingParameterDefinition¶
- Return type
- 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 aQgsMeshDatasetIndex
if the value has “dataset-time-step” type. If the value has the wrong type return an invalid dataset indexSee also
- Parameters
value (Any) –
- Return type
- 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 QDatetimeSee also
- 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
value (Any) –
context (QgsProcessingContext) –
- 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