Plasma
Plasma::DataEngineScript Class Reference
Provides a restricted interface for scripting a DataEngine. More...
#include <Plasma/Scripting/DataEngineScript>

Public Member Functions | |
| DataEngineScript (QObject *parent=0) | |
| ~DataEngineScript () | |
| DataEngine * | dataEngine () const |
| 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) |
Protected Member Functions | |
| void | addSource (DataContainer *source) |
| DataEngine::SourceDict | containerDict () const |
| KPluginInfo | description () const |
| void | forceImmediateUpdateOfAllVisualizations () |
| 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 | removeSource (const QString &source) |
| void | scheduleSourcesUpdated () |
| void | setData (const QString &source, const QString &key, const QVariant &value) |
| void | setData (const QString &source, const QVariant &value) |
| void | setData (const QString &source, const DataEngine::Data &values) |
| void | setIcon (const QString &icon) |
| void | setMaxSourceCount (uint limit) |
| void | setMinimumPollingInterval (int minimumMs) |
| void | setName (const QString &name) |
| void | setPollingInterval (uint frequency) |
| void | updateAllSources () |
Detailed Description
Provides a restricted interface for scripting a DataEngine.
Definition at line 41 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 35 of file dataenginescript.cpp.
| Plasma::DataEngineScript::~DataEngineScript | ( | ) |
Definition at line 41 of file dataenginescript.cpp.
Member Function Documentation
| void Plasma::DataEngineScript::addSource | ( | DataContainer * | source | ) | [protected] |
Definition at line 169 of file dataenginescript.cpp.
| DataEngine::SourceDict Plasma::DataEngineScript::containerDict | ( | ) | const [protected] |
Definition at line 176 of file dataenginescript.cpp.
| DataEngine * Plasma::DataEngineScript::dataEngine | ( | ) | const |
Returns the Plasma::DataEngine associated with this script component.
Definition at line 51 of file dataenginescript.cpp.
| KPluginInfo Plasma::DataEngineScript::description | ( | ) | const [protected] |
- Returns:
- the KPluginInfo associated with this plasmoid
Definition at line 91 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::forceImmediateUpdateOfAllVisualizations | ( | ) | [protected] |
Definition at line 219 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 79 of file dataenginescript.cpp.
| int Plasma::DataEngineScript::minimumPollingInterval | ( | ) | const [protected] |
Definition at line 147 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 85 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::removeAllData | ( | const QString & | source | ) | [protected] |
Definition at line 119 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::removeAllSources | ( | ) | [protected] |
Definition at line 162 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::removeData | ( | const QString & | source, |
| const QString & | key | ||
| ) | [protected] |
Definition at line 126 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::removeSource | ( | const QString & | source | ) | [protected] |
Definition at line 205 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::scheduleSourcesUpdated | ( | ) | [protected] |
Definition at line 198 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 73 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::setData | ( | const QString & | source, |
| const DataEngine::Data & | values | ||
| ) | [protected] |
Adds a set of values to a source.
- Parameters:
-
source the name of the source to set the data on a key/value collection to add to the source
- Since:
- 4.5
Definition at line 112 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::setData | ( | const QString & | source, |
| const QString & | key, | ||
| const QVariant & | value | ||
| ) | [protected] |
Definition at line 97 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::setData | ( | const QString & | source, |
| const QVariant & | value | ||
| ) | [protected] |
Definition at line 105 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::setDataEngine | ( | DataEngine * | dataEngine | ) |
Sets the Plasma::DataEngine associated with this DataEngineScript.
Definition at line 46 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::setIcon | ( | const QString & | icon | ) | [protected] |
Definition at line 191 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::setMaxSourceCount | ( | uint | limit | ) | [protected] |
Definition at line 133 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::setMinimumPollingInterval | ( | int | minimumMs | ) | [protected] |
Definition at line 140 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::setName | ( | const QString & | name | ) | [protected] |
Definition at line 184 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::setPollingInterval | ( | uint | frequency | ) | [protected] |
Definition at line 155 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 61 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 56 of file dataenginescript.cpp.
| void Plasma::DataEngineScript::updateAllSources | ( | ) | [protected] |
Definition at line 212 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 67 of file dataenginescript.cpp.
The documentation for this class was generated from the following files:
KDE 4.6 API Reference