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

tdespell2

  • tdespell2
dictionary.h
1/*
2 * dictionary.h
3 *
4 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 */
21#ifndef TDESPELL_DICTIONARY_H
22#define TDESPELL_DICTIONARY_H
23
24#include <tqstringlist.h>
25#include <tqstring.h>
26
27namespace KSpell2
28{
36 class Dictionary
37 {
38 public:
39 virtual ~Dictionary() {}
40
45 virtual bool check( const TQString& word ) =0;
46
52 virtual TQStringList suggest( const TQString& word ) =0;
53
57 virtual bool checkAndSuggest( const TQString& word,
58 TQStringList& suggestions ) =0;
59
64 virtual bool storeReplacement( const TQString& bad,
65 const TQString& good ) =0;
66
71 virtual bool addToPersonal( const TQString& word ) =0;
72
77 virtual bool addToSession( const TQString& word ) =0;
78
82 TQString language() const
83 {
84 return m_language;
85 }
86
91 bool isDefault() const
92 {
93 return m_default;
94 }
95
96 protected:
97 Dictionary( const TQString& lang, bool def = false )
98 : m_language( lang ), m_default( def ) {}
99 protected:
100 friend class Broker;
101 TQString m_language;
102 bool m_default;
103 private:
104 class Private;
105 Private *d;
106 };
107}
108
109#endif
KSpell2::Dictionary
Class is returned by from Broker.
Definition: dictionary.h:37
KSpell2::Dictionary::checkAndSuggest
virtual bool checkAndSuggest(const TQString &word, TQStringList &suggestions)=0
Checks the word and fetches suggestions for it.
KSpell2::Dictionary::isDefault
bool isDefault() const
Returns true if this dictionary was constructed from default Settings values.
Definition: dictionary.h:91
KSpell2::Dictionary::language
TQString language() const
Returns language supported by this dictionary.
Definition: dictionary.h:82
KSpell2::Dictionary::addToSession
virtual bool addToSession(const TQString &word)=0
Adds word to the words recognizable in the current session.
KSpell2::Dictionary::addToPersonal
virtual bool addToPersonal(const TQString &word)=0
Adds word to the list of of personal words.
KSpell2::Dictionary::storeReplacement
virtual bool storeReplacement(const TQString &bad, const TQString &good)=0
Stores user defined good replacement for the bad word.
KSpell2::Dictionary::suggest
virtual TQStringList suggest(const TQString &word)=0
Fetches suggestions for the word.
KSpell2::Dictionary::check
virtual bool check(const TQString &word)=0
Checks the given word.
KSpell2
tdespell_hspellclient.h
Definition: backgroundchecker.h:29

tdespell2

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

tdespell2

Skip menu "tdespell2"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdespell2 by doxygen 1.9.4
This website is maintained by Timothy Pearson.