You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.4 KiB
35 lines
1.4 KiB
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-KDE-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.
|
|
|
|
|