16 #ifndef QGSVECTORTILEBASICRENDERERWIDGET_H
17 #define QGSVECTORTILEBASICRENDERERWIDGET_H
21 #include "ui_qgsvectortilebasicrendererwidget.h"
31 class QgsVectorTileBasicRendererListModel;
42 class GUI_EXPORT QgsVectorTileBasicRendererWidget :
public QgsMapLayerConfigWidget,
private Ui::QgsVectorTileBasicRendererWidget
47 ~QgsVectorTileBasicRendererWidget()
override;
53 void apply()
override;
58 void editStyleAtIndex(
const QModelIndex &index );
61 void updateSymbolsFromWidget();
66 std::unique_ptr<QgsVectorTileBasicRenderer> mRenderer;
67 QgsVectorTileBasicRendererListModel *mModel =
nullptr;
74 class QgsVectorTileBasicRendererListModel :
public QAbstractListModel
80 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
81 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
82 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
83 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
84 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
85 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
87 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
92 Qt::DropActions supportedDropActions()
const override;
93 QStringList mimeTypes()
const override;
94 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
95 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
103 #endif // QGSVECTORTILEBASICRENDERERWIDGET_H