16#ifndef QGSVECTORTILEBASICRENDERERWIDGET_H
17#define QGSVECTORTILEBASICRENDERERWIDGET_H
19#include "ui_qgsvectortilebasicrendererwidget.h"
25#include <QSortFilterProxyModel>
32class QgsVectorTileBasicRendererListModel;
36class QgsVectorTileBasicRendererProxyModel;
45class GUI_EXPORT QgsVectorTileBasicRendererWidget :
public QgsMapLayerConfigWidget,
private Ui::QgsVectorTileBasicRendererWidget
50 ~QgsVectorTileBasicRendererWidget()
override;
56 void apply()
override;
61 void editStyleAtIndex(
const QModelIndex &index );
67 QPointer<QgsVectorTileLayer> mVTLayer;
68 std::unique_ptr<QgsVectorTileBasicRenderer> mRenderer;
69 QgsVectorTileBasicRendererListModel *mModel =
nullptr;
70 QgsVectorTileBasicRendererProxyModel *mProxyModel =
nullptr;
78class QgsVectorTileBasicRendererListModel :
public QAbstractListModel
84 MinZoom = Qt::UserRole + 1,
91 QgsVectorTileBasicRendererListModel( QgsVectorTileBasicRenderer *r, QObject *parent =
nullptr, QScreen *screen =
nullptr );
93 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
94 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
95 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
96 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
97 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
98 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
100 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
102 void insertStyle(
int row,
const QgsVectorTileBasicRendererStyle &style );
105 Qt::DropActions supportedDropActions()
const override;
106 QStringList mimeTypes()
const override;
107 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
108 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
111 QgsVectorTileBasicRenderer *mRenderer =
nullptr;
112 QPointer<QScreen> mScreen;
115class QgsVectorTileBasicRendererProxyModel :
public QSortFilterProxyModel
119 QgsVectorTileBasicRendererProxyModel( QgsVectorTileBasicRendererListModel *source, QObject *parent =
nullptr );
121 void setCurrentZoom(
int zoom );
122 void setFilterVisible(
bool enabled );
123 void setFilterString(
const QString &
string );
125 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent )
const override;
128 bool mFilterVisible =
false;
129 QString mFilterString;
130 int mCurrentZoom = -1;
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for all map layer types.
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.