Pages
API Documentation
On this page

Sonnet::Speller Class

class used for actual spell checking. More...

  • Header: #include <Sonnet/Speller>
  • CMake: find_package(KF6 REQUIRED COMPONENTS Sonnet)
    target_link_libraries(mytarget PRIVATE KF6::SonnetCore)

List of all members, including inherited members

Public Types

Public Functions

Detailed Description

Spell checker object.

Member Type Documentation

enum Speller::Attribute

Constant
Sonnet::Speller::CheckUppercase 0
Sonnet::Speller::SkipRunTogether 1
Sonnet::Speller::AutoDetectLanguage 2

Member Function Documentation

[explicit] Speller::Speller(const QString &lang = QString())

bool Speller::addToPersonal(const QString &word)

Adds word to the list of of personal words. Returns true on success

bool Speller::addToSession(const QString &word)

Adds word to the words recognizable in the current session. Returns true on success

QStringList Speller::availableBackends() const

Returns names of all supported backends (e.g. ISpell, ASpell)

QMap<QString, QString> Speller::availableDictionaries() const

Returns a map of all available dictionaries with language descriptions and their codes. The key is the description, the code the value.

QStringList Speller::availableLanguageNames() const

Returns a localized list of names of supported languages.

Note: use availableDictionaries

QStringList Speller::availableLanguages() const

Returns a list of supported languages.

Note: use availableDictionaries

bool Speller::checkAndSuggest(const QString &word, QStringList &suggestions) const

Convenience method calling isCorrect() and suggest() if the word isn't correct.

QString Speller::defaultClient() const

See also setDefaultClient()

QString Speller::defaultLanguage() const

See also setDefaultLanguage()

bool Speller::isCorrect(const QString &word) const

Checks the given word. Returns false if the word is misspelled. true otherwise

bool Speller::isMisspelled(const QString &word) const

Checks the given word. Returns true if the word is misspelled. false otherwise

bool Speller::isValid() const

Returns true if the speller supports currently selected language.

QString Speller::language() const

Returns language supported by this speller.

See also setLanguage()

QMap<QString, QString> Speller::preferredDictionaries() const

Returns a map of user preferred dictionaries with language descriptions and their codes. The key is the description, the code the value.

void Speller::restore()

void Speller::save()

void Speller::setAttribute(Sonnet::Speller::Attribute attr, bool b = true)

void Speller::setDefaultClient(const QString &client)

See also defaultClient()

void Speller::setDefaultLanguage(const QString &lang)

See also defaultLanguage()

void Speller::setLanguage(const QString &lang)

Sets the language supported by this speller.

See also language()

bool Speller::storeReplacement(const QString &bad, const QString &good)

Stores user defined good replacement for the bad word.

Returns true on success

QStringList Speller::suggest(const QString &word) const

Fetches suggestions for the word.

Returns list of all suggestions for the word

bool Speller::testAttribute(Sonnet::Speller::Attribute attr) const

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.