Skip to content
Permalink
Browse files

Propagate path resolver through renderers, annotations, diagrams

This is necessary in order to be able to correctly translate between absolute and relative paths
deeper in the code - e.g. paths to SVG files used in marker or fill symbols.

Until now, relative paths were translated to absolute paths on the fly.
This is now changed - paths to files should be always absolute within QGIS objects - and paths
only get turned into relative when saving projects. When loading a project, relative paths
are translated to absolute paths immediately.

This should lower the overall confusion about relative/absolute paths within QGIS, and also
allow having different base directories for relative paths (e.g. QML or QPT files may use relative paths
to their directory - rather than to the project directory)
  • Loading branch information
wonder-sk committed May 13, 2017
1 parent 6fe459d commit 8ffd91ea9070598317a113619a9e2b472ddc9b59
Showing with 734 additions and 552 deletions.
  1. +4 −4 python/core/annotations/qgsannotation.sip
  2. +2 −2 python/core/annotations/qgsannotationmanager.sip
  3. +2 −2 python/core/annotations/qgshtmlannotation.sip
  4. +2 −2 python/core/annotations/qgssvgannotation.sip
  5. +2 −2 python/core/annotations/qgstextannotation.sip
  6. +4 −4 python/core/qgsconditionalstyle.sip
  7. +8 −8 python/core/qgsdiagramrenderer.sip
  8. +10 −6 python/core/qgsmaplayer.sip
  9. +10 −6 python/core/qgsvectorlayer.sip
  10. +6 −6 python/core/raster/qgsrasterlayer.sip
  11. +5 −5 python/core/symbology-ng/qgs25drenderer.sip
  12. +2 −2 python/core/symbology-ng/qgscategorizedsymbolrenderer.sip
  13. +5 −4 python/core/symbology-ng/qgsfillsymbollayer.sip
  14. +2 −2 python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip
  15. +4 −4 python/core/symbology-ng/qgsheatmaprenderer.sip
  16. +2 −2 python/core/symbology-ng/qgsinvertedpolygonrenderer.sip
  17. +4 −3 python/core/symbology-ng/qgsmarkersymbollayer.sip
  18. +2 −2 python/core/symbology-ng/qgsnullsymbolrenderer.sip
  19. +6 −6 python/core/symbology-ng/qgspointclusterrenderer.sip
  20. +6 −6 python/core/symbology-ng/qgspointdisplacementrenderer.sip
  21. +2 −2 python/core/symbology-ng/qgsrenderer.sip
  22. +4 −4 python/core/symbology-ng/qgsrendererregistry.sip
  23. +2 −2 python/core/symbology-ng/qgsrulebasedrenderer.sip
  24. +2 −2 python/core/symbology-ng/qgssinglesymbolrenderer.sip
  25. +10 −62 python/core/symbology-ng/qgssvgcache.sip
  26. +8 −4 python/core/symbology-ng/qgssymbollayerregistry.sip
  27. +8 −13 python/core/symbology-ng/qgssymbollayerutils.sip
  28. +2 −2 python/gui/qgsformannotation.sip
  29. +1 −0 src/app/composer/qgscomposerpicturewidget.cpp
  30. +3 −2 src/app/qgisapp.cpp
  31. +7 −4 src/app/qgsdecorationgrid.cpp
  32. +5 −4 src/app/qgslayerstylingwidget.cpp
  33. +6 −6 src/core/annotations/qgsannotation.cpp
  34. +4 −4 src/core/annotations/qgsannotation.h
  35. +10 −10 src/core/annotations/qgsannotationmanager.cpp
  36. +4 −3 src/core/annotations/qgsannotationmanager.h
  37. +4 −4 src/core/annotations/qgshtmlannotation.cpp
  38. +2 −2 src/core/annotations/qgshtmlannotation.h
  39. +4 −4 src/core/annotations/qgssvgannotation.cpp
  40. +2 −2 src/core/annotations/qgssvgannotation.h
  41. +4 −4 src/core/annotations/qgstextannotation.cpp
  42. +2 −2 src/core/annotations/qgstextannotation.h
  43. +5 −2 src/core/composer/qgscomposerarrow.cpp
  44. +3 −2 src/core/composer/qgscomposermap.cpp
  45. +5 −4 src/core/composer/qgscomposermapgrid.cpp
  46. +3 −2 src/core/composer/qgscomposermapoverview.cpp
  47. +1 −0 src/core/composer/qgscomposerpicture.cpp
  48. +1 −0 src/core/composer/qgscomposerpicture.h
  49. +4 −2 src/core/composer/qgscomposerpolygon.cpp
  50. +4 −2 src/core/composer/qgscomposerpolyline.cpp
  51. +3 −2 src/core/composer/qgscomposershape.cpp
  52. +3 −2 src/core/composer/qgscomposition.cpp
  53. +10 −10 src/core/qgsconditionalstyle.cpp
  54. +5 −4 src/core/qgsconditionalstyle.h
  55. +12 −12 src/core/qgsdiagramrenderer.cpp
  56. +9 −8 src/core/qgsdiagramrenderer.h
  57. +12 −8 src/core/qgsmaplayer.cpp
  58. +10 −6 src/core/qgsmaplayer.h
  59. +2 −2 src/core/qgsproject.cpp
  60. +5 −1 src/core/qgstextrenderer.cpp
  61. +18 −17 src/core/qgsvectorlayer.cpp
  62. +10 −6 src/core/qgsvectorlayer.h
  63. +13 −11 src/core/raster/qgsrasterlayer.cpp
  64. +6 −6 src/core/raster/qgsrasterlayer.h
  65. +4 −4 src/core/symbology-ng/qgs25drenderer.cpp
  66. +2 −2 src/core/symbology-ng/qgs25drenderer.h
  67. +6 −6 src/core/symbology-ng/qgscategorizedsymbolrenderer.cpp
  68. +2 −2 src/core/symbology-ng/qgscategorizedsymbolrenderer.h
  69. +14 −4 src/core/symbology-ng/qgsfillsymbollayer.cpp
  70. +2 −1 src/core/symbology-ng/qgsfillsymbollayer.h
  71. +6 −6 src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp
  72. +2 −2 src/core/symbology-ng/qgsgraduatedsymbolrenderer.h
  73. +4 −2 src/core/symbology-ng/qgsheatmaprenderer.cpp
  74. +2 −2 src/core/symbology-ng/qgsheatmaprenderer.h
  75. +4 −4 src/core/symbology-ng/qgsinvertedpolygonrenderer.cpp
  76. +2 −2 src/core/symbology-ng/qgsinvertedpolygonrenderer.h
  77. +16 −4 src/core/symbology-ng/qgsmarkersymbollayer.cpp
  78. +2 −2 src/core/symbology-ng/qgsmarkersymbollayer.h
  79. +4 −2 src/core/symbology-ng/qgsnullsymbolrenderer.cpp
  80. +2 −2 src/core/symbology-ng/qgsnullsymbolrenderer.h
  81. +6 −6 src/core/symbology-ng/qgspointclusterrenderer.cpp
  82. +2 −2 src/core/symbology-ng/qgspointclusterrenderer.h
  83. +6 −6 src/core/symbology-ng/qgspointdisplacementrenderer.cpp
  84. +2 −2 src/core/symbology-ng/qgspointdisplacementrenderer.h
  85. +4 −3 src/core/symbology-ng/qgsrenderer.cpp
  86. +3 −2 src/core/symbology-ng/qgsrenderer.h
  87. +5 −3 src/core/symbology-ng/qgsrendererregistry.h
  88. +4 −4 src/core/symbology-ng/qgsrulebasedrenderer.cpp
  89. +2 −2 src/core/symbology-ng/qgsrulebasedrenderer.h
  90. +4 −4 src/core/symbology-ng/qgssinglesymbolrenderer.cpp
  91. +2 −2 src/core/symbology-ng/qgssinglesymbolrenderer.h
  92. +7 −6 src/core/symbology-ng/qgsstyle.cpp
  93. +19 −23 src/core/symbology-ng/qgssvgcache.cpp
  94. +13 −17 src/core/symbology-ng/qgssvgcache.h
  95. +10 −2 src/core/symbology-ng/qgssymbollayerregistry.cpp
  96. +38 −17 src/core/symbology-ng/qgssymbollayerregistry.h
  97. +31 −39 src/core/symbology-ng/qgssymbollayerutils.cpp
  98. +14 −11 src/core/symbology-ng/qgssymbollayerutils.h
  99. +4 −4 src/gui/qgsformannotation.cpp
  100. +2 −2 src/gui/qgsformannotation.h
  101. +4 −2 src/gui/qgstextformatwidget.cpp
  102. +3 −2 src/gui/symbology-ng/qgsrulebasedrendererwidget.cpp
  103. +4 −3 src/gui/symbology-ng/qgssvgselectorwidget.cpp
  104. +5 −5 src/plugins/grass/qgsgrasseditrenderer.cpp
  105. +2 −2 src/plugins/grass/qgsgrasseditrenderer.h
  106. +2 −1 tests/src/core/testqgsmaprendererjob.cpp
  107. +130 −1 tests/src/core/testqgsproject.cpp
  108. +3 −2 tests/src/core/testqgsrulebasedrenderer.cpp
  109. +1 −1 tests/src/core/testqgssvgmarker.cpp
