KFile plugins| Abstract |
This document describes how to provide meta-data support for a specific file type, and also how to use that meta-data in your application. It is presented as an example based tutorial. In this context, meta-data is information in the file that describes the file itself. For example, typical meta-data for an image is the number of pixels in the image. This document is matched to Qt 3.3 and KDE 3.3. |
This tutorial is about writing a meta-data plugins for KDE. It might help to explain what I mean by meta-data, and also what I mean by a plugin.
Meta-data is a unfortunately a bit of a buzzword term, but in relation to some data (for example, a JPEG encoded digital photograph), it means some additional data describing that data (for example, the camera settings that were used to take the image). The terms meta-information and meta-info have equivalent meaning.
In KDE, a plugin is a dynamically loaded library that provides certain functionality over a well defined (and often quite restrictive) interface. That may not mean much - don't worry though, since it will become more apparent later.
So if we have a JPEG encoded photograph, we can get at the meta-data by using Konqueror. If you right-click on the image file, you will get a small menu as shown below.
If you select the bottom entry, a small Properties window will pop-up. If you select the third tabbed window (labelled Meta Info, you will see the meta-data associated with the image, as shown below.
Note that the third tab will only be present in the Properties window for some file types. Specifically, the Meta Info tab will only be provided if KDE has a compatible meta-data plugin for that file type. Inside KDE, these are usually stored in a directory called kfile-plugins within each CVS module (for example, kdemultimedia/kfile-plugins; kdegraphics/kfile-plugins; kdeaddons/kfile-plugins; kdeadmin/kfile-plugins; kdepim/kfile-plugins or koffice/tools/kfile-plugins).
| Next >>> | ||
| Getting started - MNG file |