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;
78 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 QComboBox *mParentLayerComboBox =
nullptr;
117class GUI_EXPORT QgsProcessingMeshDatasetTimeWidget :
public QWidget,
private Ui::QgsProcessingMeshDatasetTimeWidgetBase
129 void setMeshLayer(
QgsMeshLayer *layer,
bool layerFromProject =
false );
130 void setDatasetGroupIndexes(
const QList<int> datasetGroupIndexes );
132 void setValue(
const QVariant &value );
133 QVariant value()
const;
146 QLineEdit *mLineEdit =
nullptr;
147 QToolButton *mToolButton =
nullptr;
149 QList<int> mDatasetGroupIndexes;
150 QDateTime mReferenceTime;
152 void populateTimeSteps();
153 bool hasTemporalDataset()
const;
155 void populateTimeStepsFromLayer();
158 QMap<int, QList<qint64>> mDatasetTimeSteps;
163 friend class TestProcessingGui;
173 QString parameterType()
const override;
175 void postInitialize(
const QList<QgsAbstractProcessingParameterWidgetWrapper *> &wrappers )
override;
190 QStringList compatibleParameterTypes()
const override;
191 QStringList compatibleOutputTypes()
const override;
192 QWidget *createWidget()
override;
194 QVariant widgetValue()
const override;
197 QgsProcessingMeshDatasetTimeWidget *mWidget =
nullptr;
198 std::unique_ptr<QgsMeshLayer> mTemporarytMeshLayer;
199 friend class TestProcessingGui;
212 QComboBox *mParentDatasetComboBox =
nullptr;
213 QString mMeshLayerParameterName;
QFlags< ProcessingParameterFlag > ProcessingParameterFlags
Flags which dictate the behavior of Processing parameters.
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