@@ -56,8 +56,8 @@ class QgsAnnotation : QObject

void render( QgsRenderContext &context ) const;

virtual void writeXml( QDomElement &elem, QDomDocument &doc ) const = 0;
virtual void readXml( const QDomElement &itemElem, const QDomDocument &doc ) = 0;
virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsPathResolver &pathResolver ) const = 0;
virtual void readXml( const QDomElement &itemElem, const QDomDocument &doc, const QgsPathResolver &pathResolver ) = 0;

void setMarkerSymbol( QgsMarkerSymbol *symbol /Transfer/ );
QgsMarkerSymbol *markerSymbol() const;
@@ -80,8 +80,8 @@ class QgsAnnotation : QObject

virtual QSizeF minimumFrameSize() const;

void _writeXml( QDomElement &itemElem, QDomDocument &doc ) const;
void _readXml( const QDomElement &annotationElem, const QDomDocument &doc );
void _writeXml( QDomElement &itemElem, QDomDocument &doc, const QgsPathResolver &pathResolver ) const;
void _readXml( const QDomElement &annotationElem, const QDomDocument &doc, const QgsPathResolver &pathResolver );

void copyCommonProperties( QgsAnnotation *target ) const;

@@ -81,15 +81,15 @@ class QgsAnnotationManager : QObject
:rtype: list of QgsAnnotation
%End

