Speller Class Reference
from PyKDE4.kdecore import *
Namespace: Sonnet.Speller
Detailed Description
Spell checker object.
class used for actuall spell checking
Enumerations |
| Attribute | { CheckUppercase, SkipRunTogether } |
Methods |
| | __init__ (self, QString lang=QString()) |
| | __init__ (self, Sonnet.Speller speller) |
| bool | addToPersonal (self, QString word) |
| bool | addToSession (self, QString word) |
| QStringList | availableBackends (self) |
| QMap | availableDictionaries (self) |
| QStringList | availableLanguageNames (self) |
| QStringList | availableLanguages (self) |
| bool | checkAndSuggest (self, QString word, QStringList suggestions) |
| QString | defaultClient (self) |
| QString | defaultLanguage (self) |
| bool | isCorrect (self, QString word) |
| bool | isMisspelled (self, QString word) |
| bool | isValid (self) |
| QString | language (self) |
| | restore (self, KConfig config) |
| | save (self, KConfig config) |
| | setAttribute (self, Sonnet.Speller.Attribute attr, bool b=1) |
| | setDefaultClient (self, QString client) |
| | setDefaultLanguage (self, QString lang) |
| | setLanguage (self, QString lang) |
| bool | storeReplacement (self, QString bad, QString good) |
| QStringList | suggest (self, QString word) |
| bool | testAttribute (self, Sonnet.Speller.Attribute attr) |
Method Documentation
| __init__ |
( |
self, |
|
|
|
QString |
lang=QString() |
|
) |
|
|
|
| bool addToPersonal |
( |
self, |
|
|
|
QString |
word |
|
) |
|
|
|
Adds word to the list of of personal words.
- Returns:
- true on success
| bool addToSession |
( |
self, |
|
|
|
QString |
word |
|
) |
|
|
|
Adds word to the words recognizable in the current session.
- Returns:
- true on success
Returns names of all supported backends (e.g. ISpell, ASpell)
| QMap availableDictionaries |
( |
|
self ) |
|
Returns a map of all available language descriptions and their
codes
Returns a localized list of names of supported languages.
Note: use availableDictionaries
Returns a list of supported languages.
Note: use availableDictionaries
Convience method calling isCorrect() and suggest()
if the word isn't correct.
| bool isCorrect |
( |
self, |
|
|
|
QString |
word |
|
) |
|
|
|
Checks the given word.
- Returns:
- false if the word is misspelled. true otherwise
| bool isMisspelled |
( |
self, |
|
|
|
QString |
word |
|
) |
|
|
|
Checks the given word.
- Returns:
- true if the word is misspelled. false otherwise
Returns true is the speller supports currently selected
language.
Returns language supported by this speller.
| setDefaultClient |
( |
self, |
|
|
|
QString |
client |
|
) |
|
|
|
| setDefaultLanguage |
( |
self, |
|
|
|
QString |
lang |
|
) |
|
|
|
Sets the language supported by this speller.
Stores user defined good replacement for the bad word.
- Returns:
- true on success
Fetches suggestions for the word.
- Returns:
- list of all suggestions for the word
Enumeration Documentation
- Enumerator:
-
| CheckUppercase | |
| SkipRunTogether | |