tdespell2
tdespell_hspelldict.h
00001 00022 #ifndef TDESPELL_HSPELLDICT_H 00023 #define TDESPELL_HSPELLDICT_H 00024 00025 #include "dictionary.h" 00026 /* libhspell is a C library and it does not have #ifdef __cplusplus */ 00027 extern "C" { 00028 #include "hspell.h" 00029 } 00030 00031 class HSpellDict : public KSpell2::Dictionary 00032 { 00033 public: 00034 HSpellDict( const TQString& lang ); 00035 ~HSpellDict(); 00036 virtual bool check( const TQString& word ); 00037 00038 virtual TQStringList suggest( const TQString& word ); 00039 00040 virtual bool checkAndSuggest( const TQString& word, 00041 TQStringList& suggestions ) ; 00042 00043 virtual bool storeReplacement( const TQString& bad, 00044 const TQString& good ); 00045 00046 virtual bool addToPersonal( const TQString& word ); 00047 virtual bool addToSession( const TQString& word ); 00048 private: 00049 struct dict_radix *m_speller; 00050 TQTextCodec *codec; 00051 }; 00052 00053 #endif