bool readXml( const QDomElement &element, const QDomDocument &doc );
bool readXml( const QDomElement &element, const QDomDocument &doc, const QgsPathResolver &pathResolver );
%Docstring
Reads the manager's state from a DOM element, restoring all annotations
present in the XML document.
.. seealso:: writeXml()
:rtype: bool
%End

QDomElement writeXml( QDomDocument &doc ) const;
QDomElement writeXml( QDomDocument &doc, const QgsPathResolver &pathResolver ) const;
%Docstring
Returns a DOM element representing the state of the manager.
.. seealso:: readXml()
@@ -50,8 +50,8 @@ class QgsHtmlAnnotation: QgsAnnotation
:rtype: str
%End

virtual void writeXml( QDomElement &elem, QDomDocument &doc ) const;
virtual void readXml( const QDomElement &itemElem, const QDomDocument &doc );
virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsPathResolver &pathResolver ) const;
virtual void readXml( const QDomElement &itemElem, const QDomDocument &doc, const QgsPathResolver &pathResolver );

virtual void setAssociatedFeature( const QgsFeature &feature );

@@ -29,8 +29,8 @@ class QgsSvgAnnotation: QgsAnnotation
virtual QgsSvgAnnotation *clone() const /Factory/;


virtual void writeXml( QDomElement &elem, QDomDocument &doc ) const;
virtual void readXml( const QDomElement &itemElem, const QDomDocument &doc );
virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsPathResolver &pathResolver ) const;
virtual void readXml( const QDomElement &itemElem, const QDomDocument &doc, const QgsPathResolver &pathResolver );

