• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libplasma

Plasma::AppletScript

Plasma::AppletScript Class Reference

#include <appletscript.h>

Inheritance diagram for Plasma::AppletScript:

Inheritance graph
[legend]

List of all members.


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.

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 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  ) 

Sets the applet associated with this AppletScript.

Definition at line 46 of file appletscript.cpp.

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]

Show a configuration dialog.

Definition at line 94 of file appletscript.cpp.

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:
  • appletscript.h
  • appletscript.cpp

libplasma

Skip menu "libplasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal