QGIS API Documentation 3.99.0-Master (b927df884fe)
|
Context for a MapBox GL style conversion operation. More...
#include <qgsmapboxglstyleconverter.h>
Public Member Functions | |
void | clearWarnings () |
Clears the list of warning messages. | |
QString | layerId () const |
Returns the layer ID of the layer currently being converted. | |
double | pixelSizeConversionFactor () const |
Returns the pixel size conversion factor, used to scale the original pixel sizes when converting styles. | |
void | pushWarning (const QString &warning) |
Pushes a warning message generated during the conversion. | |
void | setLayerId (const QString &value) |
Sets the layer ID of the layer currently being converted. | |
void | setPixelSizeConversionFactor (double sizeConversionFactor) |
Sets the pixel size conversion factor, used to scale the original pixel sizes when converting styles. | |
void | setSprites (const QImage &image, const QString &definitions, const QString &category=QString()) |
Sets the sprite image and definitions JSON string for a given category to use during conversion. | |
void | setSprites (const QImage &image, const QVariantMap &definitions, const QString &category=QString()) |
Sets the sprite image and definitions JSON for a given category to use during conversion. | |
void | setTargetUnit (Qgis::RenderUnit targetUnit) |
Sets the target unit type. | |
QStringList | spriteCategories () const |
Returns the list of sprite categories to use during conversion, or an empty list of none is set. | |
QVariantMap | spriteDefinitions (const QString &category=QString()) const |
Returns the sprite definitions for a given category to use during conversion. | |
QImage | spriteImage (const QString &category=QString()) const |
Returns the sprite image for a given category to use during conversion, or an invalid image if this is not set. | |
Qgis::RenderUnit | targetUnit () const |
Returns the target unit type. | |
QStringList | warnings () const |
Returns a list of warning messages generated during the conversion. | |
Context for a MapBox GL style conversion operation.
Definition at line 41 of file qgsmapboxglstyleconverter.h.
|
inline |
Clears the list of warning messages.
Definition at line 58 of file qgsmapboxglstyleconverter.h.
QString QgsMapBoxGlStyleConversionContext::layerId | ( | ) | const |
Returns the layer ID of the layer currently being converted.
Definition at line 4154 of file qgsmapboxglstyleconverter.cpp.
double QgsMapBoxGlStyleConversionContext::pixelSizeConversionFactor | ( | ) | const |
Returns the pixel size conversion factor, used to scale the original pixel sizes when converting styles.
Definition at line 4118 of file qgsmapboxglstyleconverter.cpp.
void QgsMapBoxGlStyleConversionContext::pushWarning | ( | const QString & | warning | ) |
Pushes a warning message generated during the conversion.
Definition at line 4102 of file qgsmapboxglstyleconverter.cpp.
void QgsMapBoxGlStyleConversionContext::setLayerId | ( | const QString & | value | ) |
Sets the layer ID of the layer currently being converted.
Definition at line 4159 of file qgsmapboxglstyleconverter.cpp.
void QgsMapBoxGlStyleConversionContext::setPixelSizeConversionFactor | ( | double | sizeConversionFactor | ) |
Sets the pixel size conversion factor, used to scale the original pixel sizes when converting styles.
Definition at line 4123 of file qgsmapboxglstyleconverter.cpp.
void QgsMapBoxGlStyleConversionContext::setSprites | ( | const QImage & | image, |
const QString & | definitions, | ||
const QString & | category = QString() |
||
) |
Sets the sprite image and definitions JSON string for a given category to use during conversion.
Definition at line 4149 of file qgsmapboxglstyleconverter.cpp.
void QgsMapBoxGlStyleConversionContext::setSprites | ( | const QImage & | image, |
const QVariantMap & | definitions, | ||
const QString & | category = QString() |
||
) |
Sets the sprite image and definitions JSON for a given category to use during conversion.
Definition at line 4143 of file qgsmapboxglstyleconverter.cpp.
void QgsMapBoxGlStyleConversionContext::setTargetUnit | ( | Qgis::RenderUnit | targetUnit | ) |
Sets the target unit type.
By default this is QgsUnitTypes::RenderPixels in order to exactly match the original style rendering. But rendering in pixels can cause issues on hidpi displays or with print layouts, so setting a target unit of QgsUnitTypes::Millimeters or another real-world unit type is often more appropriate.
If setting to a non-pixel unit, be sure to call setPixelSizeConversionFactor() in order to setup an appropriate pixel-to-unit conversion factor to scale converted sizes using. E.g. if the target unit is millimeters, the size conversion factor should be set to a pixel-to-millimeter value.
Definition at line 4113 of file qgsmapboxglstyleconverter.cpp.
QStringList QgsMapBoxGlStyleConversionContext::spriteCategories | ( | ) | const |
Returns the list of sprite categories to use during conversion, or an empty list of none is set.
Definition at line 4128 of file qgsmapboxglstyleconverter.cpp.
QVariantMap QgsMapBoxGlStyleConversionContext::spriteDefinitions | ( | const QString & | category = QString() | ) | const |
Returns the sprite definitions for a given category to use during conversion.
Definition at line 4138 of file qgsmapboxglstyleconverter.cpp.
QImage QgsMapBoxGlStyleConversionContext::spriteImage | ( | const QString & | category = QString() | ) | const |
Returns the sprite image for a given category to use during conversion, or an invalid image if this is not set.
Definition at line 4133 of file qgsmapboxglstyleconverter.cpp.
Qgis::RenderUnit QgsMapBoxGlStyleConversionContext::targetUnit | ( | ) | const |
Returns the target unit type.
By default this is QgsUnitTypes::RenderPixels in order to exactly match the original style rendering. But rendering in pixels can cause issues on hidpi displays or with print layouts, so setting a target unit of QgsUnitTypes::Millimeters or another real-world unit type is often more appropriate.
Definition at line 4108 of file qgsmapboxglstyleconverter.cpp.
|
inline |
Returns a list of warning messages generated during the conversion.
Definition at line 53 of file qgsmapboxglstyleconverter.h.