~ubuntu-branches/ubuntu/quantal/kiten/quantal-proposed

« back to all changes in this revision

Viewing changes to lib/Mainpage.dox

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2011-07-10 11:23:47 UTC
  • Revision ID: james.westby@ubuntu.com-20110710112347-ykfhtvam3kgssspo
Tags: upstream-4.6.90+repack
ImportĀ upstreamĀ versionĀ 4.6.90+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** @mainpage The libkiten Library API Reference
 
2
<p><b>
 
3
Overview |
 
4
@ref components |
 
5
@ref using |
 
6
@ref adding
 
7
</b></p>
 
8
 
 
9
This is the online reference for developing using the libkiten library.
 
10
 
 
11
libkiten is a library for managing a variety of japanese cross-language
 
12
dictionaries through a common interface. It provides a light abstraction layer
 
13
over various types of japanese dictionaries, with a simple facility for adding
 
14
more types.
 
15
 
 
16
@authors
 
17
(c)2001 Jason Katz-Brown <jason@katzbrown.com> : Original Author of most of kiten and libkiten
 
18
(c)1998 Jim W. Breen <jwb@csse.monash.edu.au> : Creator of an index file format used in libkiten
 
19
(c)2006-2007 Eric Kjeldergaard : Rewriting effort for KDE 4
 
20
(c)2006-2008 Joseph Kerian <jkerian@gmail.com> : Rewriting effort for KDE 4
 
21
 
 
22
@maintainers
 
23
Daniel E. Moctezuma <democtezuma@gmail.com> is the current maintainer.
 
24
 
 
25
@licenses
 
26
This library is distributed under the lgpl: @lgpl<br>
 
27
 
 
28
*/
 
29
 
 
30
/** @page components Components
 
31
 
 
32
<p><b>
 
33
@ref index "Overview" |
 
34
Components |
 
35
@ref using |
 
36
@ref adding
 
37
</b></p>
 
38
 
 
39
Below is a brief summary of the various components of libkiten
 
40
<dl>
 
41
        <dt>DictQuery</dt>
 
42
        <dd>Class to load with a query to the dictionary system.</dd>
 
43
 
 
44
        <dt>DictionaryManager</dt>
 
45
        <dd>Main management class. These objects are the main interface to the library.</dd>
 
46
 
 
47
        <dt>DictionaryPreferenceDialog</dt>
 
48
        <dd>Abstract Base Class, providing an interface between the individual dictionary preferences and the host application.</dd>
 
49
 
 
50
        <dt>Entry</dt>
 
51
        <dd>Results from a dictionary search are returned to the user application in a list of type Entry, aggregated in an EntryList.</dd>
 
52
 
 
53
        <dt>EntryList</dt>
 
54
        <dd>Results from a dictionary search are returned to the user application in a list of type Entry, aggregated in an EntryList.</dd>
 
55
 
 
56
        <dt>HistoryPtrList</dt>
 
57
        <dd>A useful utility class if you want to keep a history of results. Contains a list of EntryLists. Automatically handles maximum history size, and truncation/tracking current item</dd>
 
58
 
 
59
        <dt>DictFile</dt>
 
60
        <dd>An abstract base class, used internally for managing dictionary types</dd>
 
61
 
 
62
        <dt>kromajiedit</dt>
 
63
        <dd>An input box, can allow the user to enter kana without a japanese input manager installed</dd>
 
64
</dl>
 
65
*/
 
66
 
 
67
/** @page using Using libkiten
 
68
<p><b>
 
69
@ref index "Overview" |
 
70
@ref components |
 
71
Using libkiten |
 
72
@ref adding
 
73
</b></p>
 
74
 
 
75
General Approach to using the classes in the library:
 
76
 
 
77
Create a DictionaryManager object, load dictionaries to it using member functions. (persistant)
 
78
Create a DictQuery object, load it with your query
 
79
EntryList *results = DictionaryManagerObject->doSearch(DictQueryObject);
 
80
//Do something with each Entry in the EntryList, or do something with the whole list
 
81
 
 
82
For your preferences dialog:
 
83
Get a list of DictionaryPreferenceDialog objects from DictionaryManager to put into your preferences dialog.
 
84
 
 
85
If you maintain a history:
 
86
You can use HistoryPtrList to store and manage lists of EntryList's.
 
87
*/
 
88
 
 
89
/** @page adding Adding New Dictionary Types
 
90
<p><b>
 
91
@ref index "Overview" |
 
92
@ref components |
 
93
@ref using |
 
94
Adding New Dictionary Types
 
95
</b></p>
 
96
 
 
97
Adding a new dictionary type is relatively simple.
 
98
Look over the documentation of the DictFile abstract class. You may also need to subclass from Entry, if your dictionary requires special logic or strangely formatted fields. If you have no particular preferences to set (or want to put off that work until later), your DictFile descendent can return NULL, when asked for a preference dialog.
 
99
 
 
100
*/