diff --git a/wallpaper.cpp b/wallpaper.cpp index 5bdaf3ff6..549a792ca 100644 --- a/wallpaper.cpp +++ b/wallpaper.cpp @@ -298,6 +298,11 @@ void Wallpaper::setUsingDiskCache(bool useCache) d->cacheRendering = useCache; } +bool Wallpaper::usingDiskCache() const +{ + return d->cacheRendering; +} + void Wallpaper::setResizeMethodHint(Wallpaper::ResizeMethod resizeMethod) { d->lastResizeMethod = resizeMethod; diff --git a/wallpaper.h b/wallpaper.h index 9bc3df852..ddcd9bbbc 100644 --- a/wallpaper.h +++ b/wallpaper.h @@ -60,6 +60,7 @@ class PLASMA_EXPORT Wallpaper : public QObject Q_PROPERTY(QString icon READ icon) Q_PROPERTY(KServiceAction renderingMode READ renderingMode) Q_PROPERTY(QList listRenderingModes READ listRenderingModes) + Q_PROPERTY(bool usingDiskCache READ usingDiskCache WRITE setUsingDiskCache) public: /** @@ -398,6 +399,11 @@ class PLASMA_EXPORT Wallpaper : public QObject */ void setUsingDiskCache(bool useCache); + /** + * @return true if the wallpaper is using disk caching for render results + */ + bool usingDiskCache() const; + /** * Tries to load pixmap with the specified key from cache. *