16#ifndef QGSPROCESSINGTININPUTLAYERSWIDGET_H
17#define QGSPROCESSINGTININPUTLAYERSWIDGET_H
21#include <QAbstractTableModel>
22#include <QStyledItemDelegate>
26#include "ui_qgsprocessingtinmeshdatawidgetbase.h"
30class QgsProcessingTinInputLayersModel:
public QAbstractTableModel
39 QgsProcessingTinInputLayersModel(
QgsProject *project );
41 int rowCount(
const QModelIndex &parent )
const override;
42 int columnCount(
const QModelIndex &parent )
const override;
43 QVariant data(
const QModelIndex &index,
int role )
const override;
44 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
45 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
46 QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const override;
49 void removeLayer(
int index );
52 QList<QgsProcessingParameterTinInputLayers::InputLayer> layers()
const;
57 QList<QgsProcessingParameterTinInputLayers::InputLayer> mInputLayers;
61class QgsProcessingTinInputLayersDelegate:
public QStyledItemDelegate
65 QgsProcessingTinInputLayersDelegate( QObject *parent ): QStyledItemDelegate( parent ) {}
67 QWidget *createEditor( QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
68 void setEditorData( QWidget *editor,
const QModelIndex &index )
const override;
69 void setModelData( QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index )
const override;
73class GUI_EXPORT QgsProcessingTinInputLayersWidget:
public QWidget,
private Ui::QgsProcessingTinInputLayersWidgetBase
77 QgsProcessingTinInputLayersWidget(
QgsProject *project );
79 QVariant value()
const;
80 void setValue(
const QVariant &value );
88 void onCurrentLayerAdded();
89 void onLayersRemove();
93 QgsProcessingTinInputLayersModel mInputLayersModel;
105 QString parameterType()
const override;
109 QStringList compatibleParameterTypes()
const override;
110 QStringList compatibleOutputTypes()
const override;
113 QVariant widgetValue() const override;
116 QgsProcessingTinInputLayersWidget *mWidget =
nullptr;
118 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,...