23
23
#include < QFont>
24
24
#include < QList>
25
25
#include < QSet>
26
+ #include < QTemporaryFile>
26
27
27
28
class QgsComposition ;
28
29
class QgsComposerLabel ;
@@ -41,8 +42,9 @@ class QgsConfigParser
41
42
virtual void layersAndStylesCapabilities ( QDomElement& parentElement, QDomDocument& doc ) const = 0;
42
43
43
44
/* *Returns one or possibly several maplayers for a given layer name and style. If there are several layers, the layers should be drawn in inverse list order.
44
- If no layers/style are found, an empty list is returned*/
45
- virtual QList<QgsMapLayer*> mapLayerFromStyle ( const QString& layerName, const QString& styleName, bool allowCaching = true ) const = 0;
45
+ If no layers/style are found, an empty list is returned
46
+ @param allowCache true if layer can be read from / written to cache*/
47
+ virtual QList<QgsMapLayer*> mapLayerFromStyle ( const QString& layerName, const QString& styleName, bool useCache = true ) const = 0;
46
48
47
49
/* *Returns number of layers in configuration*/
48
50
virtual int numberOfLayers () const = 0;
@@ -124,6 +126,17 @@ class QgsConfigParser
124
126
/* *List of GML datasets passed outside SLD (e.g. in a SOAP request). Key of the map is the layer name*/
125
127
QMap<QString, QDomDocument*> mExternalGMLDatasets ;
126
128
129
+ // todo: leave this to the layer cash?
130
+ /* *Stores pointers to layers that have to be removed in the destructor of QgsSLDParser*/
131
+ mutable QList<QgsMapLayer*> mLayersToRemove ;
132
+
133
+ /* *Stores the temporary file objects. The class takes ownership of the objects and deletes them in the destructor*/
134
+ mutable QList<QTemporaryFile*> mFilesToRemove ;
135
+
136
+ /* *Stores paths of files that need to be removed after each request (necessary because of contours shapefiles that \
137
+ cannot be handles with QTemporaryFile*/
138
+ mutable QList<QString> mFilePathsToRemove ;
139
+
127
140
/* *Layer font for GetLegendGraphics*/
128
141
QFont mLegendLayerFont ;
129
142
/* *Item font for GetLegendGraphics*/
0 commit comments