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

Plasma

Plasma::DataEngineScript

Plasma::DataEngineScript Class Reference

Provides a restricted interface for scripting a DataEngine. More...

#include <Plasma/Scripting/DataEngineScript>

Inheritance diagram for Plasma::DataEngineScript:
Plasma::ScriptEngine QObject

List of all members.

Public Member Functions

DataEngine * dataEngine () const
 DataEngineScript (QObject *parent=0)
virtual Service * serviceForSource (const QString &source)
void setDataEngine (DataEngine *dataEngine)
virtual bool sourceRequestEvent (const QString &name)
virtual QStringList sources () const
virtual bool updateSourceEvent (const QString &source)
 ~DataEngineScript ()

Protected Member Functions

QString mainScript () const
int minimumPollingInterval () const
const Package * package () const
void removeAllData (const QString &source)
void removeAllSources ()
void removeData (const QString &source, const QString &key)
void setData (const QString &source, const QVariant &value)
void setData (const QString &source, const QString &key, const QVariant &value)
void setMaxSourceCount (uint limit)
void setMinimumPollingInterval (int minimumMs)
void setPollingInterval (uint frequency)

Detailed Description

Provides a restricted interface for scripting a DataEngine.

Definition at line 40 of file dataenginescript.h.


Constructor & Destructor Documentation

Plasma::DataEngineScript::DataEngineScript ( QObject *  parent = 0  )  [explicit]

Default constructor for a DataEngineScript.

Subclasses should not attempt to access the Plasma::DataEngine associated with this DataEngineScript in the constructor. All such set up that requires the DataEngine itself should be done in the init() method.

Definition at line 34 of file dataenginescript.cpp.

Plasma::DataEngineScript::~DataEngineScript (  ) 

Definition at line 40 of file dataenginescript.cpp.


Member Function Documentation

DataEngine * Plasma::DataEngineScript::dataEngine (  )  const

Returns the Plasma::DataEngine associated with this script component.

Definition at line 50 of file dataenginescript.cpp.

QString Plasma::DataEngineScript::mainScript (  )  const [protected, virtual]
Returns:
absolute path to the main script file for this plasmoid

Reimplemented from Plasma::ScriptEngine.

Definition at line 77 of file dataenginescript.cpp.

int Plasma::DataEngineScript::minimumPollingInterval (  )  const [protected]

Definition at line 132 of file dataenginescript.cpp.

const Package * Plasma::DataEngineScript::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 83 of file dataenginescript.cpp.

void Plasma::DataEngineScript::removeAllData ( const QString &  source  )  [protected]

Definition at line 104 of file dataenginescript.cpp.

void Plasma::DataEngineScript::removeAllSources (  )  [protected]

Definition at line 147 of file dataenginescript.cpp.

void Plasma::DataEngineScript::removeData ( const QString &  source,
const QString &  key 
) [protected]

Definition at line 111 of file dataenginescript.cpp.

Service * Plasma::DataEngineScript::serviceForSource ( const QString &  source  )  [virtual]
Parameters:
source the source to targe the Service at
Returns:
a Service that has the source as a destination. The service is parented to the DataEngine, but may be deleted by the caller when finished with it

Definition at line 72 of file dataenginescript.cpp.

void Plasma::DataEngineScript::setData ( const QString &  source,
const QVariant &  value 
) [protected]

Definition at line 97 of file dataenginescript.cpp.

void Plasma::DataEngineScript::setData ( const QString &  source,
const QString &  key,
const QVariant &  value 
) [protected]

Definition at line 89 of file dataenginescript.cpp.

void Plasma::DataEngineScript::setDataEngine ( DataEngine *  dataEngine  ) 

Sets the Plasma::DataEngine associated with this DataEngineScript.

Definition at line 45 of file dataenginescript.cpp.

void Plasma::DataEngineScript::setMaxSourceCount ( uint  limit  )  [protected]

Definition at line 118 of file dataenginescript.cpp.

void Plasma::DataEngineScript::setMinimumPollingInterval ( int  minimumMs  )  [protected]

Definition at line 125 of file dataenginescript.cpp.

void Plasma::DataEngineScript::setPollingInterval ( uint  frequency  )  [protected]

Definition at line 140 of file dataenginescript.cpp.

bool Plasma::DataEngineScript::sourceRequestEvent ( const QString &  name  )  [virtual]

Called when the script should create a source that does not currently exist.

Parameters:
name the name of the source that should be created
Returns:
true if a DataContainer was set up, false otherwise

Definition at line 60 of file dataenginescript.cpp.

QStringList Plasma::DataEngineScript::sources (  )  const [virtual]
Returns:
a list of all the data sources available via this DataEngine Whether these sources are currently available (which is what the default implementation provides) or not is up to the DataEngine to decide. By default, this returns dataEngine()->sources()

Definition at line 55 of file dataenginescript.cpp.

bool Plasma::DataEngineScript::updateSourceEvent ( const QString &  source  )  [virtual]

Called when the script should refresh the data contained in a given source.

Parameters:
source the name of the source that should be updated
Returns:
true if the data was changed, or false if there was no change or if the change will occur later

Definition at line 66 of file dataenginescript.cpp.


The documentation for this class was generated from the following files:
  • dataenginescript.h
  • dataenginescript.cpp

Plasma

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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