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

kiten/lib

Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
DictFileEdict Class Reference

#include <dictfileedict.h>

Inheritance diagram for DictFileEdict:
Inheritance graph
[legend]

Public Member Functions

 DictFileEdict ()
 
virtual ~DictFileEdict ()
 
virtual EntryList * doSearch (const DictQuery &query)
 
virtual QStringList listDictDisplayOptions (QStringList x) const
 
bool loadDictionary (const QString &file, const QString &name)
 
void loadSettings ()
 
virtual void loadSettings (KConfigSkeleton *config)
 
virtual
DictionaryPreferenceDialog * 
preferencesWidget (KConfigSkeleton *config, QWidget *parent=NULL)
 
virtual bool validDictionaryFile (const QString &filename)
 
bool validQuery (const DictQuery &query)
 
- Public Member Functions inherited from DictFile
 DictFile (const QString &dictionaryTypeName)
 
virtual ~DictFile ()
 
virtual QString getFile () const
 
virtual QString getName () const
 
virtual const QMap< QString,
QString > & 
getSearchableAttributes () const
 
virtual QString getType () const
 
virtual bool loadNewDictionary (const QString &file, const QString &name)
 

Static Public Attributes

static QString * deinflectionLabel = NULL
 
static QString * wordType = NULL
 

Protected Member Functions

virtual QMap< QString, QString > displayOptions () const
 
QStringList * loadListType (KConfigSkeletonItem *item, QStringList *list, const QMap< QString, QString > &long2short)
 
virtual Entry * makeEntry (const QString &entry)
 

Protected Attributes

LinearEdictFile m_edictFile
 
- Protected Attributes inherited from DictFile
QString m_dictionaryFile
 
QString m_dictionaryName
 
QString m_dictionaryType
 
QMap< QString, QString > m_searchableAttributes
 

Static Protected Attributes

static QStringList * displayFields = NULL
 

Detailed Description

Definition at line 49 of file dictfileedict.h.

Constructor & Destructor Documentation

DictFileEdict::DictFileEdict ( )

Per instructions in the super-class, this constructor basically sets the dictionaryType member variable to identify this as an edict-type database handler.

Definition at line 56 of file dictfileedict.cpp.

DictFileEdict::~DictFileEdict ( )
virtual

The destructor...

ditch our memory maps and close our files here (if they were open).

Definition at line 69 of file dictfileedict.cpp.

Member Function Documentation

QMap< QString, QString > DictFileEdict::displayOptions ( ) const
protectedvirtual

Definition at line 75 of file dictfileedict.cpp.

EntryList * DictFileEdict::doSearch ( const DictQuery &  query)
virtual

Do a search, respond with a list of entries.

The general strategy will be to take the first word of the query, and do a binary search on the dictionary for that item. Take all results and filter them using the rest of the query with the validate method.

Implements DictFile.

Definition at line 88 of file dictfileedict.cpp.

QStringList DictFileEdict::listDictDisplayOptions ( QStringList  x) const
virtual

Make a list of all the extra fields in our db.

. Entry uses this to decide what goes in the interpretations it gives.

Implements DictFile.

Definition at line 245 of file dictfileedict.cpp.

bool DictFileEdict::loadDictionary ( const QString &  file,
const QString &  name 
)
virtual

Load up the dictionary.

Implements DictFile.

Definition at line 254 of file dictfileedict.cpp.

QStringList * DictFileEdict::loadListType ( KConfigSkeletonItem *  item,
QStringList *  list,
const QMap< QString, QString > &  long2short 
)
protected

Definition at line 286 of file dictfileedict.cpp.

void DictFileEdict::loadSettings ( )

Definition at line 314 of file dictfileedict.cpp.

void DictFileEdict::loadSettings ( KConfigSkeleton *  )
virtual

Load information from the KConfigSkeleton that you've setup in the above preferences widget.

Reimplemented from DictFile.

Definition at line 319 of file dictfileedict.cpp.

Entry * DictFileEdict::makeEntry ( const QString &  entry)
inlineprotectedvirtual

Definition at line 331 of file dictfileedict.cpp.

DictionaryPreferenceDialog * DictFileEdict::preferencesWidget ( KConfigSkeleton *  config,
QWidget *  parent = NULL 
)
virtual

If you want your own dialog to pick preferences for your dict, then override this.

Leaving it blank will leave your dictionary type without a preferences dialog.

Parameters
configthe KConfigSkeleton object that is currently in use
parentthe parent widget for your preferences dialog

Reimplemented from DictFile.

Definition at line 336 of file dictfileedict.cpp.

bool DictFileEdict::validDictionaryFile ( const QString &  filename)
virtual

Scan a potential file for the correct format, remembering to skip comment characters.

This is not a foolproof scan, but it should be checked before adding a new dictionary. Valid EDICT format is considered: <kanji or="" kana>="">+ [<kana>] /latin characters & symbols/separated with slashes/ Comment lines start with... something... not remembering now.

Implements DictFile.

Definition at line 351 of file dictfileedict.cpp.

bool DictFileEdict::validQuery ( const DictQuery &  query)
virtual

Reject queries that specify anything we don't understand.

Implements DictFile.

Definition at line 392 of file dictfileedict.cpp.

Member Data Documentation

QString * DictFileEdict::deinflectionLabel = NULL
static

Definition at line 68 of file dictfileedict.h.

QStringList * DictFileEdict::displayFields = NULL
staticprotected

Definition at line 81 of file dictfileedict.h.

LinearEdictFile DictFileEdict::m_edictFile
protected

Definition at line 79 of file dictfileedict.h.

QString * DictFileEdict::wordType = NULL
static

Definition at line 69 of file dictfileedict.h.


The documentation for this class was generated from the following files:
  • dictfileedict.h
  • dictfileedict.cpp
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