46 QgsSvgCacheEntry(
const QString& file,
double size,
double outlineWidth,
double widthScaleFactor,
double rasterScaleFactor,
const QColor& fill,
const QColor& outline,
const QString& lookupKey = QString() );
96 const QImage& svgAsImage(
const QString& file,
double size,
const QColor& fill,
const QColor& outline,
double outlineWidth,
97 double widthScaleFactor,
double rasterScaleFactor,
bool& fitsInCache );
108 const QPicture& svgAsPicture(
const QString& file,
double size,
const QColor& fill,
const QColor& outline,
double outlineWidth,
109 double widthScaleFactor,
double rasterScaleFactor,
bool forceVectorOutput =
false );
113 void containsParams(
const QString& path,
bool& hasFillParam, QColor& defaultFillColor,
bool& hasOutlineParam, QColor& defaultOutlineColor,
bool& hasOutlineWidthParam,
114 double& defaultOutlineWidth )
const;
117 QByteArray getImageData(
const QString &path )
const;
120 const QByteArray& svgContent(
const QString& file,
double size,
const QColor& fill,
const QColor& outline,
double outlineWidth,
121 double widthScaleFactor,
double rasterScaleFactor );
125 void statusChanged(
const QString& theStatusQString );
141 QgsSvgCacheEntry* insertSVG(
const QString& file,
double size,
const QColor& fill,
const QColor& outline,
double outlineWidth,
142 double widthScaleFactor,
double rasterScaleFactor );
146 void cachePicture(
QgsSvgCacheEntry* entry,
bool forceVectorOutput =
false );
148 QgsSvgCacheEntry* cacheEntry(
const QString& file,
double size,
const QColor& fill,
const QColor& outline,
double outlineWidth,
149 double widthScaleFactor,
double rasterScaleFactor );
152 void trimToMaximumSize();
158 void downloadProgress( qint64, qint64 );
162 QMultiHash< QString, QgsSvgCacheEntry* > mEntryLookup;
172 static const long mMaximumSize = 20000000;
175 void replaceElemParams( QDomElement& elem,
const QColor& fill,
const QColor& outline,
double outlineWidth );
177 void containsElemParams(
const QDomElement& elem,
bool& hasFillParam, QColor& defaultFill,
bool& hasOutlineParam, QColor& defaultOutline,
178 bool& hasOutlineWidthParam,
double& defaultOutlineWidth )
const;
184 void printEntryList();
187 QByteArray mMissingSvg;
193 #endif // QGSSVGCACHE_H
QgsSvgCacheEntry * previousEntry
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
A cache for images / pictures derived from svg files.
QString lookupKey
Lookup key used by QgsSvgCache's hashtable (relative or absolute path). Needed for removal from the h...
QString file
Absolute path to SVG file.
QgsSvgCacheEntry * nextEntry