Development/Tutorials/Plasma/Python/Using DataEngines

< Development‎ | Tutorials‎ | Plasma
Revision as of 14:17, 18 January 2009 by Sedwards (Talk | contribs)

Jump to: navigation, search

Abstract

One of the most important concepts in Plasma is that of the "DataEngine". DataEngines are used to deliver data from somewhere, often from an internet service for example, to your applet. In this tutorial we'll discuss DataEngines, what they are, and how to use them from your Plasma applet.

What are DataEngines?

As already mentioned, DataEngines are objects which serve to deliver some kind of data to Plasma applets. Plasma supports many different DataEngines out of the box which deliver all sorts of varied information about the state of the machine, e.g. CPU usage, memory usage, position of the mouse pointer; to things such as the current weather report, current time or the latest comic from the internet. DataEngines are used to supply the raw data which an applet can display. Separating the part of the code which fetches data from the part which displays the data means that one DataEngine can be reused by many applets, regardless of which language the DataEngine is written in. It also makes it easy for people to display the same data using different applets which may tuned to different tasks of screen form factors.

Exploring DataEngines

Plasma comes with a handy tool called plasmaengineexplorer to list the running DataEngines and examine them to see what kind of data and fields them send. plasmaengineexplorer can be simply started from the shell as so. plasmaengineexplorer


TODO: finish tutorial.


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