org.kde.koala
public class KSpell extends QObject
See Also: KSpellConfig KSyntaxHighlighter
UNKNOWN: %KDE Spellchecker
Field Summary | |
---|---|
static int | Cleaning |
static int | Crashed |
static int | Error |
static int | Finished |
static int | FinishedNoMisspellingsEncountered |
static int | HTML |
static int | Nroff |
static int | Running |
static int | Starting
Possible states of the spell checker.
|
static int | Text
These are possible types of documents which the spell checker can check.
|
static int | TeX |
Constructor Summary | |
---|---|
protected | KSpell(Class dummy) |
KSpell(QWidget parent, String caption, QObject receiver, String slot, KSpellConfig kcs, boolean progressbar, boolean modal)
Starts the spellchecker.
| |
KSpell(QWidget parent, String caption, QObject receiver, String slot, KSpellConfig kcs, boolean progressbar) | |
KSpell(QWidget parent, String caption, QObject receiver, String slot, KSpellConfig kcs) | |
KSpell(QWidget parent, String caption, QObject receiver, String slot) | |
KSpell(QWidget parent, String caption, QObject receiver, String slot, KSpellConfig kcs, boolean progressbar, boolean modal, int type)
Starts the spellchecker.
|
Method Summary | |
---|---|
boolean | addPersonal(String word)
Adds a word to the user's personal dictionary. |
boolean | check(String _buffer, boolean usedialog)
Spellchecks a buffer of many words in plain text
format.
|
boolean | check(String _buffer) |
protected void | check2(KProcIO arg1) |
protected void | check3() |
boolean | checkList(String[] _wordlist, boolean usedialog)
Spellchecks a list of words.
checkList() is more flexible than check(). |
boolean | checkList(String[] _wordlist) |
protected void | checkList2() |
protected void | checkList3a(KProcIO arg1) |
protected void | checkList4() |
protected void | checkListReplaceCurrent() |
protected void | checkNext() |
boolean | checkWord(String _buffer, boolean usedialog)
Spellchecks a single word.
checkWord() is the most flexible function. |
boolean | checkWord(String _buffer) |
boolean | checkWord(String buffer, boolean _usedialog, boolean suggest) |
protected void | checkWord2(KProcIO arg1) |
protected void | checkWord3() |
String | className() |
protected boolean | cleanFputs(String s, boolean appendCR) |
protected boolean | cleanFputs(String s) |
protected boolean | cleanFputsWord(String s, boolean appendCR) |
protected boolean | cleanFputsWord(String s) |
void | cleanUp()
Cleans up ISpell.
|
protected void | dialog(String word, String[] sugg, String _slot) |
protected void | dialog2(int dlgresult) |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
int | dlgResult()
Gets the result code of the dialog box.
|
protected void | emitDeath() |
protected void | emitProgress() |
protected void | finalize() Deletes the wrapped C++ instance |
protected String | funnyWord(String word) |
int | heightDlg()
Returns the height of the dialog box. |
void | hide()
Hides the dialog box.
|
boolean | ignore(String word)
Tells ISpell/ASpell to ignore this word for the life of this KSpell instance. |
protected void | initialize(QWidget _parent, String _caption, QObject arg3, String slot, KSpellConfig _ksc, boolean _progressbar, boolean _modal, int type) |
String | intermediateBuffer()
Returns the partially spellchecked buffer.
|
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
protected void | ispellErrors(KProcess arg1, String arg2, int arg3) |
protected void | ispellExit(KProcess arg1) |
KSpellConfig | ksConfig() |
protected void | KSpell2(KProcIO arg1) |
int | lastPosition()
Returns the position (when using check()) or word
number (when using checkList()) of
the last word checked. |
QMetaObject | metaObject() |
static int | modalCheck(StringBuffer text, KSpellConfig kcs)
Performs a synchronous spellcheck.
|
void | moveDlg(int x, int y)
Moves the dialog.
|
protected int | parseOneResponse(String _buffer, StringBuffer word, String[] sugg) |
protected String | replacement() |
void | setAutoDelete(boolean _autoDelete)
Sets the auto-delete flag. |
void | setIgnoreTitleCase(boolean b)
Call setIgnoreTitleCase(true) to tell the spell-checker to ignore
words with a 'title' case, i.e. starting with an uppercase letter.
|
void | setIgnoreUpperWords(boolean b)
Call setIgnoreUpperWords(true) to tell the spell-checker to ignore
words that are completely uppercase. |
void | setProgressResolution(int res)
Sets the resolution (in percent) of the progress() signals.
|
protected void | setUpDialog(boolean reallyusedialogbox) |
protected void | setUpDialog() |
protected void | slotStopCancel(int arg1) |
protected void | startIspell() |
int | status()
Returns the status of KSpell. |
ArrayList | suggestions()
Returns list of suggested word replacements.
|
protected void | suggestWord(KProcIO arg1) |
int | widthDlg()
Returns the width of the dialog box. |
protected boolean | writePersonalDictionary() |
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.
Error
- An error occurred in the Starting
state.
Crashed
- An error occurred in the Running
state.
UNKNOWN: Possible states of the spell checker.
Text
- The default type, checks every word
HTML
- For HTML/SGML/XML documents, will skip the tags,
TeX
- For TeX/LaTeX documents, will skip commands,
Nroff
- For nroff/troff documents.
UNKNOWN: These are possible types of documents which the spell checker can check.
Parameters: parent Parent of KSpellConfig dialog.. caption Caption of KSpellConfig dialog. receiver Receiver object for the ready(KSpell ) signal. slot Receiver's slot, will be connected to the ready(KSpell ) signal. kcs Configuration for KSpell. progressbar Indicates if progress bar should be shown. modal Indicates modal or non-modal dialog.
UNKNOWN: Starts the spellchecker.
Parameters: parent Parent of KSpellConfig dialog.. caption Caption of KSpellConfig dialog. receiver Receiver object for the ready(KSpell ) signal. slot Receiver's slot, will be connected to the ready(KSpell ) signal. kcs Configuration for KSpell. progressbar Indicates if progress bar should be shown. modal Indicates modal or non-modal dialog. type Type of the document to check
UNKNOWN: Starts the spellchecker.
Returns: false if word
is not a word or there was an error communicating with ISpell/ASpell.
UNKNOWN: Adds a word to the user's personal dictionary.
_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 spell 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.UNKNOWN: Spellchecks a buffer of many words in plain text format.
UNKNOWN: Spellchecks a list of words.
false
if buffer
is not a single word (e.g.
if it contains white space), otherwise it returns true
;
If usedialog
is set to true
, KSpell will open 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.UNKNOWN: Spellchecks a single word.
UNKNOWN: Cleans up ISpell.
UNKNOWN: Gets the result code of the dialog box.
UNKNOWN: Returns the height of the dialog box.
UNKNOWN: Hides the dialog box.
Returns: false if word
is not a word or there was an error
communicating with ISpell/ASpell.
UNKNOWN: Tells ISpell/ASpell to ignore this word for the life of this KSpell instance.
UNKNOWN: Returns the partially spellchecked buffer.
Returns: the KSpellConfig object being used by this KSpell instance.
UNKNOWN:
UNKNOWN: Returns the position (when using check()) or word number (when using checkList()) of the last word checked.
UNKNOWN: Performs a synchronous spellcheck.
UNKNOWN: Moves the dialog.
UNKNOWN: Sets the auto-delete flag.
UNKNOWN: Call setIgnoreTitleCase(true) to tell the spell-checker to ignore words with a 'title' case, i.
UNKNOWN: Call setIgnoreUpperWords(true) to tell the spell-checker to ignore words that are completely uppercase.
UNKNOWN: Sets the resolution (in percent) of the progress() signals.
See Also: KSpell
UNKNOWN: Returns the status of KSpell.
UNKNOWN: Returns list of suggested word replacements.
UNKNOWN: Returns the width of the dialog box.