16#ifndef QGSVECTORTILEBASICRENDERERWIDGET_H
17#define QGSVECTORTILEBASICRENDERERWIDGET_H
21#include "ui_qgsvectortilebasicrendererwidget.h"
24#include <QSortFilterProxyModel>
31class QgsVectorTileBasicRendererListModel;
35class QgsVectorTileBasicRendererProxyModel;
44class GUI_EXPORT QgsVectorTileBasicRendererWidget :
public QgsMapLayerConfigWidget,
private Ui::QgsVectorTileBasicRendererWidget
49 ~QgsVectorTileBasicRendererWidget()
override;
55 void apply()
override;
60 void editStyleAtIndex(
const QModelIndex &index );
66 QPointer< QgsVectorTileLayer > mVTLayer;
67 std::unique_ptr<QgsVectorTileBasicRenderer> mRenderer;
68 QgsVectorTileBasicRendererListModel *mModel =
nullptr;
69 QgsVectorTileBasicRendererProxyModel *mProxyModel =
nullptr;
77class QgsVectorTileBasicRendererListModel :
public QAbstractListModel
84 MinZoom = Qt::UserRole + 1,
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;
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;
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;
129 bool mFilterVisible =
false;
130 QString mFilterString;
131 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.