16#ifndef QGSVECTORTILEBASICLABELINGWIDGET_H
17#define QGSVECTORTILEBASICLABELINGWIDGET_H
21#include "ui_qgsvectortilebasiclabelingwidget.h"
26#include <QSortFilterProxyModel>
32class QgsVectorTileBasicLabelingListModel;
36class QgsVectorTileBasicLabelingProxyModel;
44class GUI_EXPORT QgsVectorTileBasicLabelingWidget :
public QgsMapLayerConfigWidget,
private Ui::QgsVectorTileBasicLabelingWidget
49 ~QgsVectorTileBasicLabelingWidget()
override;
55 void apply()
override;
61 void editStyleAtIndex(
const QModelIndex &index );
64 void updateLabelingFromWidget();
67 QPointer< QgsVectorTileLayer > mVTLayer;
68 std::unique_ptr<QgsVectorTileBasicLabeling> mLabeling;
69 QgsVectorTileBasicLabelingListModel *mModel =
nullptr;
70 QgsVectorTileBasicLabelingProxyModel *mProxyModel =
nullptr;
99 QgsLabelingGui *mLabelingGui =
nullptr;
105class QgsVectorTileBasicLabelingListModel :
public QAbstractListModel
112 MinZoom = Qt::UserRole + 1,
121 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
122 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
123 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
124 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
125 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
126 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
128 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
133 Qt::DropActions supportedDropActions()
const override;
134 QStringList mimeTypes()
const override;
135 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
136 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
142class QgsVectorTileBasicLabelingProxyModel :
public QSortFilterProxyModel
146 QgsVectorTileBasicLabelingProxyModel( QgsVectorTileBasicLabelingListModel *source, QObject *parent =
nullptr );
148 void setCurrentZoom(
int zoom );
149 void setFilterVisible(
bool enabled );
150 void setFilterString(
const QString &
string );
152 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent )
const override;
156 bool mFilterVisible =
false;
157 QString mFilterString;
158 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.
Contains settings for how a map layer will be labeled.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Represents a vector layer which manages a vector based data sets.
Configuration of a single style within QgsVectorTileBasicLabeling.
Basic labeling configuration for vector tile layers.
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.