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

superkaramba

PlasmaSensor Class Reference

#include <plasmaengine.h>

Inheritance diagram for PlasmaSensor:

Inheritance graph
[legend]

List of all members.


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]

Plasma calls this if data changed.

Definition at line 262 of file plasmaengine.cpp.

void PlasmaSensor::disconnectSource ( const QString &  source,
QObject *  visualization = 0 
) [virtual, slot]

Disconnect from a source.

Definition at line 232 of file plasmaengine.cpp.

QString PlasmaSensor::engine (  )  [slot]

Return the name of the engine.

Definition at line 160 of file plasmaengine.cpp.

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]

Get a property.

Definition at line 198 of file plasmaengine.cpp.

QVariantMap PlasmaSensor::query ( const QString &  source  )  [slot]

Gets the data associated with a data source.

Definition at line 209 of file plasmaengine.cpp.

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]

Set a property.

Definition at line 203 of file plasmaengine.cpp.

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

superkaramba

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

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • okteta
  • printer-applet
  • superkaramba
  • sweeper
Generated for kdeutils 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