• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kiten/lib

  • sources
  • kde-4.14
  • kdeedu
  • kiten
  • lib
entry.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * This file is part of Kiten, a KDE Japanese Reference Tool *
3  * Copyright (C) 2001 Jason Katz-Brown <jason@katzbrown.com> *
4  * Copyright (C) 2006 Joseph Kerian <jkerian@gmail.com> *
5  * Copyright (C) 2006 Eric Kjeldergaard <kjelderg@gmail.com> *
6  * Copyright (C) 2011 Daniel E. Moctezuma <democtezuma@gmail.com> *
7  * *
8  * This library is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU Library General Public *
10  * License as published by the Free Software Foundation; either *
11  * version 2 of the License, or (at your option) any later version. *
12  * *
13  * This library is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16  * Library General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU Library General Public License *
19  * along with this library; see the file COPYING.LIB. If not, write to *
20  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
21  * Boston, MA 02110-1301, USA. *
22  *****************************************************************************/
23 
24 #ifndef KITEN_ENTRY_H
25 #define KITEN_ENTRY_H
26 
27 #include <QHash>
28 #include <QList>
29 #include <QStringList>
30 
31 #include "libkitenexport.h"
32 
33 #include "dictquery.h"
34 
35 class Entry;
36 class EntryList;
37 class QString;
38 
44 class KITEN_EXPORT Entry
45 {
46  friend class EntryListModel;
47 
48  private:
53  Entry();
54 
55  protected:
59  Entry( const Entry& );
66  Entry( const QString &sourceDictionary );
74  Entry( const QString &sourceDictionary, const QString &word,
75  const QStringList &readings, const QStringList &meanings );
76 
77  public:
81  virtual ~Entry();
85  virtual Entry *clone() const = 0;
86 
93  virtual bool matchesQuery( const DictQuery& ) const;
94 
98  const QString &getDictName() const;
102  virtual QString getDictionaryType() const = 0;
107  QString getWord() const;
111  QString getMeanings() const;
115  QStringList getMeaningsList() const;
119  QString getReadings() const;
123  QStringList getReadingsList() const;
127  const QHash<QString,QString> &getExtendedInfo() const;
132  QString getExtendedInfoItem( const QString &x ) const;
139  virtual bool extendedItemCheck( const QString &key, const QString &value ) const;
140 
144  virtual QString toHTML() const;
148  virtual QString toKVTML() const;
152  virtual QString toString() const;
153 
159  virtual bool loadEntry( const QString& ) = 0;
163  virtual QString dumpEntry() const = 0;
164 
176  virtual bool sort( const Entry &that, const QStringList &dictionaryList,
177  const QStringList &fieldList ) const;
186  virtual bool sortByField( const Entry &that, const QString &field ) const;
187 
188  protected:
193  QString Word;
198  QStringList Meanings;
203  QStringList Readings;
207  QHash<QString,QString> ExtendedInfo;
208 
212  QString sourceDict;
216  QString outputListDelimiter;
217 
221  void init();
222 
226  virtual QString makeLink( const QString &entryString ) const;
230  virtual QString HTMLWord() const;
234  virtual QString HTMLReadings() const;
238  virtual QString HTMLMeanings() const;
239 
243  bool listMatch( const QStringList &list, const QStringList &test, DictQuery::MatchType type ) const;
247  bool isKanji( const QChar &character ) const;
248 };
249 
250 #endif
libkitenexport.h
Entry
The Entry class is a generic base class for each particular entry in a given dictionary.
Definition: entry.h:44
QChar
KITEN_EXPORT
#define KITEN_EXPORT
Definition: libkitenexport.h:35
DictQuery::MatchType
MatchType
This enum is used to define the type of matching this query is supposed to do.
Definition: dictquery.h:285
Entry::Readings
QStringList Readings
The Readings (usually kana) that match this entry.
Definition: entry.h:203
QHash< QString, QString >
Entry::Word
QString Word
The Word (usually containing kanji) that matches this entry.
Definition: entry.h:193
QString
QStringList
Entry::Meanings
QStringList Meanings
The Meanings that match this entry.
Definition: entry.h:198
DictQuery
A class to allow users of libkiten to properly setup a database query.
Definition: dictquery.h:89
dictquery.h
Entry::sourceDict
QString sourceDict
The dictionary that this entry originated at.
Definition: entry.h:212
Entry::ExtendedInfo
QHash< QString, QString > ExtendedInfo
A hash of extended information.
Definition: entry.h:207
EntryList
EntryList is a simple container for Entry objects, and is-a QList A few simple overrides allo...
Definition: entrylist.h:38
Entry::outputListDelimiter
QString outputListDelimiter
The delimiter for lists...
Definition: entry.h:216
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

KDE's Doxygen guidelines are available online.

kiten/lib

Skip menu "kiten/lib"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal