Skip to content
Permalink
Browse files

use QVariantMap instead of QgsStringMap for symbol layer properties

  • Loading branch information
3nids committed Jan 3, 2021
1 parent 1dd80e9 commit f77bb217e2c0172d6ab59990204bb6ebcbb77280
Showing with 476 additions and 429 deletions.
  1. +12 −12 python/core/auto_generated/qgscolorramp.sip.in
  2. +2 −2 python/core/auto_generated/symbology/qgsarrowsymbollayer.sip.in
  3. +1 −1 python/core/auto_generated/symbology/qgsellipsesymbollayer.sip.in
  4. +18 −18 python/core/auto_generated/symbology/qgsfillsymbollayer.sip.in
  5. +1 −1 python/core/auto_generated/symbology/qgsgeometrygeneratorsymbollayer.sip.in
  6. +7 −7 python/core/auto_generated/symbology/qgslinesymbollayer.sip.in
  7. +11 −11 python/core/auto_generated/symbology/qgsmarkersymbollayer.sip.in
  8. +2 −2 python/core/auto_generated/symbology/qgsmasksymbollayer.sip.in
  9. +3 −3 python/core/auto_generated/symbology/qgssymbol.sip.in
  10. +1 −7 python/core/auto_generated/symbology/qgssymbollayer.sip.in
  11. +2 −2 python/core/auto_generated/symbology/qgssymbollayerregistry.sip.in
  12. +2 −2 python/core/auto_generated/symbology/qgsvectorfieldsymbollayer.sip.in
  13. +2 −2 src/core/annotations/qgsannotation.cpp
  14. +1 −1 src/core/layout/qgslayoutitemmapoverview.cpp
  15. +1 −1 src/core/layout/qgslayoutitempage.cpp
  16. +1 −1 src/core/layout/qgslayoutitempolygon.cpp
  17. +1 −1 src/core/layout/qgslayoutitemshape.cpp
  18. +1 −1 src/core/layout/qgslayoutpagecollection.cpp
  19. +17 −17 src/core/qgscolorramp.cpp
  20. +12 −12 src/core/qgscolorramp.h
  21. +14 −14 src/core/symbology/qgsarrowsymbollayer.cpp
  22. +2 −2 src/core/symbology/qgsarrowsymbollayer.h
  23. +2 −2 src/core/symbology/qgsellipsesymbollayer.cpp
  24. +1 −1 src/core/symbology/qgsellipsesymbollayer.h
  25. +104 −104 src/core/symbology/qgsfillsymbollayer.cpp
  26. +18 −18 src/core/symbology/qgsfillsymbollayer.h
  27. +5 −5 src/core/symbology/qgsgeometrygeneratorsymbollayer.cpp
  28. +1 −1 src/core/symbology/qgsgeometrygeneratorsymbollayer.h
  29. +40 −40 src/core/symbology/qgslinesymbollayer.cpp
  30. +7 −7 src/core/symbology/qgslinesymbollayer.h
  31. +133 −82 src/core/symbology/qgsmarkersymbollayer.cpp
  32. +11 −11 src/core/symbology/qgsmarkersymbollayer.h
  33. +3 −3 src/core/symbology/qgsmasksymbollayer.cpp
  34. +2 −2 src/core/symbology/qgsmasksymbollayer.h
  35. +3 −3 src/core/symbology/qgssymbol.cpp
  36. +3 −3 src/core/symbology/qgssymbol.h
  37. +6 −6 src/core/symbology/qgssymbollayer.cpp
  38. +2 −2 src/core/symbology/qgssymbollayer.h
  39. +1 −1 src/core/symbology/qgssymbollayerregistry.cpp
  40. +2 −2 src/core/symbology/qgssymbollayerregistry.h
  41. +4 −2 src/core/symbology/qgssymbollayerutils.cpp
  42. +12 −12 src/core/symbology/qgsvectorfieldsymbollayer.cpp
  43. +2 −2 src/core/symbology/qgsvectorfieldsymbollayer.h
@@ -74,7 +74,7 @@ Inverts the ordering of the color ramp.
Creates a clone of the color ramp.
%End

virtual QgsStringMap properties() const = 0;
virtual QVariantMap properties() const = 0;
%Docstring
Returns a string map containing all the color ramp's properties.
%End
@@ -149,7 +149,7 @@ Constructor for QgsGradientColorRamp
:param stops: optional list of additional color stops
%End

static QgsColorRamp *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsColorRamp *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsColorRamp from a map of properties
%End
@@ -173,7 +173,7 @@ Returns the string identifier for QgsGradientColorRamp.

virtual QgsGradientColorRamp *clone() const /Factory/;

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


