From ba9927eadf276bd3332108d66c0544fd5aabd959 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 13 May 2009 16:03:59 +0000 Subject: [PATCH] add a getter and a Q_PROPERTY for the caching setting svn path=/trunk/KDE/kdelibs/; revision=967619 --- wallpaper.cpp | 5 +++++ wallpaper.h | 6 ++++++ 2 files changed, 11 insertions(+) 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. *