104 const QPicture& svgAsPicture(
const QString& file,
double size,
const QColor& fill,
const QColor& outline,
double outlineWidth,
105 double widthScaleFactor,
double rasterScaleFactor,
bool forceVectorOutput =
false );
109 void containsParams(
const QString& path,
bool& hasFillParam, QColor& defaultFillColor,
bool& hasOutlineParam, QColor& defaultOutlineColor,
bool& hasOutlineWidthParam,
110 double& defaultOutlineWidth )
const;
113 QByteArray getImageData(
const QString &path )
const;
117 void statusChanged(
const QString& theStatusQString );
133 QgsSvgCacheEntry* insertSVG(
const QString& file,
double size,
const QColor& fill,
const QColor& outline,
double outlineWidth,
134 double widthScaleFactor,
double rasterScaleFactor );
138 void cachePicture(
QgsSvgCacheEntry* entry,
bool forceVectorOutput =
false );
140 QgsSvgCacheEntry* cacheEntry(
const QString& file,
double size,
const QColor& fill,
const QColor& outline,
double outlineWidth,
141 double widthScaleFactor,
double rasterScaleFactor );
144 void trimToMaximumSize();
150 void downloadProgress( qint64, qint64 );
164 static const long mMaximumSize = 20000000;
167 void replaceElemParams( QDomElement& elem,
const QColor& fill,
const QColor& outline,
double outlineWidth );
169 void containsElemParams(
const QDomElement& elem,
bool& hasFillParam, QColor& defaultFill,
bool& hasOutlineParam, QColor& defaultOutline,
170 bool& hasOutlineWidthParam,
double& defaultOutlineWidth )
const;
176 void printEntryList();
185 #endif // QGSSVGCACHE_H
QgsSvgCacheEntry * previousEntry
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
A cache for images / pictures derived from svg files.
QgsSvgCacheEntry * mLeastRecentEntry
QByteArray mMissingSvg
SVG content to be rendered if SVG file was not found.
QgsSvgCacheEntry * mMostRecentEntry
long mTotalSize
Estimated total size of all images, pictures and svgContent.
QMutex mMutex
Mutex to prevent concurrent access to the class from multiple threads at once (may corrupt the entrie...
QMultiHash< QString, QgsSvgCacheEntry * > mEntryLookup
Entry pointers accessible by file name.
QgsSvgCacheEntry * nextEntry