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 )
66 : QStyledItemDelegate( parent ) {}
68 QWidget *createEditor( QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
69 void setEditorData( QWidget *editor,
const QModelIndex &index )
const override;
70 void setModelData( QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index )
const override;
74class GUI_EXPORT QgsProcessingTinInputLayersWidget :
public QWidget,
private Ui::QgsProcessingTinInputLayersWidgetBase
78 QgsProcessingTinInputLayersWidget(
QgsProject *project );
80 QVariant value()
const;
81 void setValue(
const QVariant &value );
89 void onCurrentLayerAdded();
90 void onLayersRemove();
93 QgsProcessingTinInputLayersModel mInputLayersModel;
104 QString parameterType()
const override;
108 QStringList compatibleParameterTypes()
const override;
109 QStringList compatibleOutputTypes()
const override;
112 QVariant widgetValue() const override;
115 QgsProcessingTinInputLayersWidget *mWidget =
nullptr;
117 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,...