16#ifndef QGSVECTORTILEBASICLABELINGWIDGET_H
17#define QGSVECTORTILEBASICLABELINGWIDGET_H
21#include "ui_qgsvectortilebasiclabelingwidget.h"
24#include <QSortFilterProxyModel>
30class QgsVectorTileBasicLabelingListModel;
34class QgsVectorTileBasicLabelingProxyModel;
42class GUI_EXPORT QgsVectorTileBasicLabelingWidget :
public QgsMapLayerConfigWidget,
private Ui::QgsVectorTileBasicLabelingWidget
47 ~QgsVectorTileBasicLabelingWidget()
override;
53 void apply()
override;
59 void editStyleAtIndex(
const QModelIndex &index );
62 void labelModeChanged();
63 void updateLabelingFromWidget();
64 void resyncToCurrentLayer();
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
111 MinZoom = Qt::UserRole + 1,
120 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
121 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
122 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
123 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
124 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
125 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
127 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
132 Qt::DropActions supportedDropActions()
const override;
133 QStringList mimeTypes()
const override;
134 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
135 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
141class QgsVectorTileBasicLabelingProxyModel :
public QSortFilterProxyModel
145 QgsVectorTileBasicLabelingProxyModel( QgsVectorTileBasicLabelingListModel *source, QObject *parent =
nullptr );
147 void setCurrentZoom(
int zoom );
148 void setFilterVisible(
bool enabled );
149 void setFilterString(
const QString &
string );
151 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent )
const override;
154 bool mFilterVisible =
false;
155 QString mFilterString;
156 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.
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.