void setFilePath( const QString &file );
%Docstring
@@ -44,8 +44,8 @@ class QgsTextAnnotation: QgsAnnotation
.. seealso:: document()
%End

virtual void writeXml( QDomElement &elem, QDomDocument &doc ) const;
virtual void readXml( const QDomElement &itemElem, const QDomDocument &doc );
virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsPathResolver &pathResolver ) const;
virtual void readXml( const QDomElement &itemElem, const QDomDocument &doc, const QgsPathResolver &pathResolver );

static QgsTextAnnotation *create() /Factory/;
%Docstring
@@ -52,13 +52,13 @@ class QgsConditionalLayerStyles
:rtype: list of QgsConditionalStyle
%End

bool readXml( const QDomNode &node );
bool readXml( const QDomNode &node, const QgsPathResolver &pathResolver );
%Docstring
Reads field ui properties specific state from Dom node.
:rtype: bool
%End

bool writeXml( QDomNode &node, QDomDocument &doc ) const;
bool writeXml( QDomNode &node, QDomDocument &doc, const QgsPathResolver &pathResolver ) const;
%Docstring
Write field ui properties specific state from Dom node.
:rtype: bool
@@ -244,13 +244,13 @@ class QgsConditionalStyle
:rtype: QgsConditionalStyle
%End

bool readXml( const QDomNode &node );
bool readXml( const QDomNode &node, const QgsPathResolver &pathResolver );
%Docstring
Reads vector conditional style specific state from layer Dom node.
:rtype: bool
%End

bool writeXml( QDomNode &node, QDomDocument &doc ) const;
bool writeXml( QDomNode &node, QDomDocument &doc, const QgsPathResolver &pathResolver ) const;
%Docstring
Write vector conditional style specific state from layer Dom node.
:rtype: bool
@@ -365,8 +365,8 @@ class QgsDiagramRenderer
/** Returns list with all diagram settings in the renderer*/
virtual QList<QgsDiagramSettings> diagramSettings() const = 0;

virtual void readXml( const QDomElement &elem, const QgsVectorLayer *layer ) = 0;
virtual void writeXml( QDomElement &layerElem, QDomDocument &doc, const QgsVectorLayer *layer ) const = 0;
virtual void readXml( const QDomElement& elem, const QgsVectorLayer* layer, const QgsPathResolver &pathResolver ) = 0;
virtual void writeXml( QDomElement& layerElem, QDomDocument& doc, const QgsVectorLayer* layer, const QgsPathResolver &pathResolver ) const = 0;

/** Returns list of legend nodes for the diagram
* @note caller is responsible for deletion of QgsLayerTreeModelLegendNodes
@@ -442,8 +442,8 @@ class QgsDiagramRenderer
static int dpiPaintDevice( const QPainter* );

//read / write diagram
void _readXml( const QDomElement &elem, const QgsVectorLayer *layer );
void _writeXml( QDomElement &rendererElem, QDomDocument &doc, const QgsVectorLayer *layer ) const;
void _readXml( const QDomElement& elem, const QgsVectorLayer* layer, const QgsPathResolver &pathResolver );
void _writeXml( QDomElement& rendererElem, QDomDocument& doc, const QgsVectorLayer* layer, const QgsPathResolver &pathResolver ) const;
};

/** Renders the diagrams for all features with the same settings*/
@@ -467,8 +467,8 @@ class QgsSingleCategoryDiagramRenderer : QgsDiagramRenderer

