16#ifndef QGSPROCESSINGMESHDATASETWIDGET_H
17#define QGSPROCESSINGMESHDATASETWIDGET_H
25#include "ui_qgsprocessingmeshdatasettimewidget.h"
31class GUI_EXPORT QgsProcessingMeshDatasetGroupsWidget :
public QWidget
42 void setMeshLayer(
QgsMeshLayer *layer,
bool layerFromProject =
false );
43 void setValue(
const QVariant &value );
44 QVariant value()
const;
51 void selectCurrentActiveDatasetGroup();
57 QPointer<QLineEdit> mLineEdit;
58 QPointer<QToolButton> mToolButton;
59 QPointer<QAction> mActionCurrentActiveDatasetGroups;
60 QPointer<QAction> mActionAvailableDatasetGroups;
62 QMap<int, QString> mDatasetGroupsNames;
64 QStringList datasetGroupsNames();
65 void updateSummaryText();
67 friend class TestProcessingGui;
79 QString parameterType()
const override;
86 void postInitialize(
const QList<QgsAbstractProcessingParameterWidgetWrapper *> &wrappers )
override;
92 QStringList compatibleParameterTypes()
const override;
93 QStringList compatibleOutputTypes()
const override;
94 QWidget *createWidget()
override;
96 QVariant widgetValue()
const override;
99 QgsProcessingMeshDatasetGroupsWidget *mWidget =
nullptr;
101 friend class TestProcessingGui;
114 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
117 QComboBox *mParentLayerComboBox =
nullptr;
120class GUI_EXPORT QgsProcessingMeshDatasetTimeWidget :
public QWidget,
private Ui::QgsProcessingMeshDatasetTimeWidgetBase
125 QgsProcessingMeshDatasetTimeWidget( QWidget *parent =
nullptr,
134 void setMeshLayer(
QgsMeshLayer *layer,
bool layerFromProject =
false );
135 void setDatasetGroupIndexes(
const QList<int> datasetGroupIndexes );
137 void setValue(
const QVariant &value );
138 QVariant value()
const;
151 QLineEdit *mLineEdit =
nullptr;
152 QToolButton *mToolButton =
nullptr;
154 QList<int> mDatasetGroupIndexes;
155 QDateTime mReferenceTime;
157 void populateTimeSteps();
158 bool hasTemporalDataset()
const;
160 void populateTimeStepsFromLayer();
163 QMap<int, QList<qint64>> mDatasetTimeSteps;
168 friend class TestProcessingGui;
179 QString parameterType()
const override;
181 void postInitialize(
const QList<QgsAbstractProcessingParameterWidgetWrapper *> &wrappers )
override;
195 QStringList compatibleParameterTypes()
const override;
196 QStringList compatibleOutputTypes()
const override;
197 QWidget *createWidget()
override;
199 QVariant widgetValue()
const override;
202 QgsProcessingMeshDatasetTimeWidget *mWidget =
nullptr;
203 std::unique_ptr<QgsMeshLayer> mTemporarytMeshLayer;
204 friend class TestProcessingGui;
217 QgsProcessingParameterDefinition *createParameter(
const QString &name,
const QString &description, QgsProcessingParameterDefinition::Flags flags )
const override;
220 QComboBox *mParentDatasetComboBox =
nullptr;
221 QString mMeshLayerParameterName;
Map canvas is a class for displaying all GIS data types on a canvas.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Abstract base class for processing algorithms.
Contains information about the context in which a processing algorithm is executed.
WidgetType
Types of dialogs which Processing widgets can be created for.
@ Standard
Standard algorithm dialog.
Base class for the definition of processing parameters.
A parameter for processing algorithms that need a list of mesh dataset groups.
A parameter for processing algorithms that need a list of mesh dataset index from time parameter.
Contains settings which reflect the context in which a Processing parameter widget is shown,...
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into allowing algorithms to be written in pure substantial changes are required in order to port existing x Processing algorithms for QGIS x The most significant changes are outlined not GeoAlgorithm For algorithms which operate on features one by consider subclassing the QgsProcessingFeatureBasedAlgorithm class This class allows much of the boilerplate code for looping over features from a vector layer to be bypassed and instead requires implementation of a processFeature method Ensure that your algorithm(or algorithm 's parent class) implements the new pure virtual createInstance(self) call