16 #ifndef QGSPROCESSINGTININPUTLAYERSWIDGET_H
17 #define QGSPROCESSINGTININPUTLAYERSWIDGET_H
21 #include <QAbstractTableModel>
22 #include <QStyledItemDelegate>
26 #include "ui_qgsprocessingtinmeshdatawidgetbase.h"
30 class GUI_EXPORT QgsProcessingTinInputLayersWidget:
public QWidget,
private Ui::QgsProcessingTinInputLayersWidgetBase
34 QgsProcessingTinInputLayersWidget(
QgsProject *project );
36 QVariant value()
const;
37 void setValue(
const QVariant &value );
45 void onCurrentLayerAdded();
46 void onLayersRemove();
49 class QgsProcessingTinInputLayersModel:
public QAbstractTableModel
57 QgsProcessingTinInputLayersModel(
QgsProject *project );
59 int rowCount(
const QModelIndex &parent )
const override;
60 int columnCount(
const QModelIndex &parent )
const override;
61 QVariant data(
const QModelIndex &index,
int role )
const override;
62 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
63 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
64 QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const override;
67 void removeLayer(
int index );
70 QList<QgsProcessingParameterTinInputLayers::InputLayer> layers()
const;
75 QList<QgsProcessingParameterTinInputLayers::InputLayer> mInputLayers;
79 class Delegate:
public QStyledItemDelegate
82 Delegate( QObject *parent ): QStyledItemDelegate( parent ) {}
84 QWidget *createEditor( QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
85 void setEditorData( QWidget *editor,
const QModelIndex &index )
const override;
86 void setModelData( QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index )
const override;
89 QgsProcessingTinInputLayersModel mInputLayersModel;
101 QString parameterType()
const override;
105 QStringList compatibleParameterTypes()
const override;
106 QStringList compatibleOutputTypes()
const override;
109 QVariant widgetValue() const override;
112 QgsProcessingTinInputLayersWidget *mWidget =
nullptr;
114 friend class TestProcessingGui;
Base class for all map layer types.
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.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...