blob: d9acff38c767d1df3d80901d823e42a7ce9211e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
This directory contains the framework for KBabel to be easily extensible with
plugins for searching translations.
For an examples of modules see subdirectory "modules".
Here is a short description, how to write an module:
First off all, the module must inherit the interface class SearchEngine and
has to implement all the virtual functions in there. Also a preferences
widget must be available, that has to inherit from PrefWidget.
Just include searchengine.h to have everything necessary available.
Then you module has to be compiled as shared library and there must be a
factory available, so that it can be loaded with KLibLoader. See
documentation of KLibLoader for more details. The library should be prefixed
by "kbabeldict_" instead of more common "lib". This is to indicate that it is
a module for KBabelDict.
The method of dictionary loading has changed in KBabel 1.2, but the
modules for previous versions should work. Here is how to install
the dictionary: You should define a standard KDE service desktop file.
The most important entry is
X-TDE-Library=<libname>
where <libname> is the name of the shared library, that contains your
SearchEngine, for example "kbabeldict_pocompendium".
Additionally you can add a list of applications, to them your module is
restricted to with "Applications=<list>". For example with "Applications=kbabel",
your module will only be used in KBabel. If you omit the entry, the
module can be used in any application.
|