16 #ifndef QGSVECTORTILEBASICLABELINGWIDGET_H
17 #define QGSVECTORTILEBASICLABELINGWIDGET_H
21 #include "ui_qgsvectortilebasiclabelingwidget.h"
26 #include <QSortFilterProxyModel>
32 class QgsVectorTileBasicLabelingListModel;
36 class QgsVectorTileBasicLabelingProxyModel;
44 class GUI_EXPORT QgsVectorTileBasicLabelingWidget :
public QgsMapLayerConfigWidget,
private Ui::QgsVectorTileBasicLabelingWidget
49 ~QgsVectorTileBasicLabelingWidget()
override;
55 void apply()
override;
61 void editStyleAtIndex(
const QModelIndex &index );
64 void updateLabelingFromWidget();
68 std::unique_ptr<QgsVectorTileBasicLabeling> mLabeling;
69 QgsVectorTileBasicLabelingListModel *mModel =
nullptr;
70 QgsVectorTileBasicLabelingProxyModel *mProxyModel =
nullptr;
99 QgsLabelingGui *mLabelingGui =
nullptr;
105 class QgsVectorTileBasicLabelingListModel :
public QAbstractListModel
112 MinZoom = Qt::UserRole + 1,
118 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
119 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
120 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
121 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
122 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
123 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
125 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
130 Qt::DropActions supportedDropActions()
const override;
131 QStringList mimeTypes()
const override;
132 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
133 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
139 class QgsVectorTileBasicLabelingProxyModel :
public QSortFilterProxyModel
143 QgsVectorTileBasicLabelingProxyModel( QgsVectorTileBasicLabelingListModel *source, QObject *parent =
nullptr );
145 void setCurrentZoom(
int zoom );
146 void setFilterVisible(
bool enabled );
148 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent )
const override;
152 bool mFilterVisible =
false;
153 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.