16 #ifndef QGSPROCESSINGMESHDATASETWIDGET_H
17 #define QGSPROCESSINGMESHDATASETWIDGET_H
25 #include "ui_qgsprocessingmeshdatasettimewidget.h"
31 class 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 =
nullptr;
58 QPointer<QToolButton> mToolButton =
nullptr;
59 QPointer<QAction> mActionCurrentActiveDatasetGroups =
nullptr;
60 QPointer<QAction> mActionAvailableDatasetGroups =
nullptr;
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;
115 QComboBox *mParentLayerComboBox =
nullptr;
118 class GUI_EXPORT QgsProcessingMeshDatasetTimeWidget :
public QWidget,
private Ui::QgsProcessingMeshDatasetTimeWidgetBase
122 QgsProcessingMeshDatasetTimeWidget( QWidget *parent =
nullptr,
131 void setMeshLayer(
QgsMeshLayer *layer,
bool layerFromProject =
false );
132 void setDatasetGroupIndexes(
const QList<int> datasetGroupIndexes );
134 void setValue(
const QVariant &value );
135 QVariant value()
const;
148 QLineEdit *mLineEdit =
nullptr;
149 QToolButton *mToolButton =
nullptr;
151 QList<int> mDatasetGroupIndexes;
152 QDateTime mReferenceTime;
154 void populateTimeSteps();
155 bool hasTemporalDataset()
const;
157 void populateTimeStepsFromLayer();
160 QMap<int, QList<qint64>> mDatasetTimeSteps;
165 friend class TestProcessingGui;
176 QString parameterType()
const override;
178 void postInitialize(
const QList<QgsAbstractProcessingParameterWidgetWrapper *> &wrappers )
override;
192 QStringList compatibleParameterTypes()
const override;
193 QStringList compatibleOutputTypes()
const override;
194 QWidget *createWidget()
override;
196 QVariant widgetValue()
const override;
199 QgsProcessingMeshDatasetTimeWidget *mWidget =
nullptr;
200 std::unique_ptr<QgsMeshLayer> mTemporarytMeshLayer;
201 friend class TestProcessingGui;
215 QComboBox *mParentDatasetComboBox =
nullptr;
216 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