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

superkaramba

Public Slots | Signals | Public Member Functions | Protected Slots | List of all members
PlasmaSensor Class Reference

#include <plasmaengine.h>

Inheritance diagram for PlasmaSensor:
Inheritance graph
[legend]

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
 
- Public Slots inherited from Sensor
virtual void update ()=0
 

Signals

void sourceAdded (const QString &source)
 
void sourceRemoved (const QString &source)
 
void sourceUpdated (const QString &source, QVariantMap data)
 

Public Member Functions

 PlasmaSensor (int interval=-1)
 
virtual ~PlasmaSensor ()
 
Plasma::DataEngine * engineImpl () const
 
void setEngineImpl (Plasma::DataEngine *engine, const QString &engineName)
 
- Public Member Functions inherited from Sensor
 Sensor (int msec=1000)
 
virtual ~Sensor ()
 
void addMeter (SensorParams *s)
 
void deleteMeter (Meter *meter)
 
SensorParams * hasMeter (const Meter *meter) const
 
int isEmpty ()
 
virtual void setMaxValue (SensorParams *s)
 
void start ()
 

Protected Slots

virtual void dataUpdated (const QString &source, Plasma::DataEngine::Data data)
 
virtual void update ()
 

Additional Inherited Members

- Protected Attributes inherited from Sensor
QList< QObject * > * objList
 

Detailed Description

The PlasmaSensor class implements a SuperKaramba sensor that provides access to Plasma::DataEngine objects.

Definition at line 97 of file plasmaengine.h.

Constructor & Destructor Documentation

PlasmaSensor::PlasmaSensor ( int  interval = -1)

Definition at line 139 of file plasmaengine.cpp.

PlasmaSensor::~PlasmaSensor ( )
virtual

Definition at line 144 of file plasmaengine.cpp.

Member Function Documentation

QObject * PlasmaSensor::connectSource ( const QString &  source,
QObject *  visualization = 0 
)
virtualslot

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 216 of file plasmaengine.cpp.

void PlasmaSensor::dataUpdated ( const QString &  source,
Plasma::DataEngine::Data  data 
)
protectedvirtualslot

Plasma calls this if data changed.

Definition at line 263 of file plasmaengine.cpp.

void PlasmaSensor::disconnectSource ( const QString &  source,
QObject *  visualization = 0 
)
virtualslot

Disconnect from a source.

Definition at line 233 of file plasmaengine.cpp.

QString PlasmaSensor::engine ( )
slot

Return the name of the engine.

Definition at line 161 of file plasmaengine.cpp.

Plasma::DataEngine * PlasmaSensor::engineImpl ( ) const

Definition at line 150 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 189 of file plasmaengine.cpp.

QVariant PlasmaSensor::property ( const QByteArray &  name) const
slot

Get a property.

Definition at line 199 of file plasmaengine.cpp.

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

Gets the data associated with a data source.

Definition at line 210 of file plasmaengine.cpp.

void PlasmaSensor::setEngine ( const QString &  name)
virtualslot

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 166 of file plasmaengine.cpp.

void PlasmaSensor::setEngineImpl ( Plasma::DataEngine *  engine,
const QString &  engineName 
)

Definition at line 155 of file plasmaengine.cpp.

void PlasmaSensor::setProperty ( const QByteArray &  name,
const QVariant &  value 
)
slot

Set a property.

Definition at line 204 of file plasmaengine.cpp.

void PlasmaSensor::sourceAdded ( const QString &  source)
signal

Emitted when a new data source is created.

Parameters
sourceThe name of the data source.
void PlasmaSensor::sourceRemoved ( const QString &  source)
signal

Emitted when a data source is removed.

Parameters
sourceThe 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 194 of file plasmaengine.cpp.

void PlasmaSensor::sourceUpdated ( const QString &  source,
QVariantMap  data 
)
signal

Emitted when a data source got updated.

Parameters
sourceThe name of the data source.
dataThe map of the data that got changed.
void PlasmaSensor::update ( )
protectedvirtualslot

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.

Definition at line 248 of file plasmaengine.cpp.


The documentation for this class was generated from the following files:
  • plasmaengine.h
  • plasmaengine.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

superkaramba

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal