Development/Tutorials/Plasma4/Services: Difference between revisions

From KDE TechBase
(add some place holders)
Line 5: Line 5:
series=Plasma Tutorial|
series=Plasma Tutorial|


name=Writing a Data Engine|
name=Writing a Service|


pre=[http://mindview.net/Books/TICPP/ThinkingInCPP2e.html C++], [http://www.trolltech.com/products/qt/ Qt], [[Getting_Started/Build/KDE4|KDE4 development environment]]|
pre=[http://mindview.net/Books/TICPP/ThinkingInCPP2e.html C++], [http://www.trolltech.com/products/qt/ Qt], [[Getting_Started/Build/KDE4|KDE4 development environment]]|
Line 11: Line 11:
next=|  
next=|  


reading=[http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/classPlasma_1_1DataEngine.html DataEngine API], [[Development/Tutorials/CMake|CMake Tutorials]], [[Development/Tutorials/Plasma/GettingStarted|Writing a Plasmoid (Tutorial)]]
reading=[http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/classPlasma_1_1DataEngine.html DataEngine API], [[Development/Tutorials/CMake|CMake Tutorials]], [[Development/Tutorials/Plasma/GettingStarted|Writing a Plasmoid (Tutorial)]], [[Development/Tutorials/Plasma/DataEngines|Writing a Data Engine]]
}}
}}


Line 33: Line 33:


[[Image:Plasma-engine-explorer-task-service.png]]
[[Image:Plasma-engine-explorer-task-service.png]]
==The Code==
This tutorial will cover adding a service associated with a source into an existing data engine.
===The Description of the Service and its parameters===
====Writing an Operations File====
===The Main Code===
====Responding to Request for the Service Associated to a Source====
====Writing the Code Executing the Action of the Service====
====Building it====
==Testing==

Revision as of 12:13, 24 February 2011


Development/Tutorials/Plasma/DataEngines


Writing a Service
Tutorial Series   Plasma Tutorial
Previous   C++, Qt, KDE4 development environment
What's Next  
Further Reading   DataEngine API, CMake Tutorials, Writing a Plasmoid (Tutorial), Writing a Data Engine

Abstract

cover services, .operations file, .operations dtd spec, perhaps make a service like the pastebin one or something. idk, something easy.

http://www.kde.org/standards/kcfg/1.0/kcfg.xsd

also mention how a service can access the dataengine via it's pointer(I think that's in public api), if it really really needs to(e.g. plasma-kdm can't live without that)

The Plasma Engine Explorer

A very useful tool for anyone writing services is the Plasma engine explorer. You can use it to see test services by launching them by running

plasmaengineexplorer

If the service you want to test is associated to a source, you can access a dialog to launch the service and set its parameters by using the contextual menu of the source and selecting "Get associated service"


The Code

This tutorial will cover adding a service associated with a source into an existing data engine.

The Description of the Service and its parameters

Writing an Operations File

The Main Code

Responding to Request for the Service Associated to a Source

Writing the Code Executing the Action of the Service

Building it

Testing