QColor color1() const;
@@ -326,7 +326,7 @@ Constructor for QgsLimitedRandomColorRamp
:param valMax: maximum color value
%End

static QgsColorRamp *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsColorRamp *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Returns a new QgsLimitedRandomColorRamp color ramp created using the properties encoded in a string
map.
@@ -352,7 +352,7 @@ Returns the string identifier for QgsLimitedRandomColorRamp.

virtual QgsLimitedRandomColorRamp *clone() const /Factory/;

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;

virtual int count() const;

@@ -516,7 +516,7 @@ Returns the string identifier for QgsRandomColorRamp.
virtual QgsRandomColorRamp *clone() const /Factory/;


virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


protected:
@@ -552,7 +552,7 @@ Constructor for :py:class:`QgsPresetColorRamp`.
:param colors: list of named colors in ramp
%End

static QgsColorRamp *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsColorRamp *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Returns a new QgsPresetSchemeColorRamp color ramp created using the properties encoded in a string
map.
@@ -596,7 +596,7 @@ Returns the string identifier for QgsPresetSchemeColorRamp.

virtual QgsPresetSchemeColorRamp *clone() const /Factory/;

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;

virtual int count() const;

@@ -634,7 +634,7 @@ Constructor for QgsColorBrewerColorRamp
:param inverted: invert ramp ordering
%End

static QgsColorRamp *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsColorRamp *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Returns a new QgsColorBrewerColorRamp color ramp created using the properties encoded in a string
map.
@@ -661,7 +661,7 @@ Returns the string identifier for QgsColorBrewerColorRamp.

virtual QgsColorBrewerColorRamp *clone() const /Factory/;

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;

virtual int count() const;

@@ -762,7 +762,7 @@ Constructor for QgsCptCityColorRamp
:param doLoadFile: load cpt-city ramp from file
%End

static QgsColorRamp *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsColorRamp *create( const QVariantMap &properties = QVariantMap() ) /Factory/;

static QString typeString();
%Docstring
@@ -782,7 +782,7 @@ Returns the string identifier for QgsCptCityColorRamp.
void copy( const QgsCptCityColorRamp *other );
QgsGradientColorRamp *cloneGradientRamp() const /Factory/;

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


QString schemeName() const;
@@ -27,7 +27,7 @@ Line symbol layer used for representing lines as arrows.
Simple constructor
%End

static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Create a new QgsArrowSymbolLayer

@@ -198,7 +198,7 @@ Gets the current arrow type
Sets the arrow type
%End

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;

virtual QString layerType() const;

@@ -34,7 +34,7 @@ A symbol layer for rendering objects with major and minor axis (e.g. ellipse, re

virtual QgsEllipseSymbolLayer *clone() const /Factory/;

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


virtual void toSld( QDomDocument &doc, QDomElement &element, const QgsStringMap &props ) const;
@@ -27,7 +27,7 @@ class QgsSimpleFillSymbolLayer : QgsFillSymbolLayer
);


static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsSimpleFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsSimpleFillSymbolLayer.properties`).

@@ -48,7 +48,7 @@ Caller takes ownership of the returned symbol layer.
virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );


virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


virtual QgsSimpleFillSymbolLayer *clone() const /Factory/;
@@ -235,7 +235,7 @@ class QgsGradientFillSymbolLayer : QgsFillSymbolLayer
~QgsGradientFillSymbolLayer();


static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsGradientFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsGradientFillSymbolLayer.properties`).

@@ -255,7 +255,7 @@ Caller takes ownership of the returned symbol layer.
virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );


virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


virtual QgsGradientFillSymbolLayer *clone() const /Factory/;
@@ -440,7 +440,7 @@ class QgsShapeburstFillSymbolLayer : QgsFillSymbolLayer



