00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KOSPELL_H
00020 #define KOSPELL_H
00021
00022 #include <QObject>
00023 #include <QStringList>
00024 #include <QString>
00025
00026
00027 class Loader;
00028 #include <sonnet/backgroundchecker.h>
00029 #include <koffice_export.h>
00030 class KoTextIterator;
00031 class KoTextParag;
00032 class KoTextObject;
00033 class KoTextDocument;
00034 namespace KSpell2
00035 {
00036 class Settings;
00037 }
00038
00047 class KOTEXT_EXPORT KoSpell : public KSpell2::BackgroundChecker
00048 {
00049 Q_OBJECT
00050
00051 public:
00052 KoSpell( const KSpell2::Loader::Ptr& loader, QObject *parent =0,
00053 const char *name =0 );
00058 virtual ~KoSpell();
00059
00063 bool checking() const;
00064
00072 virtual bool check( KoTextIterator *itr, bool dialog = false );
00073 virtual bool check( KoTextParag *parag );
00074 virtual bool checkWordInParagraph( KoTextParag *parag, int pos,
00075 QString& word, int& start );
00076
00077 KoTextParag *currentParag() const;
00078 KoTextObject *currentTextObject() const;
00079 int currentStartIndex() const;
00080
00081 KoTextDocument *textDocument() const;
00082
00086 KSpell2::Settings *settings() const;
00087
00088 public slots:
00089 void slotCurrentParagraphDeleted();
00090
00091 signals:
00095 void paragraphChecked( KoTextParag* );
00096
00097 void aboutToFeedText();
00098
00099 protected:
00100 virtual QString getMoreText();
00101 virtual void finishedCurrentFeed();
00102
00103 private:
00104 class Private;
00105 Private *d;
00106 };
00107 #endif