KDECore
backgroundchecker.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SONNET_BACKGROUNDCHECKER_H
00022 #define SONNET_BACKGROUNDCHECKER_H
00023
00024 #include "speller.h"
00025
00026 #include <kdecore_export.h>
00027
00028 #include <QtCore/QObject>
00029
00033 namespace Sonnet
00034 {
00035 class Speller;
00036
00054 class KDECORE_EXPORT BackgroundChecker : public QObject
00055 {
00056 Q_OBJECT
00057 public:
00058 explicit BackgroundChecker(QObject *parent =0);
00059 explicit BackgroundChecker(const Speller &speller, QObject *parent =0);
00060 ~BackgroundChecker();
00061
00068 void setText(const QString &text);
00069 QString text() const;
00070
00071 QString currentContext() const;
00072
00073 Speller speller() const;
00074 void setSpeller(const Speller &speller);
00075
00076 bool checkWord(const QString &word);
00077 QStringList suggest(const QString &word) const;
00078 bool addWordToPersonal(const QString &word);
00079 public Q_SLOTS:
00080 virtual void start();
00081 virtual void stop();
00082 void replace(int start, const QString &oldText,
00083 const QString &newText);
00084 void changeLanguage(const QString &lang);
00085
00091 virtual void continueChecking();
00092
00093 Q_SIGNALS:
00097 void misspelling(const QString &word, int start);
00098
00102 void done();
00103
00104 protected:
00113 virtual QString fetchMoreText();
00114
00119 virtual void finishedCurrentFeed();
00120
00121 protected Q_SLOTS:
00122 void slotEngineDone();
00123 private:
00124 class Private;
00125 Private *const d;
00126 };
00127
00128 }
00129
00130 #endif