16 #ifndef QGSVECTORTILEBASICRENDERERWIDGET_H
17 #define QGSVECTORTILEBASICRENDERERWIDGET_H
21 #include "ui_qgsvectortilebasicrendererwidget.h"
26 #include <QSortFilterProxyModel>
33 class QgsVectorTileBasicRendererListModel;
37 class QgsVectorTileBasicRendererProxyModel;
45 class GUI_EXPORT QgsVectorTileBasicRendererWidget :
public QgsMapLayerConfigWidget,
private Ui::QgsVectorTileBasicRendererWidget
50 ~QgsVectorTileBasicRendererWidget()
override;
56 void apply()
override;
61 void editStyleAtIndex(
const QModelIndex &index );
64 void updateSymbolsFromWidget();
69 std::unique_ptr<QgsVectorTileBasicRenderer> mRenderer;
70 QgsVectorTileBasicRendererListModel *mModel =
nullptr;
71 QgsVectorTileBasicRendererProxyModel *mProxyModel =
nullptr;
79 class QgsVectorTileBasicRendererListModel :
public QAbstractListModel
86 MinZoom = Qt::UserRole + 1,
92 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
93 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
94 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
95 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
96 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
97 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
99 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
104 Qt::DropActions supportedDropActions()
const override;
105 QStringList mimeTypes()
const override;
106 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
107 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
113 class QgsVectorTileBasicRendererProxyModel :
public QSortFilterProxyModel
117 QgsVectorTileBasicRendererProxyModel( QgsVectorTileBasicRendererListModel *source, QObject *parent =
nullptr );
119 void setCurrentZoom(
int zoom );
120 void setFilterVisible(
bool enabled );
122 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent )
const override;
126 bool mFilterVisible =
false;
127 int mCurrentZoom = -1;
Map canvas is a class for displaying all GIS data types on a canvas.
A bar for displaying non-blocking messages to the user.
Definition of map rendering of a subset of vector tile data.
The default vector tile renderer implementation.
Implements a map layer that is dedicated to rendering of vector tiles.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.