add a getter and a Q_PROPERTY for the caching setting

svn path=/trunk/KDE/kdelibs/; revision=967619
This commit is contained in:
Aaron J. Seigo 2009-05-13 16:03:59 +00:00
parent 1a892f1c41
commit ba9927eadf
2 changed files with 11 additions and 0 deletions

View File

@ -298,6 +298,11 @@ void Wallpaper::setUsingDiskCache(bool useCache)
d->cacheRendering = useCache; d->cacheRendering = useCache;
} }
bool Wallpaper::usingDiskCache() const
{
return d->cacheRendering;
}
void Wallpaper::setResizeMethodHint(Wallpaper::ResizeMethod resizeMethod) void Wallpaper::setResizeMethodHint(Wallpaper::ResizeMethod resizeMethod)
{ {
d->lastResizeMethod = resizeMethod; d->lastResizeMethod = resizeMethod;

View File

@ -60,6 +60,7 @@ class PLASMA_EXPORT Wallpaper : public QObject
Q_PROPERTY(QString icon READ icon) Q_PROPERTY(QString icon READ icon)
Q_PROPERTY(KServiceAction renderingMode READ renderingMode) Q_PROPERTY(KServiceAction renderingMode READ renderingMode)
Q_PROPERTY(QList<KServiceAction> listRenderingModes READ listRenderingModes) Q_PROPERTY(QList<KServiceAction> listRenderingModes READ listRenderingModes)
Q_PROPERTY(bool usingDiskCache READ usingDiskCache WRITE setUsingDiskCache)
public: public:
/** /**
@ -398,6 +399,11 @@ class PLASMA_EXPORT Wallpaper : public QObject
*/ */
void setUsingDiskCache(bool useCache); 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. * Tries to load pixmap with the specified key from cache.
* *