16#ifndef QGSMAPBOXGLSTYLECONVERTER_H
17#define QGSMAPBOXGLSTYLECONVERTER_H
48 void pushWarning(
const QString &warning );
53 QStringList
warnings()
const {
return mWarnings; }
95 double pixelSizeConversionFactor()
const;
103 void setPixelSizeConversionFactor(
double sizeConversionFactor );
111 QImage spriteImage()
const;
119 QVariantMap spriteDefinitions()
const;
127 void setSprites(
const QImage &image,
const QVariantMap &definitions );
135 void setSprites(
const QImage &image,
const QString &definitions );
142 QString layerId()
const;
149 void setLayerId(
const QString &value );
153 QStringList mWarnings;
159 double mSizeConversionFactor = 1.0;
162 QVariantMap mSpriteDefinitions;
181 switch ( sipCpp->type() )
184 sipType = sipType_QgsMapBoxGlStyleRasterSource;
213 QString name()
const;
266 QStringList
tiles()
const {
return mTiles; }
278 QString mAttribution;
304 QString
id()
const {
return mId; }
309 QString
source()
const {
return mSource; }
377 Q_ENUM( PropertyType )
529 static
void parseSymbolLayer( const QVariantMap &jsonLayer,
546 static
bool parseSymbolLayerAsRenderer( const QVariantMap &jsonLayer,
604 const QVariantMap &conversionMap,
605 QString *defaultString
SIP_OUT =
nullptr );
643 const QVariantMap &conversionMap,
644 QString *defaultString
SIP_OUT =
nullptr );
663 int maxOpacity = 255, QColor *defaultColor
SIP_OUT =
nullptr,
double *defaultNumber
SIP_OUT =
nullptr );
672 int maxOpacity = 255, QColor *defaultColor
SIP_OUT =
nullptr,
double *defaultNumber
SIP_OUT =
nullptr );
680 int maxOpacity = 255, QColor *defaultColor
SIP_OUT =
nullptr,
double *defaultNumber
SIP_OUT =
nullptr );
714 static
void colorAsHslaComponents( const QColor &color,
int &hue,
int &saturation,
int &lightness,
int &alpha );
722 static QString interpolateExpression(
double zoomMin,
double zoomMax, QVariant valueMin, QVariant valueMax,
double base,
double multiplier = 1,
QgsMapBoxGlStyleConversionContext *contextPtr = 0 );
729 static Qt::PenCapStyle parseCapStyle( const QString &style );
736 static Qt::PenJoinStyle parseJoinStyle( const QString &style );
759 static QString retrieveSpriteAsBase64( const QVariant &value,
QgsMapBoxGlStyleConversionContext &context, QSize &spriteSize, QString &spriteProperty, QString &spriteSizeProperty );
771 static QString processLabelField(
const QString &
string,
bool &isExpression );
781 static bool numericArgumentsOnly(
const QVariant &bottomVariant,
const QVariant &topVariant,
double &bottom,
double &top );
784 QStringList mWarnings;
786 std::unique_ptr< QgsVectorTileRenderer > mRenderer;
787 std::unique_ptr< QgsVectorTileLabeling > mLabeling;
789 QList< QgsMapBoxGlStyleAbstractSource * > mSources;
790 QList< QgsMapBoxGlStyleRasterSubLayer> mRasterSubLayers;
RenderUnit
Rendering size units.
MapBoxGlStyleSourceType
Flags which control project capabilities.
Abstract base class for MapBox GL style sources.
virtual bool setFromJson(const QVariantMap &json, QgsMapBoxGlStyleConversionContext *context)=0
Sets the source's state from a json map.
virtual ~QgsMapBoxGlStyleAbstractSource()
virtual Qgis::MapBoxGlStyleSourceType type() const =0
Returns the source type.
Context for a MapBox GL style conversion operation.
QStringList warnings() const
Returns a list of warning messages generated during the conversion.
void clearWarnings()
Clears the list of warning messages.
Handles conversion of MapBox GL styles to QGIS vector tile renderers and labeling settings.
PropertyType
Property types, for interpolated value conversion.
Result
Result of conversion.
QgsMapBoxGlStyleConverter & operator=(const QgsMapBoxGlStyleConverter &other)=delete
QgsMapBoxGlStyleConverter cannot be copied.
QString errorMessage() const
Returns a descriptive error message if an error was encountered during the style conversion,...
QStringList warnings() const
Returns a list of user-friendly warnings generated during the conversion, e.g.
QgsMapBoxGlStyleConverter(const QgsMapBoxGlStyleConverter &other)=delete
QgsMapBoxGlStyleConverter cannot be copied.
Encapsulates a MapBox GL style raster source.
int maximumZoom() const
Returns the maximum tile zoom for which tiles are available.
QString attribution() const
Returns the source's attribution text.
int tileSize() const
Returns the associated tile size.
int minimumZoom() const
Returns the minimum tile zoom for which tiles are available.
QStringList tiles() const
Returns the list of tile sources.
Encapsulates a MapBox GL style raster sub layer.
QString source() const
Returns the layer's source.
QString id() const
Returns the layer's ID.
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the layer's data defined properties.
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the layer's data defined properties.
Base class for all map layer types.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
A store for object properties.
Represents a raster layer.
Configuration of a single style within QgsVectorTileBasicLabeling.
Definition of map rendering of a subset of vector tile data.
Base class for labeling configuration classes for vector tile layers.
Abstract base class for all vector tile renderer implementations.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
QgsExpressionNode * parseExpression(const QString &str, QString &parserErrorMsg, QList< QgsExpression::ParserError > &parserErrors)