Transcript of talk: "Writing plugins as an introduction to KDE"

KDE Contributor and Developer Conference

Notes taken by: Jonathan Riddell (these are not official material)

More information on the talk can be found here

A plugin is a dynamically loaded library, uses a well defined limited interface, provides a service or information and is sometimes associated with a mime type by KTrader.

Example: new KPropertiesDialogue(KUrl("/home/bradh/foo.pdf"), this);

That one line gives a dialog with a whole load of information about the file, whoever wrote this stuff is cool.

What needs to be done? A class which inherits from KFilePlugin, an implementation (hard bit) and a .desktop file.

He shows us a short class declaraton with a constructor and a shared library line.

Implementation has a KGenericFactoryPlugin.

.desktop file you can just copy from another plugin to get an example. X-KDE-Library is important, it has to match the factory plugin name.

Rest is mostly code, look at the slides.

[ Edit ]