QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
qgsvectortilelayerrenderer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvectortilelayerrenderer.h
3 --------------------------------------
4 Date : March 2020
5 Copyright : (C) 2020 by Martin Dobias
6 Email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSVECTORTILELAYERRENDERER_H
17#define QGSVECTORTILELAYERRENDERER_H
18
19#define SIP_NO_FILE
20
21#include "qgsmaplayerrenderer.h"
25
30
31
44{
45 public:
49
50 virtual bool render() override;
51 virtual QgsFeedback *feedback() const override { return mFeedback.get(); }
52 bool forceRasterRender() const override;
53
54 private:
55 void decodeAndDrawTile( const QgsVectorTileRawData &rawTile );
56
57 // data coming from the vector tile layer
58
59 QString mLayerName;
60
61 std::unique_ptr< QgsVectorTileDataProvider > mDataProvider;
62
64 std::unique_ptr<QgsVectorTileRenderer> mRenderer;
65
66 QPainter::CompositionMode mLayerBlendMode = QPainter::CompositionMode::CompositionMode_SourceOver;
67
72 QgsVectorTileLabelProvider *mLabelProvider = nullptr;
73
75 bool mDrawTileBoundaries = false;
76
78 bool mLabelsEnabled = true;
79
80 // temporary data used during rendering process
81
83 std::unique_ptr<QgsFeedback> mFeedback;
85 int mTileZoomToFetch = 0;
87 int mTileZoomToRender = 0;
88
90 QgsTileMatrix mTileMatrix;
92 QgsTileRange mTileRange;
94 QMap<QString, QgsFields> mPerLayerFields;
95
97 QSet< QString > mRequiredLayers;
98
100 QList< QgsFeature > mSelectedFeatures;
101
103 int mTotalDecodeTime = 0;
105 int mTotalDrawTime = 0;
106
107 QList< QgsMapClippingRegion > mClippingRegions;
108 double mLayerOpacity = 1.0;
109
110 QgsVectorTileMatrixSet mTileMatrixSet;
111
112 bool mEnableProfile = false;
113 quint64 mPreparationTime = 0;
114
115};
116
117
118#endif // QGSVECTORTILELAYERRENDERER_H
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition qgsfeedback.h:44
Base class for utility classes that encapsulate information necessary for rendering of map layers.
Contains information about the context of a rendering operation.
Defines a matrix of tiles for a single zoom level: it is defined by its size (width *.
Definition qgstiles.h:136
Range of tiles in a tile matrix to be rendered.
Definition qgstiles.h:99
Base class for vector tile layer data providers.
Internal base class for implementation of label providers for vector tile labeling.
This class provides map rendering functionality for vector tile layers.
bool forceRasterRender() const override
Returns true if the renderer must be rendered to a raster paint device (e.g.
~QgsVectorTileLayerRenderer() override
virtual QgsFeedback * feedback() const override
Access to feedback object of the layer renderer (may be nullptr)
virtual bool render() override
Do the rendering (based on data stored in the class).
Implements a map layer that is dedicated to rendering of vector tiles.
Encapsulates properties of a vector tile matrix set, including tile origins and scaling information.
Keeps track of raw tile data from one or more sources that need to be decoded.