16#ifndef QGSVECTORTILEBASICRENDERERWIDGET_H
17#define QGSVECTORTILEBASICRENDERERWIDGET_H
21#include "ui_qgsvectortilebasicrendererwidget.h"
26#include <QSortFilterProxyModel>
33class QgsVectorTileBasicRendererListModel;
37class QgsVectorTileBasicRendererProxyModel;
45class GUI_EXPORT QgsVectorTileBasicRendererWidget :
public QgsMapLayerConfigWidget,
private Ui::QgsVectorTileBasicRendererWidget
50 ~QgsVectorTileBasicRendererWidget()
override;
56 void apply()
override;
61 void editStyleAtIndex(
const QModelIndex &index );
64 void updateSymbolsFromWidget();
68 QPointer< QgsVectorTileLayer > mVTLayer;
69 std::unique_ptr<QgsVectorTileBasicRenderer> mRenderer;
70 QgsVectorTileBasicRendererListModel *mModel =
nullptr;
71 QgsVectorTileBasicRendererProxyModel *mProxyModel =
nullptr;
79class QgsVectorTileBasicRendererListModel :
public QAbstractListModel
86 MinZoom = Qt::UserRole + 1,
95 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
96 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
97 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
98 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
99 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
100 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
102 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
107 Qt::DropActions supportedDropActions()
const override;
108 QStringList mimeTypes()
const override;
109 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
110 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
116class QgsVectorTileBasicRendererProxyModel :
public QSortFilterProxyModel
120 QgsVectorTileBasicRendererProxyModel( QgsVectorTileBasicRendererListModel *source, QObject *parent =
nullptr );
122 void setCurrentZoom(
int zoom );
123 void setFilterVisible(
bool enabled );
124 void setFilterString(
const QString &
string );
126 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent )
const override;
130 bool mFilterVisible =
false;
131 QString mFilterString;
132 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.