dictionary.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KSPELL_DICTIONARY_H
00023 #define KSPELL_DICTIONARY_H
00024
00025 #include <qstringlist.h>
00026 #include <qstring.h>
00027
00028 namespace KSpell2
00029 {
00037 class Dictionary
00038 {
00039 public:
00040 virtual ~Dictionary() {}
00041
00046 virtual bool check( const QString& word ) =0;
00047
00053 virtual QStringList suggest( const QString& word ) =0;
00054
00058 virtual bool checkAndSuggest( const QString& word,
00059 QStringList& suggestions ) =0;
00060
00065 virtual bool storeReplacement( const QString& bad,
00066 const QString& good ) =0;
00067
00072 virtual bool addToPersonal( const QString& word ) =0;
00073
00078 virtual bool addToSession( const QString& word ) =0;
00079
00083 QString language() const
00084 {
00085 return m_language;
00086 }
00087
00092 bool isDefault() const
00093 {
00094 return m_default;
00095 }
00096
00097 protected:
00098 Dictionary( const QString& lang, bool def = false )
00099 : m_language( lang ), m_default( def ) {}
00100 protected:
00101 friend class Broker;
00102 QString m_language;
00103 bool m_default;
00104 private:
00105 class Private;
00106 Private *d;
00107 };
00108 }
00109
00110 #endif
|