QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
src
core
vectortile
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
"
22
23
class
QgsVectorTileLayer
;
24
class
QgsVectorTileRawData
;
25
class
QgsVectorTileLabelProvider
;
26
27
#include "
qgsvectortilerenderer.h
"
28
#include "
qgsmapclippingregion.h
"
29
#include "
qgshttpheaders.h
"
30
#include "
qgsvectortilematrixset.h
"
31
43
class
QgsVectorTileLayerRenderer
:
public
QgsMapLayerRenderer
44
{
45
public
:
47
QgsVectorTileLayerRenderer
(
QgsVectorTileLayer
*layer,
QgsRenderContext
&context );
48
49
virtual
bool
render
()
override
;
50
virtual
QgsFeedback
*
feedback
()
const override
{
return
mFeedback.get(); }
51
bool
forceRasterRender
()
const override
;
52
53
private
:
54
void
decodeAndDrawTile(
const
QgsVectorTileRawData
&rawTile );
55
56
// data coming from the vector tile layer
57
59
QString mSourceType;
61
QString mSourcePath;
62
63
QString mAuthCfg;
64
QgsHttpHeaders
mHeaders;
65
67
std::unique_ptr<QgsVectorTileRenderer> mRenderer;
68
73
QgsVectorTileLabelProvider
*mLabelProvider =
nullptr
;
74
76
bool
mDrawTileBoundaries =
false
;
77
78
// temporary data used during rendering process
79
81
std::unique_ptr<QgsFeedback> mFeedback;
83
int
mTileZoom = 0;
85
QgsTileMatrix
mTileMatrix;
87
QgsTileRange
mTileRange;
89
QMap<QString, QgsFields> mPerLayerFields;
90
92
QSet< QString > mRequiredLayers;
93
95
int
mTotalDecodeTime = 0;
97
int
mTotalDrawTime = 0;
98
99
QList< QgsMapClippingRegion > mClippingRegions;
100
double
mLayerOpacity = 1.0;
101
102
QgsVectorTileMatrixSet
mTileMatrixSet;
103
104
};
105
106
107
#endif // QGSVECTORTILELAYERRENDERER_H
qgsvectortilerenderer.h
QgsVectorTileLayerRenderer::forceRasterRender
bool forceRasterRender() const override
Returns true if the renderer must be rendered to a raster paint device (e.g.
Definition:
qgsvectortilelayerrenderer.cpp:217
QgsVectorTileLayer
Implements a map layer that is dedicated to rendering of vector tiles. Vector tiles compared to "ordi...
Definition:
qgsvectortilelayer.h:84
QgsVectorTileMatrixSet
Encapsulates properties of a vector tile matrix set, including tile origins and scaling information.
Definition:
qgsvectortilematrixset.h:31
QgsTileRange
Range of tiles in a tile matrix to be rendered. The selection is rectangular, given by start/end row ...
Definition:
qgstiles.h:70
qgsvectortilematrixset.h
QgsVectorTileLayerRenderer::feedback
virtual QgsFeedback * feedback() const override
Access to feedback object of the layer renderer (may be nullptr)
Definition:
qgsvectortilelayerrenderer.h:50
QgsVectorTileLabelProvider
Internal base class for implementation of label providers for vector tile labeling.
Definition:
qgsvectortilelabeling.h:33
QgsVectorTileLayerRenderer::QgsVectorTileLayerRenderer
QgsVectorTileLayerRenderer(QgsVectorTileLayer *layer, QgsRenderContext &context)
Creates the renderer. Always called from main thread, should copy whatever necessary from the layer.
Definition:
qgsvectortilelayerrenderer.cpp:34
QgsRenderContext
Contains information about the context of a rendering operation.
Definition:
qgsrendercontext.h:59
QgsVectorTileLayerRenderer
This class provides map rendering functionality for vector tile layers. In render() function (assumed...
Definition:
qgsvectortilelayerrenderer.h:43
QgsMapLayerRenderer
Base class for utility classes that encapsulate information necessary for rendering of map layers.
Definition:
qgsmaplayerrenderer.h:54
qgshttpheaders.h
QgsTileMatrix
Defines a matrix of tiles for a single zoom level: it is defined by its size (width *.
Definition:
qgstiles.h:107
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition:
qgsfeedback.h:44
qgsmaplayerrenderer.h
QgsHttpHeaders
This class implements simple http header management.
Definition:
qgshttpheaders.h:38
QgsVectorTileRawData
Keeps track of raw tile data that need to be decoded.
Definition:
qgsvectortileloader.h:32
qgsmapclippingregion.h
QgsVectorTileLayerRenderer::render
virtual bool render() override
Do the rendering (based on data stored in the class).
Definition:
qgsvectortilelayerrenderer.cpp:65
Generated on Sun Sep 11 2022 00:03:17 for QGIS API Documentation by
1.8.17