QList<QgsDiagramSettings> diagramSettings() const;

void readXml( const QDomElement &elem, const QgsVectorLayer *layer );
void writeXml( QDomElement &layerElem, QDomDocument &doc, const QgsVectorLayer *layer ) const;
void readXml( const QDomElement& elem, const QgsVectorLayer* layer, const QgsPathResolver &pathResolver );
void writeXml( QDomElement& layerElem, QDomDocument& doc, const QgsVectorLayer* layer, const QgsPathResolver &pathResolver ) const;

virtual QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const /Factory/;

@@ -533,8 +533,8 @@ class QgsLinearlyInterpolatedDiagramRenderer : QgsDiagramRenderer
bool classificationAttributeIsExpression() const;
void setClassificationAttributeIsExpression( bool isExpression );

void readXml( const QDomElement &elem, const QgsVectorLayer *layer );
void writeXml( QDomElement &layerElem, QDomDocument &doc, const QgsVectorLayer *layer ) const;
void readXml( const QDomElement& elem, const QgsVectorLayer* layer, const QgsPathResolver &pathResolver );
void writeXml( QDomElement& layerElem, QDomDocument& doc, const QgsVectorLayer* layer, const QgsPathResolver &pathResolver ) const;

virtual QList< QgsLayerTreeModelLegendNode * > legendItems( QgsLayerTreeLayer *nodeLayer ) const /Factory/;

@@ -629,20 +629,22 @@ A convenience function to (un)capitalize the layer name



virtual bool readSymbology( const QDomNode &node, QString &errorMessage ) = 0;
virtual bool readSymbology( const QDomNode &node, QString &errorMessage, const QgsPathResolver &pathResolver ) = 0;
%Docstring
Read the symbology for the current layer from the Dom node supplied.
\param node node that will contain the symbology definition for this layer.
\param errorMessage reference to string that will be updated with any error messages
\param pathResolver for transform from relative to absolute paths
:return: true in case of success.
:rtype: bool
%End

virtual bool readStyle( const QDomNode &node, QString &errorMessage );
virtual bool readStyle( const QDomNode &node, QString &errorMessage, const QgsPathResolver &pathResolver );
%Docstring
Read the style for the current layer from the Dom node supplied.
\param node node that will contain the style definition for this layer.
\param errorMessage reference to string that will be updated with any error messages
\param pathResolver for transform from relative to absolute paths
:return: true in case of success.
.. versionadded:: 2.16
.. note::
@@ -651,22 +653,24 @@ A convenience function to (un)capitalize the layer name
:rtype: bool
%End

virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage ) const = 0;
virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsPathResolver &pathResolver ) const = 0;
%Docstring
Write the symbology for the layer into the docment provided.
\param node the node that will have the style element added to it.
\param doc the document that will have the QDomNode added.
\param errorMessage reference to string that will be updated with any error messages
\param pathResolver for transform from absolute to relative paths
:return: true in case of success.
:rtype: bool
%End

virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage ) const;
virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsPathResolver &pathResolver ) const;
%Docstring
Write just the style information for the layer into the document
\param node the node that will have the style element added to it.
\param doc the document that will have the QDomNode added.
\param errorMessage reference to string that will be updated with any error messages
\param pathResolver for transform from absolute to relative paths
:return: true in case of success.
.. versionadded:: 2.16
.. note::
@@ -1026,14 +1030,14 @@ Set the extent
Set whether layer is valid or not - should be used in constructor.
%End

virtual bool readXml( const QDomNode &layer_node );
virtual bool readXml( const QDomNode &layer_node, const QgsPathResolver &pathResolver );
%Docstring
Called by readLayerXML(), used by children to read state specific to them from
project files.
:rtype: bool
%End

