Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for labeling of vector tile layers
- Loading branch information
1 parent
b40b3fe
commit f8a6b9f
Showing
26 changed files
with
998 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
161 changes: 161 additions & 0 deletions
161
python/core/auto_generated/vectortile/qgsvectortilebasiclabeling.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/vectortile/qgsvectortilebasiclabeling.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
class QgsVectorTileBasicLabelingStyle | ||
{ | ||
%Docstring | ||
Configuration of a single style within QgsVectorTileBasicLabeling | ||
|
||
.. versionadded:: 3.14 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsvectortilebasiclabeling.h" | ||
%End | ||
public: | ||
|
||
void setLabelSettings( const QgsPalLayerSettings &settings ); | ||
%Docstring | ||
Sets labeling configuration of this style | ||
%End | ||
QgsPalLayerSettings labelSettings() const; | ||
%Docstring | ||
Returns labeling configuration of this style | ||
%End | ||
|
||
void setStyleName( const QString &name ); | ||
%Docstring | ||
Sets human readable name of this style | ||
%End | ||
QString styleName() const; | ||
%Docstring | ||
Returns human readable name of this style | ||
%End | ||
|
||
void setLayerName( const QString &name ); | ||
%Docstring | ||
Sets name of the sub-layer to render (empty layer means that all layers match) | ||
%End | ||
QString layerName() const; | ||
%Docstring | ||
Returns name of the sub-layer to render (empty layer means that all layers match) | ||
%End | ||
|
||
void setGeometryType( QgsWkbTypes::GeometryType geomType ); | ||
%Docstring | ||
Sets type of the geometry that will be used (point / line / polygon) | ||
%End | ||
QgsWkbTypes::GeometryType geometryType() const; | ||
%Docstring | ||
Returns type of the geometry that will be used (point / line / polygon) | ||
%End | ||
|
||
void setFilterExpression( const QString &expr ); | ||
%Docstring | ||
Sets filter expression (empty filter means that all features match) | ||
%End | ||
QString filterExpression() const; | ||
%Docstring | ||
Returns filter expression (empty filter means that all features match) | ||
%End | ||
|
||
void setEnabled( bool enabled ); | ||
%Docstring | ||
Sets whether this style is enabled (used for rendering) | ||
%End | ||
bool isEnabled() const; | ||
%Docstring | ||
Returns whether this style is enabled (used for rendering) | ||
%End | ||
|
||
void setMinZoomLevel( int minZoom ); | ||
%Docstring | ||
Sets minimum zoom level index (negative number means no limit) | ||
%End | ||
int minZoomLevel() const; | ||
%Docstring | ||
Returns minimum zoom level index (negative number means no limit) | ||
%End | ||
|
||
void setMaxZoomLevel( int maxZoom ); | ||
%Docstring | ||
Sets maximum zoom level index (negative number means no limit) | ||
%End | ||
int maxZoomLevel() const; | ||
%Docstring | ||
Returns maxnimum zoom level index (negative number means no limit) | ||
%End | ||
|
||
bool isActive( int zoomLevel ) const; | ||
%Docstring | ||
Returns whether the style is active at given zoom level (also checks "enabled" flag) | ||
%End | ||
|
||
void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const; | ||
%Docstring | ||
Writes object content to given DOM element | ||
%End | ||
void readXml( const QDomElement &elem, const QgsReadWriteContext &context ); | ||
%Docstring | ||
Reads object content from given DOM element | ||
%End | ||
|
||
}; | ||
|
||
|
||
class QgsVectorTileBasicLabeling : QgsVectorTileLabeling | ||
{ | ||
%Docstring | ||
Basic labeling configuration for vector tile layers. It contains a definition | ||
of a list of labeling styles, where each labeling style is a combination of | ||
sub-layer name, geometry type, filter expression, zoom range and label settings. | ||
|
||
.. versionadded:: 3.14 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsvectortilebasiclabeling.h" | ||
%End | ||
public: | ||
QgsVectorTileBasicLabeling(); | ||
|
||
virtual QString type() const; | ||
|
||
virtual QgsVectorTileLabeling *clone() const; | ||
|
||
virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const; | ||
|
||
virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context ); | ||
|
||
|
||
void setStyles( const QList<QgsVectorTileBasicLabelingStyle> &styles ); | ||
%Docstring | ||
Sets list of styles of the renderer | ||
%End | ||
QList<QgsVectorTileBasicLabelingStyle> styles() const; | ||
%Docstring | ||
Returns list of styles of the renderer | ||
%End | ||
|
||
}; | ||
|
||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/vectortile/qgsvectortilebasiclabeling.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
69 changes: 69 additions & 0 deletions
69
python/core/auto_generated/vectortile/qgsvectortilelabeling.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/vectortile/qgsvectortilelabeling.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
class QgsVectorTileLabeling | ||
{ | ||
%Docstring | ||
Base class for labeling configuration classes for vector tile layers. | ||
|
||
.. versionadded:: 3.14 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsvectortilelabeling.h" | ||
%End | ||
%ConvertToSubClassCode | ||
|
||
const QString type = sipCpp->type(); | ||
|
||
if ( type == QStringLiteral( "basic" ) ) | ||
sipType = sipType_QgsVectorTileBasicLabeling; | ||
else | ||
sipType = 0; | ||
%End | ||
public: | ||
virtual ~QgsVectorTileLabeling(); | ||
|
||
virtual QString type() const = 0; | ||
%Docstring | ||
Unique type string of the labeling configuration implementation | ||
%End | ||
|
||
virtual QgsVectorTileLabeling *clone() const = 0 /Factory/; | ||
%Docstring | ||
Returns a new copy of the object | ||
%End | ||
|
||
|
||
virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const = 0; | ||
%Docstring | ||
Writes labeling properties to given XML element | ||
%End | ||
virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context ) = 0; | ||
%Docstring | ||
Reads labeling properties from given XML element | ||
%End | ||
virtual void resolveReferences( const QgsProject &project ); | ||
%Docstring | ||
Resolves references to other objects - second phase of loading - after readXml() | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/vectortile/qgsvectortilelabeling.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.