QGIS API Documentation  3.20.0-Odense (decaadbb31)
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. More...
 
 QgsVectorTileBasicRendererStyle (const QString &stName=QString(), const QString &laName=QString(), QgsWkbTypes::GeometryType geomType=QgsWkbTypes::UnknownGeometry)
 Constructs a style object. More...
 
 ~QgsVectorTileBasicRendererStyle ()
 
QString filterExpression () const
 Returns filter expression (empty filter means that all features match) More...
 
QgsWkbTypes::GeometryType geometryType () const
 Returns type of the geometry that will be used (point / line / polygon) More...
 
bool isActive (int zoomLevel) const
 Returns whether the style is active at given zoom level (also checks "enabled" flag) More...
 
bool isEnabled () const
 Returns whether this style is enabled (used for rendering) More...
 
QString layerName () const
 Returns name of the sub-layer to render (empty layer means that all layers match) More...
 
int maxZoomLevel () const
 Returns maxnimum zoom level index (negative number means no limit) More...
 
int minZoomLevel () const
 Returns minimum zoom level index (negative number means no limit) More...
 
QgsVectorTileBasicRendererStyleoperator= (const QgsVectorTileBasicRendererStyle &other)
 
void readXml (const QDomElement &elem, const QgsReadWriteContext &context)
 Reads object content from given DOM element. More...
 
void setEnabled (bool enabled)
 Sets whether this style is enabled (used for rendering) More...
 
void setFilterExpression (const QString &expr)
 Sets filter expression (empty filter means that all features match) More...
 
void setGeometryType (QgsWkbTypes::GeometryType geomType)
 Sets type of the geometry that will be used (point / line / polygon) More...
 
void setLayerName (const QString &name)
 Sets name of the sub-layer to render (empty layer means that all layers match) More...
 
void setMaxZoomLevel (int maxZoom)
 Sets maximum zoom level index (negative number means no limit) More...
 
void setMinZoomLevel (int minZoom)
 Sets minimum zoom level index (negative number means no limit) More...
 
void setStyleName (const QString &name)
 Sets human readable name of this style. More...
 
void setSymbol (QgsSymbol *sym)
 Sets symbol for rendering. Takes ownership of the symbol. More...
 
QString styleName () const
 Returns human readable name of this style. More...
 
QgsSymbolsymbol () const
 Returns symbol for rendering. More...
 
void writeXml (QDomElement &elem, const QgsReadWriteContext &context) const
 Writes object content to given DOM element. More...
 

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(),
QgsWkbTypes::GeometryType  geomType = QgsWkbTypes::UnknownGeometry 
)

Constructs a style object.

Definition at line 30 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 37 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()

QgsWkbTypes::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 98 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 maxnimum zoom level index (negative number means no limit)

Definition at line 95 of file qgsvectortilebasicrenderer.h.

◆ minZoomLevel()

int QgsVectorTileBasicRendererStyle::minZoomLevel ( ) const
inline

Returns minimum zoom level index (negative number means no limit)

Definition at line 90 of file qgsvectortilebasicrenderer.h.

◆ operator=()

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

Definition at line 42 of file qgsvectortilebasicrenderer.cpp.

◆ readXml()

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

Reads object content from given DOM element.

Definition at line 79 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 ( QgsWkbTypes::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)

Definition at line 93 of file qgsvectortilebasicrenderer.h.

◆ setMinZoomLevel()

void QgsVectorTileBasicRendererStyle::setMinZoomLevel ( int  minZoom)
inline

Sets minimum zoom level index (negative number means no limit)

Definition at line 88 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 57 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 62 of file qgsvectortilebasicrenderer.cpp.


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