• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kspell2
 

kspell2

  • kspell2
dictionary.h
1 // -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2 /*
3  * dictionary.h
4  *
5  * Copyright (C) 2004 Zack Rusin <zack@kde.org>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 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  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20  * 02110-1301 USA
21  */
22 #ifndef KSPELL_DICTIONARY_H
23 #define KSPELL_DICTIONARY_H
24 
25 #include <tqstringlist.h>
26 #include <tqstring.h>
27 
28 namespace KSpell2
29 {
37  class Dictionary
38  {
39  public:
40  virtual ~Dictionary() {}
41 
46  virtual bool check( const TQString& word ) =0;
47 
53  virtual TQStringList suggest( const TQString& word ) =0;
54 
58  virtual bool checkAndSuggest( const TQString& word,
59  TQStringList& suggestions ) =0;
60 
65  virtual bool storeReplacement( const TQString& bad,
66  const TQString& good ) =0;
67 
72  virtual bool addToPersonal( const TQString& word ) =0;
73 
78  virtual bool addToSession( const TQString& word ) =0;
79 
83  TQString language() const
84  {
85  return m_language;
86  }
87 
92  bool isDefault() const
93  {
94  return m_default;
95  }
96 
97  protected:
98  Dictionary( const TQString& lang, bool def = false )
99  : m_language( lang ), m_default( def ) {}
100  protected:
101  friend class Broker;
102  TQString m_language;
103  bool m_default;
104  private:
105  class Private;
106  Private *d;
107  };
108 }
109 
110 #endif
KSpell2::Dictionary::language
TQString language() const
Returns language supported by this dictionary.
Definition: dictionary.h:83
KSpell2::Dictionary::isDefault
bool isDefault() const
Returns true if this dictionary was constructed from default Settings values.
Definition: dictionary.h:92
KSpell2::Dictionary::checkAndSuggest
virtual bool checkAndSuggest(const TQString &word, TQStringList &suggestions)=0
Checks the word and fetches suggestions for it.
KSpell2::Dictionary::addToSession
virtual bool addToSession(const TQString &word)=0
Adds word to the words recognizable in the current session.
KSpell2::Dictionary::check
virtual bool check(const TQString &word)=0
Checks the given word.
KSpell2::Dictionary
Class is returned by from Broker.
Definition: dictionary.h:37
KSpell2::Dictionary::storeReplacement
virtual bool storeReplacement(const TQString &bad, const TQString &good)=0
Stores user defined good replacement for the bad word.
KSpell2::Dictionary::addToPersonal
virtual bool addToPersonal(const TQString &word)=0
Adds word to the list of of personal words.
KSpell2::Dictionary::suggest
virtual TQStringList suggest(const TQString &word)=0
Fetches suggestions for the word.

kspell2

Skip menu "kspell2"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kspell2

Skip menu "kspell2"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kspell2 by doxygen 1.8.6
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |