/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/processing/qgsprocessingparametermeshdataset.h              *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/



class QgsProcessingParameterMeshDatasetGroups : QgsProcessingParameterDefinition
{
%Docstring(signature="appended")
A parameter for processing algorithms that need a list of mesh dataset
groups.

A valid value for this parameter is a list (QVariantList) of dataset
groups index in the mesh layer scope Dataset group index can be
evaluated with the method :py:func:`~valueAsDatasetGroup`

.. note::

   This parameter is dependent on a mesh layer parameter (see :py:class:`QgsProcessingParameterMeshLayer`)

.. versionadded:: 3.18
%End

%TypeHeaderCode
#include "qgsprocessingparametermeshdataset.h"
%End
  public:

    QgsProcessingParameterMeshDatasetGroups( const QString &name,
        const QString &description = QString(),
        const QString &meshLayerParameterName = QString(),
        QSet<int> supportedDataType = QSet<int>(),
        bool optional = false );
%Docstring
Constructor

:param name: name of the parameter
:param description: description of the parameter
:param meshLayerParameterName: name of the associated mesh layer
                               parameter
:param supportedDataType: a set of
                          :py:class:`QgsMeshDatasetGroupMetadata`.DataType
                          values for data types supported by the
                          parameter
:param optional: whether the parameter is optional
%End

    virtual QgsProcessingParameterDefinition *clone() const /Factory/;

    virtual QString type() const;

    virtual bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = 0 ) const;

    virtual QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const;

    virtual QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const;

    virtual QStringList dependsOnOtherParameters() const;

    virtual QVariantMap toVariantMap() const;

    virtual bool fromVariantMap( const QVariantMap &map );


    static QString typeName();
%Docstring
Returns the type name for the parameter class.
%End

    QString meshLayerParameterName() const;
%Docstring
Returns the name of the mesh layer parameter
%End

    bool isDataTypeSupported( QgsMeshDatasetGroupMetadata::DataType dataType ) const;
%Docstring
Returns whether the data type is supported by the parameter
%End

    static QList<int> valueAsDatasetGroup( const QVariant &value );
%Docstring
Returns the ``value`` as a list if dataset group indexes
%End

};


class QgsProcessingParameterMeshDatasetTime : QgsProcessingParameterDefinition
{
%Docstring(signature="appended")
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 (:py:class:`QgsProcessingParameterMeshLayer`)
   and on mesh datast group parameter (:py:class:`QgsProcessingParameterMeshDatasetGroups`)

.. versionadded:: 3.18
%End

%TypeHeaderCode
#include "qgsprocessingparametermeshdataset.h"
%End
  public:

    QgsProcessingParameterMeshDatasetTime(
      const QString &name,
      const QString &description = QString(),
      const QString &meshLayerParameterName = QString(),
      const QString &datasetGroupParameterName = QString() );
%Docstring
Constructor

:param name: name of the parameter
:param description: description of the parameter
:param meshLayerParameterName: name of the associated mesh layer
                               parameter
                               (:py:class:`QgsProcessingParameterMeshLayer`)
:param datasetGroupParameterName: name of the associated dataset group
                                  parameter
                                  (:py:class:`QgsProcessingParameterMeshDatasetGroups`)
%End

    virtual QgsProcessingParameterDefinition *clone() const /Factory/;

    virtual QString type() const;

    virtual bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = 0 ) const;

    virtual QString valueAsPythonString( const QVariant &value, QgsProcessingContext &context ) const;

    virtual QString asPythonString( QgsProcessing::PythonOutputType outputType = QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const;

    virtual QStringList dependsOnOtherParameters() const;

    virtual QVariantMap toVariantMap() const;

    virtual bool fromVariantMap( const QVariantMap &map );


    static QString typeName();
%Docstring
Returns the type name for the parameter class.
%End

    QString meshLayerParameterName() const;
%Docstring
Returns the name of the mesh layer parameter
%End

    QString datasetGroupParameterName() const;
%Docstring
Returns the name of the dataset groups parameter
%End

    static QString valueAsTimeType( const QVariant &value );
%Docstring
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
%End

    static QgsMeshDatasetIndex timeValueAsDatasetIndex( const QVariant &value );
%Docstring
Returns the ``value`` as a :py:class:`QgsMeshDatasetIndex` if the value
has "dataset-time-step" type. If the value has the wrong type return an
invalid dataset index

.. seealso:: :py:func:`valueAsTimeType`
%End

    static QDateTime timeValueAsDefinedDateTime( const QVariant &value );
%Docstring
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

.. seealso:: :py:func:`valueAsTimeType`
%End

};



/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/processing/qgsprocessingparametermeshdataset.h              *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/
