227 QImage pathAsImage(
const QString &path,
const QSize size,
const bool keepAspectRatio,
const double opacity,
bool &fitsInCache
SIP_OUT,
bool blocking =
false,
double targetDpi = 96,
int frameNumber = -1,
bool *isMissing
SIP_PYARGREMOVE =
nullptr );
244 QSize originalSize(
const QString &path,
bool blocking =
false )
const;
263 int totalFrameCount(
const QString &path,
bool blocking =
false );
283 int nextFrameDelay(
const QString &path,
int currentFrame = 0,
bool blocking =
false );
290 void prepareAnimation(
const QString &path );
301 QImage pathAsImagePrivate(
const QString &path,
const QSize size,
const bool keepAspectRatio,
const double opacity,
bool &fitsInCache,
bool blocking,
double targetDpi,
int frameNumber,
bool *isMissing,
int &totalFrameCount,
int &nextFrameDelayMs );
303 QImage renderImage(
const QString &path, QSize size,
const bool keepAspectRatio,
const double opacity,
double targetDpi,
int frameNumber,
bool &isBroken,
int &totalFrameCount,
int &nextFrameDelayMs,
bool blocking =
false )
const;
305 static QImage getFrameFromReader( QImageReader &reader,
int frameNumber );
307 QSize originalSizePrivate(
const QString &path,
bool blocking =
false )
const;
310 QByteArray mMissingSvg;
312 QByteArray mFetchingSvg;
314 QMap< QString, QString > mExtractedAnimationPaths;
315 std::unique_ptr< QTemporaryDir > mTemporaryDir;
316 QMap< QString, int > mTotalFrameCounts;
317 QMap< QString, QVector< int > > mImageDelays;
319 mutable QgsImageSizeCache mImageSizeCache;
321 friend class QgsImageSizeCache;
322 friend class TestQgsImageCache;
A QObject derived base class for QgsAbstractContentCache.
Base class for entries in a QgsAbstractContentCache.
virtual int dataSize() const =0
Returns the memory usage in bytes for the entry.
virtual void dump() const =0
Dumps debugging strings containing the item's properties.
virtual bool isEqual(const QgsAbstractContentCacheEntry *other) const =0
Tests whether this entry matches another entry.
Abstract base class for file content caches, such as SVG or raster image caches.