kiten/lib
dictionarymanager.cpp
Go to the documentation of this file.
189 kDebug() << "Incoming match type: " << query.getMatchType() << " Outgoing: " << ret->getQuery().getMatchType();
198 EntryList *DictionaryManager::doSearchInList( const DictQuery &query, const EntryList *list ) const
bool hasNext() const
EntryList * doSearchInList(const DictQuery &query, const EntryList *list) const
A simple method for searching inside of a given set of results.
Definition: dictionarymanager.cpp:198
bool contains(const Key &key) const
const Key key(const T &value) const
This abstract base class specifies the interface for dictionary preference dialogs in user applicatio...
Definition: dictionarypreferencedialog.h:42
static QMap< QString, DictionaryPreferenceDialog * > generatePreferenceDialogs(KConfigSkeleton *config, QWidget *parent=NULL)
Given a config and parent widget, return a mapping from dictionary types to preference dialogs...
Definition: dictionarymanager.cpp:239
Definition: dictfilekanjidic.h:39
The Entry class is a generic base class for each particular entry in a given dictionary.
Definition: entry.h:44
const_iterator constBegin() const
static QStringList listDictFileTypes()
Get a list of all supported dictionary types.
Definition: dictionarymanager.cpp:277
QStringList getDictionaries() const
Returns a list of the dictionaries that this particular query will target.
Definition: dictquery.cpp:583
virtual const QMap< QString, QString > & getSearchableAttributes() const
Fetch a list of searchable attributes and their codes.
Definition: dictfile.h:144
virtual bool loadEntry(const QString &)=0
An entry should be able to parse an in-file representation of an entry as a QString and put it back...
bool addDictionary(const QString &file, const QString &name, const QString &type)
Open a specified dictionary, and load it under this manager's control.
Definition: dictionarymanager.cpp:104
virtual bool matchesQuery(const DictQuery &) const
Fairly important method, this tests if this particular entry matches a query.
Definition: entry.cpp:294
int count(const T &value) const
void append(const T &value)
QString getMeaning() const
Accessor for the non-japanese meaning field.
Definition: dictquery.cpp:502
bool isEmpty() const
const_iterator constEnd() const
void loadSettings(const KConfig &config)
Load general settings.
Definition: dictionarymanager.cpp:339
Item next()
virtual void loadSettings(KConfigSkeleton *)
Load information from the KConfigSkeleton that you've setup in the above preferences widget...
Definition: dictfile.h:127
virtual bool loadDictionary(const QString &file, const QString &name)=0
Load a dictionary as at system startup.
void appendList(const EntryList *other)
Append another EntryList onto this one.
Definition: entrylist.cpp:306
QPair< QString, QString > listDictionaryInfo(const QString &name) const
Returns type and file for an open dictionary of a given.
Definition: dictionarymanager.cpp:294
void loadDictSettings(const QString &dict, KConfigSkeleton *config)
Trigger loading preferences from a given KConfigSkeleton config object for a dictionary of type dict...
Definition: dictionarymanager.cpp:329
virtual Entry * clone() const =0
A clone method, this should just implement "return new EntrySubClass(*this)".
QString toLower() const
void remove()
const T value(const Key &key) const
T & value()
const Key key(const T &value) const
virtual EntryList * doSearch(const DictQuery &query)=0
This actually conducts the search on the given query.
const QString toString() const
This returns a QString that represents the query.
Definition: dictquery.cpp:279
void removeAllDictionaries()
Removes all previously loaded dictionaries (if any).
Definition: dictionarymanager.cpp:365
bool removeDictionary(const QString &name)
Close a dictionary by name.
Definition: dictionarymanager.cpp:376
virtual DictionaryPreferenceDialog * preferencesWidget(KConfigSkeleton *config, QWidget *parent=NULL)
If you want your own dialog to pick preferences for your dict, then override this.
Definition: dictfile.h:121
virtual bool sort(const Entry &that, const QStringList &dictionaryList, const QStringList &fieldList) const
An overrideable sorting function, similer to operator< in most contexts The default version will sort...
Definition: entry.cpp:425
A class to allow users of libkiten to properly setup a database query.
Definition: dictquery.h:89
EntryList * doSearch(const DictQuery &query) const
This is the main search routine that most of kiten should use.
Definition: dictionarymanager.cpp:138
MatchType getMatchType() const
Get which match type is currently set on the DictQuery.
Definition: dictquery.cpp:606
virtual QString dumpEntry() const =0
Return a QString of an entry, as if it were dumped back into it's source file.
Definition: dictfileedict.h:49
QStringList listDictionariesOfType(const QString &type) const
Lists all dictionaries of a given type (Convenient for preference dialogs)
Definition: dictionarymanager.cpp:309
iterator insert(const Key &key, const T &value)
Abstract base class, used internally by the library for handling different types of dictionaries This...
Definition: dictfile.h:47
QStringList listDictionaries() const
List names of each open dictionary.
Definition: dictionarymanager.cpp:261
static QMap< QString, QString > generateExtendedFieldsList()
Compiles a list of all fields beyond the basic three (word/pronunciation/meaning) that all dictionary...
Definition: dictionarymanager.cpp:215
EntryList is a simple container for Entry objects, and is-a QList A few simple overrides allo...
Definition: entrylist.h:38
DictQuery getQuery() const
Get the query that generated this list, note that if you have appended EntryLists from two different ...
Definition: entrylist.cpp:323
const T value(const Key &key) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.