22#include "private/wallpaper_p.h"
28class WallpaperScriptPrivate
34WallpaperScript::WallpaperScript(
QObject *parent)
36 d(new WallpaperScriptPrivate)
40WallpaperScript::~WallpaperScript()
45void WallpaperScript::setWallpaper(
Wallpaper *wallpaper)
59QString WallpaperScript::mainScript()
const
61 Q_ASSERT(d->wallpaper);
62 return d->wallpaper->package()->filePath(
"mainscript");
65const Package *WallpaperScript::package()
const
67 Q_ASSERT(d->wallpaper);
68 return d->wallpaper->package();
71KPluginInfo WallpaperScript::description()
const
73 Q_ASSERT(d->wallpaper);
74 return d->wallpaper->d->wallpaperDescription;
77void WallpaperScript::initWallpaper(
const KConfigGroup &config)
82void WallpaperScript::paint(QPainter *painter,
const QRectF &exposedRect)
88void WallpaperScript::save(KConfigGroup &config)
99void WallpaperScript::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
104void WallpaperScript::mousePressEvent(QGraphicsSceneMouseEvent *event)
109void WallpaperScript::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
114void WallpaperScript::wheelEvent(QGraphicsSceneWheelEvent *event)
119void WallpaperScript::setUrls(
const KUrl::List urls)
122 foreach (
const KUrl &url, urls) {
127bool WallpaperScript::isInitialized()
const
130 return d->wallpaper->isInitialized();
135QRectF WallpaperScript::boundingRect()
const
138 return d->wallpaper->boundingRect();
143DataEngine *WallpaperScript::dataEngine(
const QString &name)
const
145 Q_ASSERT(d->wallpaper);
146 return d->wallpaper->dataEngine(name);
152 d->wallpaper->setResizeMethodHint(resizeMethod);
156void WallpaperScript::setTargetSizeHint(
const QSizeF &targetSize)
159 d->wallpaper->setTargetSizeHint(targetSize);
163void WallpaperScript::setConfigurationRequired(
bool needsConfiguring,
const QString &reason)
166 d->wallpaper->setConfigurationRequired(needsConfiguring, reason);
170void WallpaperScript::render(
const QString &sourceImagePath,
const QSize &size,
174 d->wallpaper->render(sourceImagePath, size, resizeMethod, color);
178void WallpaperScript::setUsingRenderingCache(
bool useCache)
181 d->wallpaper->setUsingRenderingCache(useCache);
185bool WallpaperScript::findInCache(
const QString &key, QImage &image,
unsigned int lastModified)
188 return d->wallpaper->findInCache(key, image, lastModified);
193void WallpaperScript::insertIntoCache(
const QString& key,
const QImage &image)
196 d->wallpaper->insertIntoCache(key, image);
200void WallpaperScript::setContextualActions(
const QList<QAction*> &actions)
203 d->wallpaper->setContextualActions(actions);
207void WallpaperScript::update(
const QRectF &exposedArea)
210 d->wallpaper->update(exposedArea);
214void WallpaperScript::configNeedsSaving()
217 d->wallpaper->configNeedsSaving();
221void WallpaperScript::renderCompleted(
const QImage &image)
226void WallpaperScript::urlDropped(
const KUrl &url)
233#include "wallpaperscript.moc"
Data provider for plasmoids (Plasma plugins)
object representing an installed Plasmagik package
The base class for scripting interfaces to be used in loading plasmoids of a given language.
Wallpaper * wallpaper() const
Returns the Plasma::Wallpaper associated with this script component.
virtual void renderCompleted(const QImage &image)
virtual void urlDropped(const KUrl &url)
The base Wallpaper class.
ResizeMethod
Various resize modes supported by the built in image renderer.
Namespace for everything in libplasma.