virtual bool writeXml( QDomNode &layer_node, QDomDocument &document ) const;
virtual bool writeXml( QDomNode &layer_node, QDomDocument &document, const QgsPathResolver &pathResolver ) const;
%Docstring
Called by writeLayerXML(), used by children to write state specific to them to
project files.
@@ -685,7 +685,7 @@ Return the provider type for this layer
:rtype: str
%End

virtual bool readXml( const QDomNode &layer_node );
virtual bool readXml( const QDomNode &layer_node, const QgsPathResolver &pathResolver );
%Docstring
Reads vector layer specific state from project file Dom node.
.. note::
@@ -694,7 +694,7 @@ Return the provider type for this layer
:rtype: bool
%End

virtual bool writeXml( QDomNode &layer_node, QDomDocument &doc ) const;
virtual bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsPathResolver &pathResolver ) const;
%Docstring
Write vector layer specific state to project file Dom node.
.. note::
@@ -765,44 +765,48 @@ Return the provider type for this layer
:rtype: str
%End

virtual bool readSymbology( const QDomNode &layerNode, QString &errorMessage );
virtual bool readSymbology( const QDomNode &layerNode, QString &errorMessage, const QgsPathResolver &pathResolver );

%Docstring
Read the symbology for the current layer from the Dom node supplied.
\param layerNode node that will contain the symbology definition for this layer.
\param errorMessage reference to string that will be updated with any error messages
\param pathResolver for transform from relative to absolute paths
:return: true in case of success.
:rtype: bool
%End

virtual bool readStyle( const QDomNode &node, QString &errorMessage );
virtual bool readStyle( const QDomNode &node, QString &errorMessage, const QgsPathResolver &pathResolver );

%Docstring
Read the style for the current layer from the Dom node supplied.
\param node node that will contain the style definition for this layer.
\param errorMessage reference to string that will be updated with any error messages
\param pathResolver for transform from relative to absolute paths
:return: true in case of success.
:rtype: bool
%End

virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage ) const;
virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsPathResolver &pathResolver ) const;

%Docstring
Write the symbology for the layer into the docment provided.
\param node the node that will have the style element added to it.
\param doc the document that will have the QDomNode added.
\param errorMessage reference to string that will be updated with any error messages
\param pathResolver for transform from absolute to relative paths
:return: true in case of success.
:rtype: bool
%End

virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage ) const;
virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsPathResolver &pathResolver ) const;

%Docstring
Write just the style information for the layer into the document
\param node the node that will have the style element added to it.
\param doc the document that will have the QDomNode added.
\param errorMessage reference to string that will be updated with any error messages
\param pathResolver for transform from absolute to relative paths
:return: true in case of success.
:rtype: bool
%End
@@ -194,21 +194,21 @@ class QgsRasterLayer : QgsMapLayer

protected:
/** \brief Read the symbology for the current layer from the Dom node supplied */
bool readSymbology( const QDomNode &node, QString &errorMessage );
bool readSymbology( const QDomNode& node, QString& errorMessage, const QgsPathResolver &pathResolver );

/** \brief Read the style information for the current layer from the Dom node supplied */
bool readStyle(const QDomNode &node, QString &errorMessage);
bool readStyle(const QDomNode &node, QString &errorMessage, const QgsPathResolver &pathResolver);

/** \brief Reads layer specific state from project file Dom node */
bool readXml( const QDomNode &layer_node );
bool readXml( const QDomNode& layer_node, const QgsPathResolver &pathResolver );

/** \brief Write the symbology for the layer into the docment provided */
bool writeSymbology( QDomNode&, QDomDocument &doc, QString &errorMessage ) const;
bool writeSymbology( QDomNode&, QDomDocument& doc, QString& errorMessage, const QgsPathResolver &pathResolver ) const;

/** \brief Write the style for the layer into the docment provided */
bool writeStyle(QDomNode &node, QDomDocument &doc, QString &errorMessage) const;
bool writeStyle(QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsPathResolver &pathResolver) const;

