KoSpell Class Reference
KDE Spellchecker. More...
#include <kospell.h>
Inheritance diagram for KoSpell:


Public Types | |
enum | spellStatus { Starting = 0, Running, Cleaning, Finished, Error, Crashed } |
enum | Spelling { SpellingOk, SpellingIgnore, Misspelled, SpellingError, SpellingDone } |
Signals | |
void | misspelling (const QString &originalword, int pos) |
void | ready (KoSpell *) |
void | done () |
void | death () |
QStringList | getAvailDictsAspell () |
QStringList | getAvailDictsIspell () |
Public Member Functions | |
KoSpell (QWidget *parent, QObject *receiver, const char *slot, KSpellConfig *kcs=0) | |
spellStatus | status () const |
virtual void | cleanUp () |
virtual bool | check (const QString &buffer) |
Spelling | parseLine (const QString &line, QString &word, int &pos) |
virtual bool | ignore (const QString &word) |
virtual bool | addPersonal (const QString &word) |
KSpellConfig | ksConfig () const |
virtual | ~KoSpell () |
void | setIgnoreUpperWords (bool b) |
void | setIgnoreTitleCase (bool b) |
Protected Slots | |
void | KoSpell2 (KProcIO *) |
void | check2 (KProcIO *) |
void | ispellExit (KProcess *) |
void | emitDeath () |
void | ispellErrors (KProcess *, char *, int) |
Protected Member Functions | |
QString | funnyWord (const QString &word) |
void | startIspell () |
bool | writePersonalDictionary () |
Static Protected Member Functions | |
bool | interpret (QString &fname, QString &lname, QString &hname) |
Protected Attributes | |
QStringList | m_buffer |
QStringList | ignorelist |
int | trystart |
int | maxtrystart |
KProcIO * | proc |
QWidget * | parent |
KSpellConfig * | ksconfig |
QTextCodec * | codec |
spellStatus | m_status |
Detailed Description
KDE Spellchecker.A KDE programmer's interface to International ISpell 3.1. (GPL 1997) A static method, modalCheck() is provided for convenient access to the spellchecker.
- Author:
- David Sweet <dsweet@kde.org>
- See also:
- KSpellConfig
Definition at line 42 of file kospell.h.
Member Enumeration Documentation
|
Possible states of the spell checker.
Definition at line 62 of file kospell.h. Referenced by status(). |
Constructor & Destructor Documentation
|
Starts the spellchecker. KSpell emits ready() when it has verified that ISpell/ASpell is working properly. Pass the name of a slot -- do not pass zero! Be sure to call cleanUp() when you are done with KSpell. If KSpell could not be started correctly, death() is emitted.
Definition at line 68 of file kospell.cc. References ready(). |
|
The destructor instructs ISpell/ASpell to write out the personal dictionary and then terminates ISpell/ASpell.
Definition at line 501 of file kospell.cc. |
Member Function Documentation
|
Returns the status of KSpell.
Definition at line 106 of file kospell.h. References spellStatus. |
|
Cleans up ISpell. Write out the personal dictionary and close ISpell's stdin. A death() signal will be emitted when the cleanup is complete, but this method will return immediately. Definition at line 514 of file kospell.cc. |
|
Spellchecks a buffer of many words in plain text format.
The
The spell check may be stopped by the user before the entire buffer has been checked. You can check lastPosition() to see how far in Definition at line 396 of file kospell.cc. |
|
Tells ISpell/ASpell to ignore this word for the life of this KSpell instance.
Definition at line 301 of file kospell.cc. |
|
Adds a word to the user's personal dictionary.
Definition at line 282 of file kospell.cc. |
|
Definition at line 508 of file kospell.cc. |
|
Call setIgnoreUpperWords(true) to tell the spell-checker to ignore words that are completely uppercase. They are spell-checked by default. Definition at line 559 of file kospell.cc. |
|
Call setIgnoreTitleCase(true) to tell the spell-checker to ignore words with a 'title' case, i.e. starting with an uppercase letter. They are spell-checked by default. Definition at line 564 of file kospell.cc. |
|
Emitted whenever a misspelled word is found by check() or by checkWord().
If it is emitted by checkWord(), These are called _before_ the dialog is opened, so that the calling program's GUI may be updated. (e.g. the misspelled word may be highlighted). |
|
Emitted after KSpell has verified that ISpell/ASpell is running and working properly.
Referenced by KoSpell(). |
|
Emitted on terminal errors and after clean up. You can delete the KSpell object in this signal. You can check status() to see what caused the death:
|
The documentation for this class was generated from the following files: