Plasma
#include <Plasma/Scripting/WallpaperScript>
Public Member Functions | |
WallpaperScript (QObject *parent=0) | |
~WallpaperScript () | |
virtual QWidget * | createConfigurationInterface (QWidget *parent) |
virtual void | initWallpaper (const KConfigGroup &config) |
virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
virtual void | paint (QPainter *painter, const QRectF &exposedRect) |
virtual void | save (KConfigGroup &config) |
void | setUrls (const KUrl::List urls) |
void | setWallpaper (Wallpaper *wallpaper) |
Wallpaper * | wallpaper () const |
virtual void | wheelEvent (QGraphicsSceneWheelEvent *event) |
Public Member Functions inherited from Plasma::ScriptEngine | |
~ScriptEngine () | |
virtual bool | init () |
Protected Slots | |
virtual void | renderCompleted (const QImage &image) |
virtual void | urlDropped (const KUrl &url) |
Protected Member Functions | |
QRectF | boundingRect () const |
void | configNeedsSaving () |
DataEngine * | dataEngine (const QString &name) const |
KPluginInfo | description () const |
bool | findInCache (const QString &key, QImage &image, unsigned int lastModified=0) |
void | insertIntoCache (const QString &key, const QImage &image) |
bool | isInitialized () const |
QString | mainScript () const |
const Package * | package () const |
void | render (const QString &sourceImagePath, const QSize &size, Wallpaper::ResizeMethod resizeMethod=Plasma::Wallpaper::ScaledResize, const QColor &color=QColor(0, 0, 0)) |
void | setConfigurationRequired (bool needsConfiguring, const QString &reason=QString()) |
void | setContextualActions (const QList< QAction * > &actions) |
void | setResizeMethodHint (Wallpaper::ResizeMethod resizeMethod) |
void | setTargetSizeHint (const QSizeF &targetSize) |
void | setUsingRenderingCache (bool useCache) |
void | update (const QRectF &exposedArea) |
Protected Member Functions inherited from Plasma::ScriptEngine | |
ScriptEngine (QObject *parent=0) | |
Detailed Description
Provides a restricted interface for scripting a Wallpaper.
Definition at line 42 of file wallpaperscript.h.
Constructor & Destructor Documentation
|
explicit |
Default constructor for a WallpaperScript.
Subclasses should not attempt to access the Plasma::Wallpaper associated with this WallpaperScript in the constructor. All such set up that requires the Wallpaper itself should be done in the init() method.
Definition at line 34 of file wallpaperscript.cpp.
Plasma::WallpaperScript::~WallpaperScript | ( | ) |
Definition at line 40 of file wallpaperscript.cpp.
Member Function Documentation
|
protected |
Definition at line 135 of file wallpaperscript.cpp.
|
protected |
Definition at line 214 of file wallpaperscript.cpp.
Returns a widget that can be used to configure the options (if any) associated with this wallpaper.
It will be deleted by the caller when it complete. The default implementation returns a null pointer.
To signal that settings have changed connect to settingsChanged(bool modified) in parent
.
Emit settingsChanged(true) when the settings are changed and false when the original state is restored.
Implementation detail note: for best visual results, use a QGridLayout with two columns, with the option labels in column 0
Definition at line 93 of file wallpaperscript.cpp.
|
protected |
Definition at line 143 of file wallpaperscript.cpp.
|
protected |
- Returns
- the KPluginInfo associated with this wallpaper
Definition at line 71 of file wallpaperscript.cpp.
|
protected |
Definition at line 185 of file wallpaperscript.cpp.
|
virtual |
This method is called once the wallpaper is loaded or mode is changed.
The mode can be retrieved using the renderingMode() method.
- Parameters
-
config Config group to load settings
Definition at line 77 of file wallpaperscript.cpp.
|
protected |
Definition at line 193 of file wallpaperscript.cpp.
|
protected |
Definition at line 127 of file wallpaperscript.cpp.
|
protectedvirtual |
- Returns
- absolute path to the main script file for this wallpaper
Reimplemented from Plasma::ScriptEngine.
Definition at line 59 of file wallpaperscript.cpp.
|
virtual |
Mouse move event.
To prevent further propagation of the event, the event must be accepted.
- Parameters
-
event the mouse event object
Definition at line 99 of file wallpaperscript.cpp.
|
virtual |
Mouse press event.
To prevent further propagation of the even, and to receive mouseMoveEvents, the event must be accepted.
- Parameters
-
event the mouse event object
Definition at line 104 of file wallpaperscript.cpp.
|
virtual |
Mouse release event.
To prevent further propagation of the event, the event must be accepted.
- Parameters
-
event the mouse event object
Definition at line 109 of file wallpaperscript.cpp.
|
protectedvirtual |
- Returns
- the Package associated with this wallpaper which can be used to request resources, such as images and interface files.
Reimplemented from Plasma::ScriptEngine.
Definition at line 65 of file wallpaperscript.cpp.
|
virtual |
This method is called when the wallpaper should be painted.
- Parameters
-
painter the QPainter to use to do the painting exposedRect the rect to paint within
Definition at line 82 of file wallpaperscript.cpp.
|
protected |
Definition at line 170 of file wallpaperscript.cpp.
|
protectedvirtualslot |
Definition at line 221 of file wallpaperscript.cpp.
|
virtual |
This method is called when settings need to be saved.
- Parameters
-
config Config group to save settings
Definition at line 88 of file wallpaperscript.cpp.
|
protected |
Definition at line 163 of file wallpaperscript.cpp.
|
protected |
Definition at line 200 of file wallpaperscript.cpp.
|
protected |
Definition at line 149 of file wallpaperscript.cpp.
|
protected |
Definition at line 156 of file wallpaperscript.cpp.
void Plasma::WallpaperScript::setUrls | ( | const KUrl::List | urls | ) |
|
protected |
Definition at line 178 of file wallpaperscript.cpp.
void Plasma::WallpaperScript::setWallpaper | ( | Wallpaper * | wallpaper | ) |
Sets the Plasma::Wallpaper associated with this WallpaperScript.
Definition at line 45 of file wallpaperscript.cpp.
|
protected |
Definition at line 207 of file wallpaperscript.cpp.
|
protectedvirtualslot |
Definition at line 226 of file wallpaperscript.cpp.
Wallpaper * Plasma::WallpaperScript::wallpaper | ( | ) | const |
Returns the Plasma::Wallpaper associated with this script component.
Definition at line 54 of file wallpaperscript.cpp.
|
virtual |
Mouse wheel event.
To prevent further propagation of the event, the event must be accepted.
- Parameters
-
event the wheel event object
Definition at line 114 of file wallpaperscript.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.