/** \brief Write layer specific state to project file Dom node */
bool writeXml( QDomNode &layer_node, QDomDocument &doc ) const;
bool writeXml( QDomNode & layer_node, QDomDocument & doc, const QgsPathResolver &pathResolver ) const;
};

@@ -27,14 +27,14 @@ class Qgs25DRenderer : QgsFeatureRenderer
*
* @param element XML information
*/
static QgsFeatureRenderer *create( QDomElement &element );
QDomElement save( QDomDocument &doc );
static QgsFeatureRenderer* create( QDomElement& element, const QgsPathResolver &pathResolver ) /Factory/;
QDomElement save( QDomDocument& doc, const QgsPathResolver &pathResolver );

void startRender( QgsRenderContext &context, const QgsFields &fields );
void stopRender( QgsRenderContext &context );

QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
QgsFeatureRenderer *clone() const;
QSet<QString> usedAttributes( const QgsRenderContext& context ) const;
QgsFeatureRenderer* clone() const /Factory/;

virtual QgsSymbol *symbolForFeature( QgsFeature &feature, QgsRenderContext &context );
virtual QgsSymbolList symbols( QgsRenderContext &context );
@@ -93,7 +93,7 @@ class Qgs25DRenderer : QgsFeatureRenderer
* we assume that the internals are not compatible and create a new default
* 2.5D renderer.
*/
static Qgs25DRenderer *convertFromRenderer( QgsFeatureRenderer *renderer );
static Qgs25DRenderer* convertFromRenderer( QgsFeatureRenderer* renderer ) /Factory/;

/**
* Is the shadow enabled
@@ -112,10 +112,10 @@ class QgsCategorizedSymbolRenderer : QgsFeatureRenderer
void setClassAttribute( const QString &attr );

//! create renderer from XML element
static QgsFeatureRenderer *create( QDomElement &element ) /Factory/;
static QgsFeatureRenderer* create( QDomElement& element, const QgsPathResolver &pathResolver ) /Factory/;

//! store renderer info to XML element
virtual QDomElement save( QDomDocument &doc );
virtual QDomElement save( QDomDocument& doc, const QgsPathResolver &pathResolver );

//! return a list of symbology items for the legend
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
@@ -668,12 +668,13 @@ class QgsSVGFillSymbolLayer: QgsImageFillSymbolLayer
%End

public:
QgsSVGFillSymbolLayer( const QString &svgFilePath = "", double width = 20, double rotation = 0.0 );
QgsSVGFillSymbolLayer( const QByteArray &svgData, double width = 20, double rotation = 0.0 );
QgsSVGFillSymbolLayer( const QString& svgFilePath, double width = 20, double rotation = 0.0 );
QgsSVGFillSymbolLayer( const QByteArray& svgData, double width = 20, double rotation = 0.0 );
~QgsSVGFillSymbolLayer();

static QgsSymbolLayer *create( const QgsStringMap &properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer *createFromSld( QDomElement &element ) /Factory/;
static QgsSymbolLayer* create( const QgsStringMap& properties = QgsStringMap() ) /Factory/;
static QgsSymbolLayer* createFromSld( QDomElement &element ) /Factory/;
static void resolvePaths( QgsStringMap& properties, const QgsPathResolver& pathResolver, bool saving );

// implemented from base classes

@@ -218,10 +218,10 @@ class QgsGraduatedSymbolRenderer : QgsFeatureRenderer
);

//! create renderer from XML element
static QgsFeatureRenderer *create( QDomElement &element ) /Factory/;
static QgsFeatureRenderer* create( QDomElement& element, const QgsPathResolver &pathResolver ) /Factory/;

//! store renderer info to XML element
virtual QDomElement save( QDomDocument &doc );
virtual QDomElement save( QDomDocument& doc, const QgsPathResolver &pathResolver );

//! return a list of symbology items for the legend
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );

0 comments on commit 8ffd91e

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