koBgSpellCheck.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef kobgspellcheck_h
00022 #define kobgspellcheck_h
00023
00024
00025 #include <qobject.h>
00026 #include <qstringlist.h>
00027 class KoTextObject;
00028 class KoSpell;
00029 class KoDocument;
00030 class KSpellConfig;
00031 class KOSpellConfig;
00032 class KoTextParag;
00033
00034 class KoBgSpellCheck : public QObject
00035 {
00036 Q_OBJECT
00037 public:
00038 KoBgSpellCheck();
00039 virtual ~KoBgSpellCheck();
00040 void enableBackgroundSpellCheck( bool b );
00041
00042 bool backgroundSpellCheckEnabled() const { return m_bSpellCheckEnabled; }
00043
00044 void setIgnoreUpperWords( bool b);
00045 void setIgnoreTitleCase( bool b);
00046
00047 void setKSpellConfig(const KOSpellConfig &_kspell);
00048
00049
00050 virtual void slotRepaintChanged(KoTextObject *obj)=0;
00051
00052 virtual KoTextObject* nextTextObject( KoTextObject *obj )=0;
00053
00054 virtual void configurateSpellChecker()=0;
00055 void addIgnoreWordAll( const QString & word);
00056 void clearIgnoreWordAll( );
00057 void addIgnoreWordAllList( const QStringList & list);
00058 void spellCheckParagraphDeleted( KoTextParag *_parag, KoTextObject *obj);
00059 void addPersonalDictonary( const QString & word );
00060 public slots:
00061 void startBackgroundSpellCheck();
00062
00063 protected slots:
00064 void spellCheckerReady();
00065 void spellCheckerMisspelling(const QString &, int );
00066 void spellCheckerDone();
00067 void spellCheckerFinished( );
00068 void spellCheckNextParagraph();
00069
00070 protected:
00071 KSpellConfig* spellConfig();
00072 void nextParagraphNeedingCheck();
00073 void stopSpellChecking();
00074
00075 struct KoBGSpell {
00076 KoBGSpell() : kspell(0L), currentTextObj(0L), currentParag(0L) {}
00077
00078
00079 KoSpell *kspell;
00080
00081
00082
00083
00084 KoTextObject *currentTextObj;
00085
00086 KoTextParag *currentParag;
00087
00088 bool needsRepaint;
00089 };
00090 KoBGSpell m_bgSpell;
00091
00092 private:
00093 class KoBgSpellCheckPrivate;
00094 KoBgSpellCheckPrivate *d;
00095 QStringList m_spellListIgnoreAll;
00096 bool m_bSpellCheckEnabled;
00097 bool m_bDontCheckUpperWord;
00098 bool m_bDontCheckTitleCase;
00099 bool m_bSpellCheckConfigure;
00100 };
00101 #endif
This file is part of the documentation for lib Library Version 1.3.5.