QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsVectorTileBasicRendererStyle Class Reference

Definition of map rendering of a subset of vector tile data. More...

#include <qgsvectortilebasicrenderer.h>

Public Member Functions

 QgsVectorTileBasicRendererStyle (const QgsVectorTileBasicRendererStyle &other)
 Constructs a style object as a copy of another style.
 
 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).
 
QgsVectorTileBasicRendererStyleoperator= (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.
 
QgsSymbolsymbol () const
 Returns symbol for rendering.
 
void writeXml (QDomElement &elem, const QgsReadWriteContext &context) const
 Writes object content to given DOM element.
 

Detailed Description

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.

Since
QGIS 3.14

Definition at line 47 of file qgsvectortilebasicrenderer.h.

Constructor & Destructor Documentation

◆ QgsVectorTileBasicRendererStyle() [1/2]

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() [2/2]

QgsVectorTileBasicRendererStyle::QgsVectorTileBasicRendererStyle ( const QgsVectorTileBasicRendererStyle other)

Constructs a style object as a copy of another style.

Definition at line 36 of file qgsvectortilebasicrenderer.cpp.

◆ ~QgsVectorTileBasicRendererStyle()

QgsVectorTileBasicRendererStyle::~QgsVectorTileBasicRendererStyle ( )
default

Member Function Documentation

◆ filterExpression()

QString QgsVectorTileBasicRendererStyle::filterExpression ( ) const
inline

Returns filter expression (empty filter means that all features match)

Definition at line 75 of file qgsvectortilebasicrenderer.h.

◆ geometryType()

Qgis::GeometryType QgsVectorTileBasicRendererStyle::geometryType ( ) const
inline

Returns type of the geometry that will be used (point / line / polygon)

Definition at line 70 of file qgsvectortilebasicrenderer.h.

◆ isActive()

bool QgsVectorTileBasicRendererStyle::isActive ( int  zoomLevel) const
inline

Returns whether the style is active at given zoom level (also checks "enabled" flag)

Definition at line 140 of file qgsvectortilebasicrenderer.h.

◆ isEnabled()

bool QgsVectorTileBasicRendererStyle::isEnabled ( ) const
inline

Returns whether this style is enabled (used for rendering)

Definition at line 85 of file qgsvectortilebasicrenderer.h.

◆ layerName()

QString QgsVectorTileBasicRendererStyle::layerName ( ) const
inline

Returns name of the sub-layer to render (empty layer means that all layers match)

Definition at line 65 of file qgsvectortilebasicrenderer.h.

◆ maxZoomLevel()

int QgsVectorTileBasicRendererStyle::maxZoomLevel ( ) const
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.

Warning
This differs from the handling of the max zoom as defined in the MapBox Style Specifications, where the style is rendered only if the zoom level is less than the maximum zoom.
See also
setMaxZoomLevel()
minZoomLevel()

Definition at line 137 of file qgsvectortilebasicrenderer.h.

◆ minZoomLevel()

int QgsVectorTileBasicRendererStyle::minZoomLevel ( ) const
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.

See also
setMinZoomLevel()
maxZoomLevel()

Definition at line 107 of file qgsvectortilebasicrenderer.h.

◆ operator=()

QgsVectorTileBasicRendererStyle & QgsVectorTileBasicRendererStyle::operator= ( const QgsVectorTileBasicRendererStyle other)

Definition at line 41 of file qgsvectortilebasicrenderer.cpp.

◆ readXml()

void QgsVectorTileBasicRendererStyle::readXml ( const QDomElement &  elem,
const QgsReadWriteContext context 
)

Reads object content from given DOM element.

Definition at line 78 of file qgsvectortilebasicrenderer.cpp.

◆ setEnabled()

void QgsVectorTileBasicRendererStyle::setEnabled ( bool  enabled)
inline

Sets whether this style is enabled (used for rendering)

Definition at line 83 of file qgsvectortilebasicrenderer.h.

◆ setFilterExpression()

void QgsVectorTileBasicRendererStyle::setFilterExpression ( const QString &  expr)
inline

Sets filter expression (empty filter means that all features match)

Definition at line 73 of file qgsvectortilebasicrenderer.h.

◆ setGeometryType()

void QgsVectorTileBasicRendererStyle::setGeometryType ( Qgis::GeometryType  geomType)
inline

Sets type of the geometry that will be used (point / line / polygon)

Definition at line 68 of file qgsvectortilebasicrenderer.h.

◆ setLayerName()

void QgsVectorTileBasicRendererStyle::setLayerName ( const QString &  name)
inline

Sets name of the sub-layer to render (empty layer means that all layers match)

Definition at line 63 of file qgsvectortilebasicrenderer.h.

◆ setMaxZoomLevel()

void QgsVectorTileBasicRendererStyle::setMaxZoomLevel ( int  maxZoom)
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.

Warning
This differs from the handling of the max zoom as defined in the MapBox Style Specifications, where the style is rendered only if the zoom level is less than the maximum zoom.
See also
maxZoomLevel()
setMinZoomLevel()

Definition at line 122 of file qgsvectortilebasicrenderer.h.

◆ setMinZoomLevel()

void QgsVectorTileBasicRendererStyle::setMinZoomLevel ( int  minZoom)
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.

See also
minZoomLevel()
setMaxZoomLevel()

Definition at line 96 of file qgsvectortilebasicrenderer.h.

◆ setStyleName()

void QgsVectorTileBasicRendererStyle::setStyleName ( const QString &  name)
inline

Sets human readable name of this style.

Definition at line 58 of file qgsvectortilebasicrenderer.h.

◆ setSymbol()

void QgsVectorTileBasicRendererStyle::setSymbol ( QgsSymbol sym)

Sets symbol for rendering. Takes ownership of the symbol.

Definition at line 56 of file qgsvectortilebasicrenderer.cpp.

◆ styleName()

QString QgsVectorTileBasicRendererStyle::styleName ( ) const
inline

Returns human readable name of this style.

Definition at line 60 of file qgsvectortilebasicrenderer.h.

◆ symbol()

QgsSymbol * QgsVectorTileBasicRendererStyle::symbol ( ) const
inline

Returns symbol for rendering.

Definition at line 80 of file qgsvectortilebasicrenderer.h.

◆ writeXml()

void QgsVectorTileBasicRendererStyle::writeXml ( QDomElement &  elem,
const QgsReadWriteContext context 
) const

Writes object content to given DOM element.

Definition at line 61 of file qgsvectortilebasicrenderer.cpp.


The documentation for this class was generated from the following files: