16#ifndef QGSMAPBOXGLSTYLECONVERTER_H
17#define QGSMAPBOXGLSTYLECONVERTER_H
47 void pushWarning(
const QString &warning );
52 QStringList
warnings()
const {
return mWarnings; }
94 double pixelSizeConversionFactor()
const;
102 void setPixelSizeConversionFactor(
double sizeConversionFactor );
110 QImage spriteImage()
const;
118 QVariantMap spriteDefinitions()
const;
126 void setSprites(
const QImage &image,
const QVariantMap &definitions );
134 void setSprites(
const QImage &image,
const QString &definitions );
141 QString layerId()
const;
148 void setLayerId(
const QString &value );
152 QStringList mWarnings;
158 double mSizeConversionFactor = 1.0;
161 QVariantMap mSpriteDefinitions;
180 switch ( sipCpp->type() )
183 sipType = sipType_QgsMapBoxGlStyleRasterSource;
212 QString name()
const;
265 QStringList
tiles()
const {
return mTiles; }
277 QString mAttribution;
303 QString
id()
const {
return mId; }
308 QString
source()
const {
return mSource; }
376 Q_ENUM( PropertyType )
528 static
void parseSymbolLayer( const QVariantMap &jsonLayer,
545 static
bool parseSymbolLayerAsRenderer( const QVariantMap &jsonLayer,
603 const QVariantMap &conversionMap,
604 QString *defaultString
SIP_OUT =
nullptr );
642 const QVariantMap &conversionMap,
643 QString *defaultString
SIP_OUT =
nullptr );
662 int maxOpacity = 255, QColor *defaultColor
SIP_OUT =
nullptr,
double *defaultNumber
SIP_OUT =
nullptr );
671 int maxOpacity = 255, QColor *defaultColor
SIP_OUT =
nullptr,
double *defaultNumber
SIP_OUT =
nullptr );
679 int maxOpacity = 255, QColor *defaultColor
SIP_OUT =
nullptr,
double *defaultNumber
SIP_OUT =
nullptr );
713 static
void colorAsHslaComponents( const QColor &color,
int &hue,
int &saturation,
int &lightness,
int &alpha );
721 static QString interpolateExpression(
double zoomMin,
double zoomMax, QVariant valueMin, QVariant valueMax,
double base,
double multiplier = 1,
QgsMapBoxGlStyleConversionContext *contextPtr = 0 );
728 static Qt::PenCapStyle parseCapStyle( const QString &style );
735 static Qt::PenJoinStyle parseJoinStyle( const QString &style );
758 static QString retrieveSpriteAsBase64( const QVariant &value,
QgsMapBoxGlStyleConversionContext &context, QSize &spriteSize, QString &spriteProperty, QString &spriteSizeProperty );
770 static QString processLabelField(
const QString &
string,
bool &isExpression );
780 static bool numericArgumentsOnly(
const QVariant &bottomVariant,
const QVariant &topVariant,
double &bottom,
double &top );
783 QStringList mWarnings;
785 std::unique_ptr< QgsVectorTileRenderer > mRenderer;
786 std::unique_ptr< QgsVectorTileLabeling > mLabeling;
788 QList< QgsMapBoxGlStyleAbstractSource * > mSources;
789 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)