static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsShapeburstFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsShapeburstFillSymbolLayer.properties`).

@@ -460,7 +460,7 @@ Caller takes ownership of the returned symbol layer.
virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );


virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


virtual QgsShapeburstFillSymbolLayer *clone() const /Factory/;
@@ -882,7 +882,7 @@ Constructor for QgsRasterFillSymbolLayer, using a raster fill from the
specified ``imageFilePath``.
%End

static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsRasterFillSymbolLayer from a ``properties`` map. The caller takes
ownership of the returned object.
@@ -904,7 +904,7 @@ Used internally when reading/writing symbols.

virtual void stopRender( QgsSymbolRenderContext &context );

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;

virtual QgsRasterFillSymbolLayer *clone() const /Factory/;

@@ -1160,7 +1160,7 @@ Constructor for QgsSVGFillSymbolLayer, using the SVG picture at the specified ab
Constructor for QgsSVGFillSymbolLayer, using the specified SVG picture data.
%End

static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsSVGFillSymbolLayer from a ``properties`` map. The caller takes
ownership of the returned object.
@@ -1187,7 +1187,7 @@ Used internally when reading/writing symbols.

virtual void stopRender( QgsSymbolRenderContext &context );

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;

virtual QgsSVGFillSymbolLayer *clone() const /Factory/;

@@ -1434,7 +1434,7 @@ A symbol fill consisting of repeated parallel lines.
QgsLinePatternFillSymbolLayer();
~QgsLinePatternFillSymbolLayer();

static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsLinePatternFillSymbolLayer from a ``properties`` map. The caller takes
ownership of the returned object.
@@ -1452,7 +1452,7 @@ ownership of the returned object.

virtual void stopRender( QgsSymbolRenderContext &context );

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;

virtual QgsLinePatternFillSymbolLayer *clone() const /Factory/;

@@ -1702,7 +1702,7 @@ class QgsPointPatternFillSymbolLayer: QgsImageFillSymbolLayer
QgsPointPatternFillSymbolLayer();
~QgsPointPatternFillSymbolLayer();

static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsPointPatternFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsPointPatternFillSymbolLayer.properties`).

@@ -1720,7 +1720,7 @@ Caller takes ownership of the returned symbol layer.
virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );


virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


virtual QgsPointPatternFillSymbolLayer *clone() const /Factory/;
@@ -2042,7 +2042,7 @@ Optionally a specific random number ``seed`` can be used when generating points.
a truly random sequence will be used on every rendering, causing points to appear in different locations with every map refresh.
%End

static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsRandomMarkerFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsRandomMarkerFillSymbolLayer.properties`).

@@ -2057,7 +2057,7 @@ Caller takes ownership of the returned symbol layer.

virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;

virtual QgsRandomMarkerFillSymbolLayer *clone() const /Factory/;

@@ -2226,7 +2226,7 @@ class QgsCentroidFillSymbolLayer : QgsFillSymbolLayer
QgsCentroidFillSymbolLayer();


static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsCentroidFillSymbolLayer using the specified ``properties`` map containing symbol properties (see :py:func:`~QgsCentroidFillSymbolLayer.properties`).

@@ -2247,7 +2247,7 @@ Caller takes ownership of the returned symbol layer.
virtual void renderPolygon( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );


virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


virtual QgsCentroidFillSymbolLayer *clone() const /Factory/;
@@ -52,7 +52,7 @@ that is created by this generator.
virtual QgsSymbolLayer *clone() const /Factory/;


virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


virtual void drawPreviewIcon( QgsSymbolRenderContext &context, QSize size );
@@ -32,7 +32,7 @@ and ``penStyle``.
%End


static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsSimpleLineSymbolLayer, using the settings
serialized in the ``properties`` map (corresponding to the output from
@@ -54,7 +54,7 @@ Creates a new QgsSimpleLineSymbolLayer from an SLD XML DOM ``element``.

virtual void renderPolygonStroke( const QPolygonF &points, const QVector<QPolygonF> *rings, QgsSymbolRenderContext &context );

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;

virtual QgsSimpleLineSymbolLayer *clone() const /Factory/;

@@ -658,7 +658,7 @@ calculating individual symbol angles.

virtual QgsMapUnitScale mapUnitScale() const ${SIP_FINAL};

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;


protected:
@@ -701,7 +701,7 @@ style and colors instead of the symbol's normal style.
Copies all common properties of this layer to another templated symbol layer.
%End

static void setCommonProperties( QgsTemplatedLineSymbolLayerBase *destLayer, const QgsStringMap &properties );
static void setCommonProperties( QgsTemplatedLineSymbolLayerBase *destLayer, const QVariantMap &properties );
%Docstring
Sets all common symbol properties in the ``destLayer``, using the settings
serialized in the ``properties`` map.
@@ -731,7 +731,7 @@ should be rotated to match the line segment alignment.
%End


static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsMarkerLineSymbolLayer, using the settings
serialized in the ``properties`` map (corresponding to the output from
@@ -843,7 +843,7 @@ The ``rotateSymbol`` argument specifies whether individual hash symbols
should be rotated to match the line segment alignment.
%End

static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *create( const QVariantMap &properties = QVariantMap() ) /Factory/;
%Docstring
Creates a new QgsHashedLineSymbolLayer, using the settings
serialized in the ``properties`` map (corresponding to the output from
@@ -856,7 +856,7 @@ serialized in the ``properties`` map (corresponding to the output from

virtual void stopRender( QgsSymbolRenderContext &context );

virtual QgsStringMap properties() const;
virtual QVariantMap properties() const;

virtual QgsHashedLineSymbolLayer *clone() const /Factory/;

0 comments on commit f77bb21

Please sign in to comment.
You can’t perform that action at this time.