16#ifndef QGSPROCESSINGPARAMETERMESHDATASET_H
17#define QGSPROCESSINGPARAMETERMESHDATASET_H
26using namespace Qt::StringLiterals;
55 QString
type() const override;
64 static QString
typeName() {
return u
"meshdatasetgroups"_s; }
76 QString mMeshLayerParameterName;
77 QSet<int> mSupportedDataType;
79 static bool valueIsAcceptable(
const QVariant &input,
bool allowEmpty );
96 QString
description()
const override {
return QCoreApplication::translate(
"Processing",
"An input allowing selection dataset groups from a mesh layer" ); }
98 QString
name()
const override {
return QCoreApplication::translate(
"Processing",
"Mesh Dataset Groups" ); }
102 QString pythonImportString()
const override {
return u
"from qgis.core import QgsProcessingParameterMeshDatasetGroups"_s; }
104 QString className()
const override {
return u
"QgsProcessingParameterMeshDatasetGroups"_s; }
106 QStringList acceptedPythonTypes()
const override {
return QStringList() << QObject::tr(
"list[int]: list of dataset group indexes, see QgsProcessingParameterMeshDatasetGroups docs" ); }
108 QStringList acceptedParameterTypes()
const override
157 static QString
typeName() {
return u
"meshdatasettime"_s; }
191 QString mMeshLayerParameterName;
192 QString mDatasetGroupParameterName;
194 static bool valueIsAcceptable(
const QVariant &input,
bool allowEmpty );
211 QString
description()
const override {
return QCoreApplication::translate(
"Processing",
"An input allowing selection of dataset index from a mesh layer by time setting" ); }
213 QString
name()
const override {
return QCoreApplication::translate(
"Processing",
"Mesh Dataset Time" ); }
217 QString pythonImportString()
const override {
return u
"from qgis.core import QgsProcessingParameterMeshDatasetTime"_s; }
219 QString className()
const override {
return u
"QgsProcessingParameterMeshDatasetTime"_s; }
221 QStringList acceptedPythonTypes()
const override {
return QStringList() << QObject::tr(
"dict{}: dictionary, see QgsProcessingParameterMeshDatasetTime docs" ); }
223 QStringList acceptedParameterTypes()
const override
An index that identifies the dataset group (e.g.
Contains information about the context in which a processing algorithm is executed.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the output class.
static QString typeName()
Returns the type name for the parameter class.
Base class for the definition of processing parameters.
QString description() const
Returns the description for the parameter.
QgsProcessingParameterDefinition(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, const QString &help=QString())
Constructor for QgsProcessingParameterDefinition.
QString name() const
Returns the name of the parameter.
A parameter for processing algorithms that need a list of mesh dataset groups.
QgsProcessingParameterMeshDatasetGroups(const QString &name, const QString &description=QString(), const QString &meshLayerParameterName=QString(), QSet< int > supportedDataType=QSet< int >(), bool optional=false)
Constructor.
static QString typeName()
Returns the type name for the parameter class.
static QList< int > valueAsDatasetGroup(const QVariant &value)
Returns the value as a list if dataset group indexes.
QStringList dependsOnOtherParameters() const override
Returns a list of other parameter names on which this parameter is dependent (e.g.
QString valueAsPythonString(const QVariant &value, QgsProcessingContext &context) const override
Returns a string version of the parameter input value, which is suitable for use as an input paramete...
QgsProcessingParameterDefinition * clone() const override
Creates a clone of the parameter definition.
bool checkValueIsAcceptable(const QVariant &input, QgsProcessingContext *context=nullptr) const override
Checks whether the specified input value is acceptable for the parameter.
QString type() const override
Unique parameter type name.
bool fromVariantMap(const QVariantMap &map) override
Restores this parameter to a QVariantMap.
QString meshLayerParameterName() const
Returns the name of the mesh layer parameter.
QString asPythonString(QgsProcessing::PythonOutputType outputType=QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass) const override
Returns the parameter definition as a Python command which can be used within a Python Processing scr...
QVariantMap toVariantMap() const override
Saves this parameter to a QVariantMap.
bool isDataTypeSupported(QgsMeshDatasetGroupMetadata::DataType dataType) const
Returns whether the data type is supported by the parameter.
A parameter for processing algorithms that need a list of mesh dataset index from time parameter.
QString asPythonString(QgsProcessing::PythonOutputType outputType=QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass) const override
Returns the parameter definition as a Python command which can be used within a Python Processing scr...
QgsProcessingParameterMeshDatasetTime(const QString &name, const QString &description=QString(), const QString &meshLayerParameterName=QString(), const QString &datasetGroupParameterName=QString())
Constructor.
QString valueAsPythonString(const QVariant &value, QgsProcessingContext &context) const override
Returns a string version of the parameter input value, which is suitable for use as an input paramete...
QgsProcessingParameterDefinition * clone() const override
Creates a clone of the parameter definition.
static QString valueAsTimeType(const QVariant &value)
Returns the dataset value time type as a string : current-context-time : the time is store in the pro...
bool fromVariantMap(const QVariantMap &map) override
Restores this parameter to a QVariantMap.
QString datasetGroupParameterName() const
Returns the name of the dataset groups parameter.
QString meshLayerParameterName() const
Returns the name of the mesh layer parameter.
static QgsMeshDatasetIndex timeValueAsDatasetIndex(const QVariant &value)
Returns the value as a QgsMeshDatasetIndex if the value has "dataset-time-step" type.
QVariantMap toVariantMap() const override
Saves this parameter to a QVariantMap.
QStringList dependsOnOtherParameters() const override
Returns a list of other parameter names on which this parameter is dependent (e.g.
static QString typeName()
Returns the type name for the parameter class.
bool checkValueIsAcceptable(const QVariant &input, QgsProcessingContext *context=nullptr) const override
Checks whether the specified input value is acceptable for the parameter.
static QDateTime timeValueAsDefinedDateTime(const QVariant &value)
Returns the value as a QDateTime if the value has "defined-date-time" type.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
Makes metadata of processing parameters available.
Contains enumerations and other constants for use in processing algorithms and parameters.