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

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)
 Sets the sprite image and definitions JSON string to use during conversion.
 
void setSprites (const QImage &image, const QVariantMap &definitions)
 Sets the sprite image and definitions JSON to use during conversion.
 
void setTargetUnit (Qgis::RenderUnit targetUnit)
 Sets the target unit type.
 
QVariantMap spriteDefinitions () const
 Returns the sprite definitions to use during conversion.
 
QImage spriteImage () const
 Returns the sprite image 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.
 

Detailed Description

Context for a MapBox GL style conversion operation.

Warning
This is private API only, and may change in future QGIS versions
Since
QGIS 3.16

Definition at line 41 of file qgsmapboxglstyleconverter.h.

Member Function Documentation

◆ clearWarnings()

void QgsMapBoxGlStyleConversionContext::clearWarnings ( )
inline

Clears the list of warning messages.

Definition at line 58 of file qgsmapboxglstyleconverter.h.

◆ layerId()

QString QgsMapBoxGlStyleConversionContext::layerId ( ) const

Returns the layer ID of the layer currently being converted.

See also
setLayerId()

Definition at line 3619 of file qgsmapboxglstyleconverter.cpp.

◆ pixelSizeConversionFactor()

double QgsMapBoxGlStyleConversionContext::pixelSizeConversionFactor ( ) const

Returns the pixel size conversion factor, used to scale the original pixel sizes when converting styles.

See also
setPixelSizeConversionFactor()

Definition at line 3588 of file qgsmapboxglstyleconverter.cpp.

◆ pushWarning()

void QgsMapBoxGlStyleConversionContext::pushWarning ( const QString &  warning)

Pushes a warning message generated during the conversion.

Definition at line 3572 of file qgsmapboxglstyleconverter.cpp.

◆ setLayerId()

void QgsMapBoxGlStyleConversionContext::setLayerId ( const QString &  value)

Sets the layer ID of the layer currently being converted.

See also
layerId()

Definition at line 3624 of file qgsmapboxglstyleconverter.cpp.

◆ setPixelSizeConversionFactor()

void QgsMapBoxGlStyleConversionContext::setPixelSizeConversionFactor ( double  sizeConversionFactor)

Sets the pixel size conversion factor, used to scale the original pixel sizes when converting styles.

See also
pixelSizeConversionFactor()

Definition at line 3593 of file qgsmapboxglstyleconverter.cpp.

◆ setSprites() [1/2]

void QgsMapBoxGlStyleConversionContext::setSprites ( const QImage &  image,
const QString &  definitions 
)

Sets the sprite image and definitions JSON string to use during conversion.

See also
spriteImage()
spriteDefinitions()

Definition at line 3614 of file qgsmapboxglstyleconverter.cpp.

◆ setSprites() [2/2]

void QgsMapBoxGlStyleConversionContext::setSprites ( const QImage &  image,
const QVariantMap &  definitions 
)

Sets the sprite image and definitions JSON to use during conversion.

See also
spriteImage()
spriteDefinitions()

Definition at line 3608 of file qgsmapboxglstyleconverter.cpp.

◆ setTargetUnit()

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.

See also
targetUnit()

Definition at line 3583 of file qgsmapboxglstyleconverter.cpp.

◆ spriteDefinitions()

QVariantMap QgsMapBoxGlStyleConversionContext::spriteDefinitions ( ) const

Returns the sprite definitions to use during conversion.

See also
spriteImage()
setSprites()

Definition at line 3603 of file qgsmapboxglstyleconverter.cpp.

◆ spriteImage()

QImage QgsMapBoxGlStyleConversionContext::spriteImage ( ) const

Returns the sprite image to use during conversion, or an invalid image if this is not set.

See also
spriteDefinitions()
setSprites()

Definition at line 3598 of file qgsmapboxglstyleconverter.cpp.

◆ targetUnit()

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.

See also
setTargetUnit()

Definition at line 3578 of file qgsmapboxglstyleconverter.cpp.

◆ warnings()

QStringList QgsMapBoxGlStyleConversionContext::warnings ( ) const
inline

Returns a list of warning messages generated during the conversion.

Definition at line 53 of file qgsmapboxglstyleconverter.h.


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