16 #ifndef QGSMAPBOXGLSTYLECONVERTER_H
17 #define QGSMAPBOXGLSTYLECONVERTER_H
19 #include "qgis_core.h"
22 #include <QVariantMap>
44 void pushWarning(
const QString &warning );
49 QStringList
warnings()
const {
return mWarnings; }
91 double pixelSizeConversionFactor()
const;
99 void setPixelSizeConversionFactor(
double sizeConversionFactor );
107 QImage spriteImage()
const;
115 QVariantMap spriteDefinitions()
const;
123 void setSprites(
const QImage &image,
const QVariantMap &definitions );
131 void setSprites(
const QImage &image,
const QString &definitions );
138 QString layerId()
const;
145 void setLayerId(
const QString &value );
149 QStringList mWarnings;
155 double mSizeConversionFactor = 1.0;
158 QVariantMap mSpriteDefinitions;
318 static void parseSymbolLayer(
const QVariantMap &jsonLayer,
335 static bool parseSymbolLayerAsRenderer(
const QVariantMap &jsonLayer,
393 const QVariantMap &conversionMap,
394 QString *defaultString
SIP_OUT =
nullptr );
433 const QVariantMap &conversionMap,
434 QString *defaultString
SIP_OUT =
nullptr );
443 int maxOpacity = 255, QColor *defaultColor
SIP_OUT =
nullptr,
double *defaultNumber
SIP_OUT =
nullptr );
452 int maxOpacity = 255, QColor *defaultColor
SIP_OUT =
nullptr,
double *defaultNumber
SIP_OUT =
nullptr );
460 int maxOpacity = 255, QColor *defaultColor
SIP_OUT =
nullptr,
double *defaultNumber
SIP_OUT =
nullptr );
494 static void colorAsHslaComponents(
const QColor &color,
int &hue,
int &saturation,
int &lightness,
int &alpha );
502 static QString interpolateExpression(
double zoomMin,
double zoomMax, QVariant valueMin, QVariant valueMax,
double base,
double multiplier = 1,
QgsMapBoxGlStyleConversionContext *contextPtr = 0 );
509 static Qt::PenCapStyle parseCapStyle(
const QString &style );
516 static Qt::PenJoinStyle parseJoinStyle(
const QString &style );
539 static QString retrieveSpriteAsBase64(
const QVariant &value,
QgsMapBoxGlStyleConversionContext &context, QSize &spriteSize, QString &spriteProperty, QString &spriteSizeProperty );
559 static bool numericArgumentsOnly(
const QVariant &bottomVariant,
const QVariant &topVariant,
double &bottom,
double &top );
562 QStringList mWarnings;
564 std::unique_ptr< QgsVectorTileRenderer > mRenderer;
565 std::unique_ptr< QgsVectorTileLabeling > mLabeling;
569 #endif // QGSMAPBOXGLSTYLECONVERTER_H