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 () |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
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) | |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
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.
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.
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.