superkaramba
PlasmaSensor Class Reference
#include <plasmaengine.h>

Detailed Description
The PlasmaSensor class implements a SuperKaramba sensor that provides access to Plasma::DataEngine objects.Definition at line 97 of file plasmaengine.h.
Public Slots | |
| virtual QObject * | connectSource (const QString &source, QObject *visualization=0) |
| virtual void | disconnectSource (const QString &source, QObject *visualization=0) |
| QString | engine () |
| bool | isValid () const |
| QVariant | property (const QByteArray &name) const |
| QVariantMap | query (const QString &source) |
| virtual void | setEngine (const QString &name) |
| void | setProperty (const QByteArray &name, const QVariant &value) |
| QStringList | sources () const |
Signals | |
| void | sourceAdded (const QString &source) |
| void | sourceRemoved (const QString &source) |
| void | sourceUpdated (const QString &source, QVariantMap data) |
Public Member Functions | |
| Plasma::DataEngine * | engineImpl () const |
| PlasmaSensor (int interval=-1) | |
| void | setEngineImpl (Plasma::DataEngine *engine, const QString &engineName) |
| virtual | ~PlasmaSensor () |
Protected Slots | |
| virtual void | dataUpdated (const QString &source, Plasma::DataEngine::Data data) |
| virtual void | update () |
Constructor & Destructor Documentation
| PlasmaSensor::PlasmaSensor | ( | int | interval = -1 |
) |
Definition at line 138 of file plasmaengine.cpp.
| PlasmaSensor::~PlasmaSensor | ( | ) | [virtual] |
Definition at line 143 of file plasmaengine.cpp.
Member Function Documentation
| QObject * PlasmaSensor::connectSource | ( | const QString & | source, | |
| QObject * | visualization = 0 | |||
| ) | [virtual, slot] |
Connect with a source.
Each time the source is updated the sourceUpdated() signal will be emitted.
- Returns:
- a PlasmaSensorConnector instance if the visualization object is an instance of a Meter else NULL will be returned.
Definition at line 215 of file plasmaengine.cpp.
| void PlasmaSensor::dataUpdated | ( | const QString & | source, | |
| Plasma::DataEngine::Data | data | |||
| ) | [protected, virtual, slot] |
| QString PlasmaSensor::engine | ( | ) | [slot] |
| Plasma::DataEngine * PlasmaSensor::engineImpl | ( | ) | const |
Definition at line 149 of file plasmaengine.cpp.
| bool PlasmaSensor::isValid | ( | ) | const [slot] |
Returns true if an engine was defined and if the engine is valid else false got returned.
Definition at line 188 of file plasmaengine.cpp.
| QVariant PlasmaSensor::property | ( | const QByteArray & | name | ) | const [slot] |
| QVariantMap PlasmaSensor::query | ( | const QString & | source | ) | [slot] |
| void PlasmaSensor::setEngine | ( | const QString & | name | ) | [virtual, slot] |
Set the engine that should be used.
This could be e.g. "time" for the Plasma TimeEngine. This method does use the Plasma::DataEngineManager to fetch a Plasma::DataEngine .
Definition at line 165 of file plasmaengine.cpp.
| void PlasmaSensor::setEngineImpl | ( | Plasma::DataEngine * | engine, | |
| const QString & | engineName | |||
| ) |
Definition at line 154 of file plasmaengine.cpp.
| void PlasmaSensor::setProperty | ( | const QByteArray & | name, | |
| const QVariant & | value | |||
| ) | [slot] |
| void PlasmaSensor::sourceAdded | ( | const QString & | source | ) | [signal] |
Emitted when a new data source is created.
- Parameters:
-
source The name of the data source.
| void PlasmaSensor::sourceRemoved | ( | const QString & | source | ) | [signal] |
Emitted when a data source is removed.
- Parameters:
-
source The name of the data source.
| QStringList PlasmaSensor::sources | ( | ) | const [slot] |
Return a list of all the data sources available via this DataEngine.
Definition at line 193 of file plasmaengine.cpp.
| void PlasmaSensor::sourceUpdated | ( | const QString & | source, | |
| QVariantMap | data | |||
| ) | [signal] |
Emitted when a data source got updated.
- Parameters:
-
source The name of the data source. data The map of the data that got changed.
| void PlasmaSensor::update | ( | ) | [protected, virtual, slot] |
Request to update the sensor.
This will be called by the timer each sensor may have and which got emitted each once per defined interval.
Implements Sensor.
Definition at line 247 of file plasmaengine.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference