|
|
enum |
Possible states of the spell checker.
Starting
- After creation of KSpell.
Running
- After the ready signal has been emitted.
Cleaning
- After cleanUp() has been called.
Finished
- After cleanUp() has been completed.
The following error states exist:
Error
- An error occured in the Starting
state.
Crashed
- An error occured in the Running
state.
|
Start 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.
Parameters:
_parent | Parent of KSpellConfig dialg.. |
_caption | Caption of KSpellConfig dialog. |
_receiver | Receiver. |
_slot | Receivers SLOT. |
_kcs | Configuration for KSpell. |
_progressbar | Indicates if progress bar should be shown. |
_modal | Indicates modal or non-modal dialog. |
spellStatus |
Retrieve the status of KSpell.
See also: spellStatus()
void |
[virtual]
Clean 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.
void |
Auto-delete the KSpell object after emitting death().
bool |
[virtual]
Spellcheck a buffer of many words in plain text format.
The _buffer
is not modified. The signal done() will be
sent when check() is finished and the argument will be a
spell-corrected version of _buffer.
The spel check may be stopped by the user before the entire buffer
has been checked. You can check lastPosition() to see how far
in _buffer
check() reached before stopping.
inline int |
Retrieve the position (when using check()) or word number (when using checkList()) of the last word checked.
bool |
[virtual]
Spellcheck a list of words.
checkList() is more flexible than check(). You could parse any type of document (HTML, TeX, etc.) into a list of spell-checkable words and send the list to checkList(). Sending a marked-up document to check() would result in the mark-up tags being spell checked.
bool |
[virtual]
Spellcheck a single word.
checkWord() is the most flexible function. Some applications might need this flexibility but will sacrifice speed when checking large numbers of words. Consider checkList() for checking many words.
Use this method for implementing "online" spellchecking (i.e., spellcheck as-you-type).
checkWord () returns false
if buffer
is not a word, otherwise it
returns true;
If usedialog
is set to true,
KSpell will put up the standard
dialog if the word is not found. The dialog results can be queried
by using dlgResult() and replacement().
The signal corrected() is emitted when the check is complete. You can look at suggestions() to see what the suggested replacements were.
void |
Hide the dialog box.
You'll need to do this when you are done with checkWord();
inline QStringList * |
Retrieve list of suggested word replacements.
After calling checkWord() (an in response to a misspelled() signal you can use this to get the list of suggestions (if any were available).
inline int |
Get the result code of the dialog box.
After calling checkWord, you can use this to get the dialog box's result code. The possible values are (from kspelldlg.h):
void |
Move the dialog.
If the dialog is not currently visible, it will be placed at this position when it becomes visible. Use this to get the dialog out of the way of a highlighted misspelled word in a document.
inline int |
Retrieve the height of the dialog box.
inline int |
Retrieve the width of the dialog box.
const QString * |
Retrieve the partially spellchecked buffer.
You might want the full buffer in its partially-checked state.
bool |
[virtual]
Tell ISpell/ASpell to ignore this word for the life of this KSpell instance.
ignore() returns false
if word is not a word or there was an error
communicating with ISpell/ASpell.
bool |
[virtual]
Add a word to the user's personal dictionary.
Returns false
if word
is not a word or there was an error communicating with ISpell/ASpell.
KSpellConfig |
[const]
Retrieve the KSpellConfig object being used by this KSpell instance.
void |
Set the resolution (in percent) of the progress() signals.
E.g. setProgressResolution (10) instructs KSpell to send progress signals (at most) every 10% (10%, 20%, 30%...). The default is 10%.
|
[virtual]
The destructor instructs ISpell/ASpell to write out the personal dictionary and then terminates ISpell/ASpell.
int |
[static]
Perform a sychronous spellcheck.
This method does not return until spellchecking is done or canceled. Your application's GUI will still be updated, however.
int |
[static]
Used local spell config
void |
[signal]
Emitted whenever a misspelled word is found by check() or
by checkWord().
If it is emitted by checkWord(), pos=0.
If it is emitted by check(), then pos
indicates the position of
the misspelled word in the (original) _buffer.
(The first position is zero.)
If it is emitted by checkList(), pos
is the index to
the misspelled
word in the QStringList passed to checkList().
Note, that originalword
can be only a word part, if it's
word with hyphens.
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).
void |
[signal]
Emitted after the "Replace" or "Replace All" buttons of the dialog was pressed, or if the word was corrected without calling the dialog (i.e., the user previously chose "Replace All" for this word).
Results from the dialog may be checked with dlgResult() and replacement().
Note, that when using checkList() this signal cann occure
more then once with same list position, when checking a word with
hyphens. In this case orignalword
is the last replacement.
See also: check()
void |
[signal]
Emitted when the user pressed "Ignore All" in the dialog. This could be used to make an application or file specific user dictionary.
void |
[signal]
Emmited when the user pressed "Ignore" in the dialog. Don't know if this could be usefull.
void |
[signal]
Emitted when the user pressed "Add" in the dialog. This could be used to make an external user dictionary independent of the ISpell personal dictionary.
void |
[signal]
Emitted after KSpell has verified that ISpell/ASpell is running and working properly.
void |
[signal]
Emitted during a check().
i
is between 1 and 100.
void |
[signal]
Emitted when check() is done.
Be sure to copy the results of buffer
if you need them.
You can only rely
on the contents of buffer for the life of the slot which was signaled
by done().
void |
[signal]
Emitted when checkList() is done.
If the argument is
true,
then you should update your text from the
wordlist, otherwise not.
void |
[signal]
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:
Error
- KSpell could not start.
Crashed
- KSpell encountered an unexpected error during execution.
Finished
- Clean up finished.
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[protected slots: slot]
void |
[signal]
void |
[signal]
void |
[signal]
KProcIO * |
[protected: ]
QWidget * |
[protected: ]
KSpellConfig * |
[protected: ]
KSpellDlg * |
[protected: ]
QStringList * |
[protected: ]
QStringList::Iterator |
[protected: ]
QStringList |
[protected: ]
QStringList |
[protected: ]
QStringList |
[protected: ]
QTextCodec* |
[protected: ]
spellStatus |
[protected: ]
bool |
[protected: ]
bool |
[protected: ]
bool |
[protected: ]
bool |
[protected: ]
bool |
[protected: ]
bool |
[protected: ]
bool |
[protected: ]
bool |
[protected: ]
QString |
[protected: ]
QString |
[protected: ]
QString |
[protected: ]
QString |
[protected: ]
QString |
[protected: ]
QString |
[protected: ]
QString |
[protected: ]
QString |
[protected: ]
int |
[protected: ]
int |
[protected: ]
int |
[protected: ]
unsigned int |
[protected: ]
unsigned int |
[protected: ]
unsigned int |
[protected: ]
unsigned int |
[protected: ]
unsigned int |
[protected: ]
unsigned int |
[protected: ]
unsigned int |
[protected: ]
unsigned int |
[protected: ]
bool |
[protected: ]
static QString |
[protected: ]
static int |
[protected: ]
static QWidget* |
[protected: ]
int |
[protected: ]
Used for modalCheck.
QString |
[protected: ]
void |
[protected: ]
inline QString |
[protected: ]
void |
[protected: ]
void |
[protected: ]
bool |
[protected: ]
bool |
[protected: ]
void |
[protected: ]
bool |
[protected: ]
Generated by: marc@yogi on Tue Mar 27 13:09:21 2001, using kdoc 2.0a48. |