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 QWidget *createWidget()
override;
94 QVariant widgetValue()
const override;
97 QgsProcessingMeshDatasetGroupsWidget *mWidget =
nullptr;
99 friend class TestProcessingGui;
112 QComboBox *mParentLayerComboBox =
nullptr;
115class GUI_EXPORT QgsProcessingMeshDatasetTimeWidget :
public QWidget,
private Ui::QgsProcessingMeshDatasetTimeWidgetBase
127 void setMeshLayer(
QgsMeshLayer *layer,
bool layerFromProject =
false );
128 void setDatasetGroupIndexes(
const QList<int> datasetGroupIndexes );
130 void setValue(
const QVariant &value );
131 QVariant value()
const;
144 QLineEdit *mLineEdit =
nullptr;
145 QToolButton *mToolButton =
nullptr;
147 QList<int> mDatasetGroupIndexes;
148 QDateTime mReferenceTime;
150 void populateTimeSteps();
151 bool hasTemporalDataset()
const;
153 void populateTimeStepsFromLayer();
156 QMap<int, QList<qint64>> mDatasetTimeSteps;
161 friend class TestProcessingGui;
171 QString parameterType()
const override;
173 void postInitialize(
const QList<QgsAbstractProcessingParameterWidgetWrapper *> &wrappers )
override;
188 QWidget *createWidget()
override;
190 QVariant widgetValue()
const override;
193 QgsProcessingMeshDatasetTimeWidget *mWidget =
nullptr;
194 std::unique_ptr<QgsMeshLayer> mTemporarytMeshLayer;
195 friend class TestProcessingGui;
208 QComboBox *mParentDatasetComboBox =
nullptr;
209 QString mMeshLayerParameterName;
ProcessingMode
Types of modes which Processing widgets can be created for.
@ Standard
Standard (single-run) algorithm mode.
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.
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