#include <Plasma/Scripting/AppletScript>
Provides a restricted interface for scripted applets.
Definition at line 51 of file appletscript.h.
Plasma::AppletScript::AppletScript |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
Plasma::AppletScript::~AppletScript |
( |
| ) |
|
void Plasma::AppletScript::addStandardConfigurationPages |
( |
KConfigDialog * |
dialog | ) |
|
|
protected |
This method should be called after a scripting applet has added its own pages to a configuration dialog.
- Since
- 4.3.1
Definition at line 148 of file appletscript.cpp.
Applet * Plasma::AppletScript::applet |
( |
| ) |
const |
void Plasma::AppletScript::configChanged |
( |
| ) |
|
|
virtualslot |
void Plasma::AppletScript::configNeedsSaving |
( |
| ) |
const |
void Plasma::AppletScript::constraintsEvent |
( |
Plasma::Constraints |
constraints | ) |
|
|
virtual |
Called when any of the geometry constraints have been updated.
This is always called prior to painting and should be used as an opportunity to layout the widget, calculate sizings, etc.
Do not call update() from this method; an update() will be triggered at the appropriate time for the applet.
- Parameters
-
constraints | the type of constraints that were updated |
Definition at line 81 of file appletscript.cpp.
QList< QAction * > Plasma::AppletScript::contextualActions |
( |
| ) |
|
|
virtual |
Returns a list of context-related QAction instances.
- Returns
- A list of actions. The default implementation returns an empty list.
Definition at line 86 of file appletscript.cpp.
DataEngine * Plasma::AppletScript::dataEngine |
( |
const QString & |
engine | ) |
const |
|
protected |
- Parameters
-
- Returns
- a data engine associated with this plasmoid
Definition at line 228 of file appletscript.cpp.
KPluginInfo Plasma::AppletScript::description |
( |
| ) |
const |
|
protected |
- Returns
- the KPluginInfo associated with this plasmoid
Definition at line 246 of file appletscript.cpp.
bool Plasma::AppletScript::drawWallpaper |
( |
| ) |
const |
- Returns
- true if the applet is a containment AND if the wallpaper is enabled
- See also
- Containment
- Since
- 4.7
Definition at line 258 of file appletscript.cpp.
Extender * Plasma::AppletScript::extender |
( |
| ) |
const |
bool Plasma::AppletScript::isRegisteredAsDragHandle |
( |
QGraphicsItem * |
item | ) |
|
|
protected |
Animation * Plasma::AppletScript::loadAnimationFromPackage |
( |
const QString & |
name, |
|
|
QObject * |
parent |
|
) |
| |
|
protected |
Loads an animation from the applet package.
- Parameters
-
animation | the animation to load |
- Returns
- an Animation object on success, a NULL pointer on failure
- Since
- 4.5
Definition at line 184 of file appletscript.cpp.
QString Plasma::AppletScript::mainScript |
( |
| ) |
const |
|
protectedvirtual |
const Package * Plasma::AppletScript::package |
( |
| ) |
const |
|
protectedvirtual |
void Plasma::AppletScript::paintInterface |
( |
QPainter * |
painter, |
|
|
const QStyleOptionGraphicsItem * |
option, |
|
|
const QRect & |
contentsRect |
|
) |
| |
|
virtual |
Called when the script should paint the applet.
- Parameters
-
painter | the QPainter to use |
option | the style option containing such flags as selection, level of detail, etc |
contentsRect | the rect to paint within; automatically adjusted for the background, if any |
Definition at line 63 of file appletscript.cpp.
void Plasma::AppletScript::popupEvent |
( |
bool |
popped | ) |
const |
|
signal |
void Plasma::AppletScript::registerAsDragHandle |
( |
QGraphicsItem * |
item | ) |
|
|
protected |
void Plasma::AppletScript::saveState |
( |
KConfigGroup & |
group | ) |
const |
|
signal |
void Plasma::AppletScript::setConfigurationRequired |
( |
bool |
req, |
|
|
const QString & |
reason = QString() |
|
) |
| |
void Plasma::AppletScript::setDrawWallpaper |
( |
bool |
drawWallpaper | ) |
|
set if the containment draws its own wallpaper: it has no effect if the applet is not a containment
- See also
- Containment
- Since
- 4.7
Definition at line 269 of file appletscript.cpp.
void Plasma::AppletScript::setFailedToLaunch |
( |
bool |
failed, |
|
|
const QString & |
reason = QString() |
|
) |
| |
void Plasma::AppletScript::setHasConfigurationInterface |
( |
bool |
hasInterface | ) |
|
Sets whether or not this script has a configuration interface or not.
- Parameters
-
hasInterface | true if the applet is user configurable |
Definition at line 102 of file appletscript.cpp.
QPainterPath Plasma::AppletScript::shape |
( |
| ) |
const |
|
virtual |
Returns the shape of the widget, defaults to the bounding rect.
Definition at line 91 of file appletscript.cpp.
void Plasma::AppletScript::showConfigurationInterface |
( |
| ) |
|
|
virtualslot |
void Plasma::AppletScript::showMessage |
( |
const QIcon & |
icon, |
|
|
const QString & |
message, |
|
|
const MessageButtons |
buttons |
|
) |
| |
|
protected |
QSizeF Plasma::AppletScript::size |
( |
| ) |
const |
Returns the area within which contents can be painted.
Definition at line 72 of file appletscript.cpp.
KConfigDialog * Plasma::AppletScript::standardConfigurationDialog |
( |
| ) |
|
|
protected |
- Returns
- a standard Plasma applet configuration dialog, ready to have pages added to it.
Note that the dialog returned is set to delete on close.
Definition at line 139 of file appletscript.cpp.
void Plasma::AppletScript::unregisterAsDragHandle |
( |
QGraphicsItem * |
item | ) |
|
|
protected |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
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.