QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
Definition of map rendering of a subset of vector tile data. More...
#include <qgsvectortilebasicrenderer.h>
Public Member Functions | |
QgsVectorTileBasicRendererStyle (const QgsVectorTileBasicRendererStyle &other) | |
QgsVectorTileBasicRendererStyle (const QString &stName=QString(), const QString &laName=QString(), Qgis::GeometryType geomType=Qgis::GeometryType::Unknown) | |
Constructs a style object. | |
~QgsVectorTileBasicRendererStyle () | |
QString | filterExpression () const |
Returns filter expression (empty filter means that all features match) | |
Qgis::GeometryType | geometryType () const |
Returns type of the geometry that will be used (point / line / polygon) | |
bool | isActive (int zoomLevel) const |
Returns whether the style is active at given zoom level (also checks "enabled" flag) | |
bool | isEnabled () const |
Returns whether this style is enabled (used for rendering) | |
QString | layerName () const |
Returns name of the sub-layer to render (empty layer means that all layers match) | |
int | maxZoomLevel () const |
Returns the maximum zoom level index (negative number means no limit). | |
int | minZoomLevel () const |
Returns the minimum zoom level index (negative number means no limit). | |
QgsVectorTileBasicRendererStyle & | operator= (const QgsVectorTileBasicRendererStyle &other) |
void | readXml (const QDomElement &elem, const QgsReadWriteContext &context) |
Reads object content from given DOM element. | |
void | setEnabled (bool enabled) |
Sets whether this style is enabled (used for rendering) | |
void | setFilterExpression (const QString &expr) |
Sets filter expression (empty filter means that all features match) | |
void | setGeometryType (Qgis::GeometryType geomType) |
Sets type of the geometry that will be used (point / line / polygon) | |
void | setLayerName (const QString &name) |
Sets name of the sub-layer to render (empty layer means that all layers match) | |
void | setMaxZoomLevel (int maxZoom) |
Sets maximum zoom level index (negative number means no limit). | |
void | setMinZoomLevel (int minZoom) |
Sets minimum zoom level index (negative number means no limit). | |
void | setStyleName (const QString &name) |
Sets human readable name of this style. | |
void | setSymbol (QgsSymbol *sym) |
Sets symbol for rendering. Takes ownership of the symbol. | |
QString | styleName () const |
Returns human readable name of this style. | |
QgsSymbol * | symbol () const |
Returns symbol for rendering. | |
void | writeXml (QDomElement &elem, const QgsReadWriteContext &context) const |
Writes object content to given DOM element. | |
Definition of map rendering of a subset of vector tile data.
The subset of data is defined by:
Rendering is determined by the associated symbol (QgsSymbol). Symbol has to be of the same type as the chosen geometryType() - i.e. QgsMarkerSymbol for points, QgsLineSymbol for linestrings and QgsFillSymbol for polygons.
It is possible to further constrain when this style is applied by setting a range of allowed zoom levels, or by disabling it.
Definition at line 47 of file qgsvectortilebasicrenderer.h.
QgsVectorTileBasicRendererStyle::QgsVectorTileBasicRendererStyle | ( | const QString & | stName = QString() , |
const QString & | laName = QString() , |
||
Qgis::GeometryType | geomType = Qgis::GeometryType::Unknown |
||
) |
Constructs a style object.
Definition at line 29 of file qgsvectortilebasicrenderer.cpp.
QgsVectorTileBasicRendererStyle::QgsVectorTileBasicRendererStyle | ( | const QgsVectorTileBasicRendererStyle & | other | ) |
Definition at line 36 of file qgsvectortilebasicrenderer.cpp.
|
default |
|
inline |
Returns filter expression (empty filter means that all features match)
Definition at line 75 of file qgsvectortilebasicrenderer.h.
|
inline |
Returns type of the geometry that will be used (point / line / polygon)
Definition at line 70 of file qgsvectortilebasicrenderer.h.
|
inline |
Returns whether the style is active at given zoom level (also checks "enabled" flag)
Definition at line 140 of file qgsvectortilebasicrenderer.h.
|
inline |
Returns whether this style is enabled (used for rendering)
Definition at line 85 of file qgsvectortilebasicrenderer.h.
|
inline |
Returns name of the sub-layer to render (empty layer means that all layers match)
Definition at line 65 of file qgsvectortilebasicrenderer.h.
|
inline |
Returns the maximum zoom level index (negative number means no limit).
The style will be rendered if the zoom level is less than or equal to the maximum zoom.
Definition at line 137 of file qgsvectortilebasicrenderer.h.
|
inline |
Returns the minimum zoom level index (negative number means no limit).
The style will be rendered if the zoom level is greater than or equal to the this level.
Definition at line 107 of file qgsvectortilebasicrenderer.h.
QgsVectorTileBasicRendererStyle & QgsVectorTileBasicRendererStyle::operator= | ( | const QgsVectorTileBasicRendererStyle & | other | ) |
Definition at line 41 of file qgsvectortilebasicrenderer.cpp.
void QgsVectorTileBasicRendererStyle::readXml | ( | const QDomElement & | elem, |
const QgsReadWriteContext & | context | ||
) |
Reads object content from given DOM element.
Definition at line 78 of file qgsvectortilebasicrenderer.cpp.
|
inline |
Sets whether this style is enabled (used for rendering)
Definition at line 83 of file qgsvectortilebasicrenderer.h.
|
inline |
Sets filter expression (empty filter means that all features match)
Definition at line 73 of file qgsvectortilebasicrenderer.h.
|
inline |
Sets type of the geometry that will be used (point / line / polygon)
Definition at line 68 of file qgsvectortilebasicrenderer.h.
|
inline |
Sets name of the sub-layer to render (empty layer means that all layers match)
Definition at line 63 of file qgsvectortilebasicrenderer.h.
|
inline |
Sets maximum zoom level index (negative number means no limit).
The style will be rendered if the zoom level is less than or equal to maxZoom.
Definition at line 122 of file qgsvectortilebasicrenderer.h.
|
inline |
Sets minimum zoom level index (negative number means no limit).
The style will be rendered if the zoom level is greater than or equal to minZoom.
Definition at line 96 of file qgsvectortilebasicrenderer.h.
|
inline |
Sets human readable name of this style.
Definition at line 58 of file qgsvectortilebasicrenderer.h.
void QgsVectorTileBasicRendererStyle::setSymbol | ( | QgsSymbol * | sym | ) |
Sets symbol for rendering. Takes ownership of the symbol.
Definition at line 56 of file qgsvectortilebasicrenderer.cpp.
|
inline |
Returns human readable name of this style.
Definition at line 60 of file qgsvectortilebasicrenderer.h.
|
inline |
Returns symbol for rendering.
Definition at line 80 of file qgsvectortilebasicrenderer.h.
void QgsVectorTileBasicRendererStyle::writeXml | ( | QDomElement & | elem, |
const QgsReadWriteContext & | context | ||
) | const |
Writes object content to given DOM element.
Definition at line 61 of file qgsvectortilebasicrenderer.cpp.