• 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
  • DictEdict
entryedict.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * This file is part of Kiten, a KDE Japanese Reference Tool *
3  * Copyright (C) 2006 Joseph Kerian <jkerian@gmail.com> *
4  * Copyright (C) 2006 Eric Kjeldergaard <kjelderg@gmail.com> *
5  * Copyright (C) 2011 Daniel E. Moctezuma <democtezuma@gmail.com *
6  * *
7  * This library is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU Library General Public *
9  * License as published by the Free Software Foundation; either *
10  * version 2 of the License, or (at your option) any later version. *
11  * *
12  * This library is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15  * Library General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU Library General Public License *
18  * along with this library; see the file COPYING.LIB. If not, write to *
19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
20  * Boston, MA 02110-1301, USA. *
21  *****************************************************************************/
22 
23 #ifndef KITEN_ENTRYEDICT_H
24 #define KITEN_ENTRYEDICT_H
25 
26 #include "entry.h"
27 
28 #include "libkitenexport.h"
29 
30 #include <QHash>
31 #include <QList>
32 #include <QSet>
33 
34 #ifndef KITEN_EDICTFORMATTING
35 #define KITEN_EDICTFORMATTING
36 
37 namespace EdictFormatting
38 {
39  extern QStringList Nouns;
40  extern QStringList Verbs;
41  extern QStringList Adjectives;
42  extern QStringList Adverbs;
43  extern QStringList IchidanVerbs;
44  extern QStringList GodanVerbs;
45  extern QStringList FukisokuVerbs;
46  extern QStringList Expressions;
47  extern QStringList Prefix;
48  extern QStringList Suffix;
49  extern QString Particle;
50 
51  extern QMultiHash<QString, QString> PartOfSpeechCategories;
52 
53  extern QSet<QString> PartsOfSpeech;
54  extern QSet<QString> MiscMarkings;
55  extern QSet<QString> FieldOfApplication;
56 }
57 
58 #endif
59 
60 class KITEN_EXPORT EntryEdict : public Entry
61 {
62  friend class DictFileEdict;
63 
64  public:
65 // EntryEdict( const EntryEdict &x ) : Entry( x ) {} //No special members to copy in this one
66  EntryEdict( const QString &dict );
67  EntryEdict( const QString &dict, const QString &entry );
68 
69  Entry *clone() const;
73  QString getTypes() const;
77  QStringList getTypesList() const;
78 
79  bool isAdjective() const;
80  bool isAdverb() const;
81  bool isCommon() const;
82  bool isExpression() const;
83  bool isFukisokuVerb() const;
84  bool isGodanVerb() const;
85  bool isIchidanVerb() const;
86  bool isNoun() const;
87  bool isParticle() const;
88  bool isPrefix() const;
89  bool isSuffix() const;
90  bool isVerb() const;
91 
92  bool matchesWordType( const DictQuery &query ) const;
93 
94  virtual QString dumpEntry() const;
95  virtual QString getDictionaryType() const;
96  virtual QString HTMLWord() const;
97  virtual bool loadEntry( const QString &entryLine );
98  virtual QString toHTML() const;
99 
100  protected:
101  virtual QString kanjiLinkify( const QString &inString ) const;
102 
103  private:
107  QStringList m_types;
108 
109  //Field of Application goes into the hash
110  QList<QString> m_miscMarkings;
111 };
112 
113 #endif
Entry::HTMLWord
virtual QString HTMLWord() const
Return and HTML version of a word.
Definition: entry.cpp:180
EdictFormatting::IchidanVerbs
QStringList IchidanVerbs
Definition: entryedict.cpp:480
libkitenexport.h
Entry
The Entry class is a generic base class for each particular entry in a given dictionary.
Definition: entry.h:44
DictFileEdict::EntryEdict
friend class EntryEdict
Definition: dictfileedict.h:51
KITEN_EXPORT
#define KITEN_EXPORT
Definition: libkitenexport.h:35
Entry::loadEntry
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...
EdictFormatting::Adjectives
QStringList Adjectives
Definition: entryedict.cpp:478
EdictFormatting::Expressions
QStringList Expressions
Definition: entryedict.cpp:484
EntryEdict
Definition: entryedict.h:60
EdictFormatting::Verbs
QStringList Verbs
Definition: entryedict.cpp:483
entry.h
Entry::toHTML
virtual QString toHTML() const
An entry should be able to generate a representation of itself in (valid) HTML.
Definition: entry.cpp:384
EdictFormatting::FieldOfApplication
QSet< QString > FieldOfApplication
Definition: entryedict.cpp:474
QSet
QString
QList< QString >
EdictFormatting::GodanVerbs
QStringList GodanVerbs
Definition: entryedict.cpp:481
QStringList
Entry::clone
virtual Entry * clone() const =0
A clone method, this should just implement "return new EntrySubClass(*this)".
EdictFormatting::Suffix
QStringList Suffix
Definition: entryedict.cpp:486
EdictFormatting::Adverbs
QStringList Adverbs
Definition: entryedict.cpp:479
EdictFormatting::Particle
QString Particle
Definition: entryedict.cpp:487
EdictFormatting::MiscMarkings
QSet< QString > MiscMarkings
Definition: entryedict.cpp:473
Entry::getDictionaryType
virtual QString getDictionaryType() const =0
Get the dictionary type (e.g.
DictQuery
A class to allow users of libkiten to properly setup a database query.
Definition: dictquery.h:89
Entry::dumpEntry
virtual QString dumpEntry() const =0
Return a QString of an entry, as if it were dumped back into it's source file.
DictFileEdict
Definition: dictfileedict.h:49
EdictFormatting::PartsOfSpeech
QSet< QString > PartsOfSpeech
Definition: entryedict.cpp:472
EdictFormatting::Nouns
QStringList Nouns
Definition: entryedict.cpp:477
EdictFormatting::Prefix
QStringList Prefix
Definition: entryedict.cpp:485
EdictFormatting::PartOfSpeechCategories
QMultiHash< QString, QString > PartOfSpeechCategories
Definition: entryedict.cpp:471
QMultiHash
EdictFormatting::FukisokuVerbs
QStringList FukisokuVerbs
Definition: entryedict.cpp:482
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