libplasma
Plasma::AppletScript Class Reference
#include <appletscript.h>

Detailed Description
Definition at line 42 of file appletscript.h.
Public Slots | |
virtual void | showConfigurationInterface () |
Public Member Functions | |
Plasma::Applet * | applet () const |
AppletScript (QObject *parent=0) | |
virtual void | constraintsEvent (Plasma::Constraints constraints) |
virtual QList< QAction * > | contextualActions () |
virtual void | paintInterface (QPainter *painter, const QStyleOptionGraphicsItem *option, const QRect &contentsRect) |
void | setApplet (Plasma::Applet *applet) |
virtual QPainterPath | shape () const |
Q_INVOKABLE QSizeF | size () const |
~AppletScript () | |
Protected Member Functions | |
Q_INVOKABLE DataEngine * | dataEngine (const QString &engine) const |
QString | mainScript () const |
const Package * | package () const |
Constructor & Destructor Documentation
Plasma::AppletScript::AppletScript | ( | QObject * | parent = 0 |
) | [explicit] |
Default constructor for an AppletScript.
Subclasses should not attempt to access the Plasma::Applet associated with this AppletScript in the constructor. All such set up that requires the Applet itself should be done in the init() method.
Definition at line 34 of file appletscript.cpp.
Plasma::AppletScript::~AppletScript | ( | ) |
Definition at line 41 of file appletscript.cpp.
Member Function Documentation
Applet * Plasma::AppletScript::applet | ( | ) | const |
Returns the Plasma::Applet associated with this script component.
Definition at line 51 of file appletscript.cpp.
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 73 of file appletscript.cpp.
Returns a list of context-related QAction instances.
- Returns:
- A list of actions. The default implementation returns an empty list.
Definition at line 78 of file appletscript.cpp.
DataEngine * Plasma::AppletScript::dataEngine | ( | const QString & | engine | ) | const [protected] |
- engine name of the engine
- Returns:
- a data engine associated with this plasmoid
Definition at line 98 of file appletscript.cpp.
QString Plasma::AppletScript::mainScript | ( | ) | const [protected, virtual] |
- Returns:
- absolute path to the main script file for this plasmoid
Reimplemented from Plasma::ScriptEngine.
Definition at line 104 of file appletscript.cpp.
const Package * Plasma::AppletScript::package | ( | ) | const [protected, virtual] |
- Returns:
- the Package associated with this plasmoid which can be used to request resources, such as images and interface files.
Reimplemented from Plasma::ScriptEngine.
Definition at line 110 of file appletscript.cpp.
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
Definition at line 57 of file appletscript.cpp.
void Plasma::AppletScript::setApplet | ( | Plasma::Applet * | applet | ) |
QPainterPath Plasma::AppletScript::shape | ( | ) | const [virtual] |
Returns the shape of the widget, defaults to the bounding rect.
Definition at line 83 of file appletscript.cpp.
void Plasma::AppletScript::showConfigurationInterface | ( | ) | [virtual, slot] |
QSizeF Plasma::AppletScript::size | ( | ) | const |
Returns the area within which contents can be painted.
Definition at line 64 of file appletscript.cpp.
The documentation for this class was generated from the following files: