• 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
dictfileedict.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_DICTFILEEDICT_H
25 #define KITEN_DICTFILEEDICT_H
26 
27 #include <config-kiten.h>
28 
29 #include "dictfile.h"
30 #include "indexededictfile.h"
31 #include "libkitenexport.h"
32 #include "linearedictfile.h"
33 
34 #include <QFile>
35 #include <QMap>
36 
37 #include <sys/types.h>
38 
39 class Deinflection;
40 class DictQuery;
41 class DictionaryPreferenceDialog;
42 class EntryEdict;
43 class KConfigSkeleton;
44 class KConfigSkeletonItem;
45 class QByteArray;
46 class QString;
47 class QStringList;
48 
49 class KITEN_EXPORT DictFileEdict : public DictFile
50 {
51  friend class EntryEdict;
52 
53  public:
54  DictFileEdict();
55  virtual ~DictFileEdict();
56 
57  virtual EntryList *doSearch( const DictQuery &query );
58  virtual QStringList listDictDisplayOptions( QStringList x ) const;
59  bool loadDictionary( const QString &file
60  , const QString &name );
61  void loadSettings();
62  virtual void loadSettings( KConfigSkeleton *config );
63  virtual DictionaryPreferenceDialog *preferencesWidget( KConfigSkeleton *config
64  , QWidget *parent = NULL );
65  virtual bool validDictionaryFile( const QString &filename );
66  bool validQuery( const DictQuery &query );
67 
68  static QString *deinflectionLabel;
69  static QString *wordType;
70 
71  protected:
72  virtual QMap<QString,QString> displayOptions() const;
73  QStringList *loadListType( KConfigSkeletonItem *item
74  , QStringList *list
75  , const QMap<QString,QString> &long2short );
76  //This is a blatant abuse of protected methods to make the kanji subclass easy
77  virtual Entry *makeEntry( const QString &entry );
78 
79  LinearEdictFile m_edictFile;
80 
81  static QStringList *displayFields;
82 
83  private:
84  QMap<QString,QString> loadDisplayOptions() const;
85 
86  Deinflection *m_deinflection;
87  bool m_hasDeinflection;
88 };
89 
90 #endif
QWidget
DictionaryPreferenceDialog
This abstract base class specifies the interface for dictionary preference dialogs in user applicatio...
Definition: dictionarypreferencedialog.h:42
QByteArray
libkitenexport.h
Entry
The Entry class is a generic base class for each particular entry in a given dictionary.
Definition: entry.h:44
DictFile::validQuery
virtual bool validQuery(const DictQuery &query)=0
Is this query relevant to this dictionary type? Usually this will return true, unless the query speci...
QMap< QString, QString >
KITEN_EXPORT
#define KITEN_EXPORT
Definition: libkitenexport.h:35
dictfile.h
DictFileEdict::wordType
static QString * wordType
Definition: dictfileedict.h:69
Deinflection
Definition: deinflection.h:36
DictFileEdict::deinflectionLabel
static QString * deinflectionLabel
Definition: dictfileedict.h:68
indexededictfile.h
DictFileEdict::displayFields
static QStringList * displayFields
Definition: dictfileedict.h:81
EntryEdict
Definition: entryedict.h:60
DictFile::loadSettings
virtual void loadSettings(KConfigSkeleton *)
Load information from the KConfigSkeleton that you've setup in the above preferences widget...
Definition: dictfile.h:127
DictFile::loadDictionary
virtual bool loadDictionary(const QString &file, const QString &name)=0
Load a dictionary as at system startup.
DictFile::validDictionaryFile
virtual bool validDictionaryFile(const QString &filename)=0
This method allows the user to test if a dictionary is the proper type for this format.
QString
linearedictfile.h
QStringList
DictFile::listDictDisplayOptions
virtual QStringList listDictDisplayOptions(QStringList) const =0
Return a list of the fields that can be displayed, note the following should probably always be retur...
DictFile::doSearch
virtual EntryList * doSearch(const DictQuery &query)=0
This actually conducts the search on the given query.
LinearEdictFile
A class for managing the EDICT formatted dictionaries with their dictionary files.
Definition: linearedictfile.h:33
DictFile::preferencesWidget
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
DictQuery
A class to allow users of libkiten to properly setup a database query.
Definition: dictquery.h:89
EntryEdict::DictFileEdict
friend class DictFileEdict
Definition: entryedict.h:62
DictFileEdict::m_edictFile
LinearEdictFile m_edictFile
Definition: dictfileedict.h:79
DictFileEdict
Definition: dictfileedict.h:49
DictFile
Abstract base class, used internally by the library for handling different types of dictionaries This...
Definition: dictfile.h:47
EntryList
EntryList is a simple container for Entry objects, and is-a QList A few simple overrides allo...
Definition: entrylist.h:38
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