00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KOBGSPELLCHECK_H
00021 #define KOBGSPELLCHECK_H
00022
00023 #include <sonnet/loader.h>
00024 #include <QObject>
00025 #include <QStringList>
00026 #include <koffice_export.h>
00027 class KoTextObject;
00028 class KoDocument;
00029 class KoTextParag;
00030 class KoTextIterator;
00031
00032 class KOTEXT_EXPORT KoBgSpellCheck : public QObject
00033 {
00034 Q_OBJECT
00035 public:
00036 KoBgSpellCheck( const KSpell2::Loader::Ptr& loader, QObject *parent =0,
00037 const char *name =0 );
00038 virtual ~KoBgSpellCheck();
00039
00040 void registerNewTextObject( KoTextObject *object );
00041
00042 virtual KoTextIterator *createWholeDocIterator() const=0;
00043
00044 bool enabled() const;
00045
00049 KSpell2::Settings *settings() const;
00050
00055 void setIntraWordEditing( KoTextParag* parag, int index );
00056
00057 public slots:
00058 void start();
00059 void stop();
00060 void setEnabled( bool b );
00061
00062 protected slots:
00063 void spellCheckerMisspelling(const QString &, int );
00064 void spellCheckerDone();
00065 void checkerContinue();
00066
00067 void slotParagraphCreated( KoTextParag* parag );
00068 void slotParagraphModified( KoTextParag* parag, int , int pos, int length );
00069 void slotParagraphDeleted( KoTextParag* parag );
00070
00071 void slotClearPara();
00072
00073 protected:
00074 void markWord( KoTextParag* parag, int pos, int length, bool misspelled );
00075 private:
00076 class Private;
00077 Private *d;
00078 };
00079 #endif