Pages
API Documentation
On this page

Sonnet::Settings Class

Spelling framework for Qt. More...

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

List of all members, including inherited members
Deprecated members

Public Types

Properties

Public Functions

Detailed Description

Member Type Documentation

enum Settings::DictionaryRoles

Roles for dictionaryModel

Constant Value Description
Sonnet::Settings::LanguageCodeRole Qt::UserRole + 1 Language code of the language. This uses "languageCode" as roleNames.
Sonnet::Settings::PreferredRole 258 This role holds whether the language is one of the preferred languages. This uses "isPreferred" as roleNames.
Sonnet::Settings::DefaultRole 259 This role holds whether the language is the default language. This uses "isDefault" as roleNames.

Property Documentation

autodetectLanguage : bool

This property holds whether Sonnet should autodetect language.

Access functions:

  • bool autodetectLanguage() const
  • void setAutodetectLanguage(bool)

Notifier signal:

  • void autodetectLanguageChanged()

backgroundCheckerEnabled : bool

This property holds whether Sonnet should run spellchecking checks in the background.

Access functions:

  • bool backgroundCheckerEnabled() const
  • void setBackgroundCheckerEnabled(bool)

Notifier signal:

  • void backgroundCheckerEnabledChanged()

checkerEnabledByDefault : bool

This property holds whether Sonnet should be enabled by default.

Access functions:

  • bool checkerEnabledByDefault() const
  • void setCheckerEnabledByDefault(bool)

Notifier signal:

  • void checkerEnabledByDefaultChanged()

currentIgnoreList : QStringList

This property holds the list of ignored words.

Access functions:

  • QStringList currentIgnoreList() const
  • void setCurrentIgnoreList(const QStringList &ignores)

Notifier signal:

  • void currentIgnoreListChanged()

[read-only] defaultAutodetectLanguage : const bool

This property holds the default value for the autoDetectLanguage property.

Access functions:

  • bool defaultAutodetectLanguage()

[read-only] defaultBackgroundCheckerEnabled : const bool

This property holds the default value for the backgroundCheckerEnabled property.

Access functions:

  • bool defaultBackgroundCheckerEnabled()

[read-only] defaultCheckerEnabledByDefault : const bool

This property holds the default value for the list checkerEnabledByDefault property.

Access functions:

  • bool defaultCheckerEnabledByDefault()

[read-only] defaultDefaultLanguage : const QString

This property holds the default value for the defaultLanguage property.

Access functions:

  • QString defaultDefaultLanguage()

[read-only] defaultIgnoreList : const QStringList

This property holds the default value for the currentIgnoreList property.

Access functions:

  • QStringList defaultIgnoreList()

defaultLanguage : QString

This property holds the default language for spell checking.

Access functions:

  • QString defaultLanguage() const
  • void setDefaultLanguage(const QString &lang)

Notifier signal:

  • void defaultLanguageChanged()

[read-only] defaultPreferredLanguages : const QStringList

This property holds the default value for the preferredLanguages property.

Access functions:

  • QStringList defaultPreferredLanguages()

[read-only] defaultSkipRunTogether : const bool

This property holds the default value for the skipRunTogether property.

Access functions:

  • bool defaultSkipRunTogether()

[read-only] defaultSkipUppercase : const bool

This property holds the default value for the skipUppercase property.

Access functions:

  • bool defaultSkipUppercase()

[read-only] dictionaryModel : QAbstractListModel* const

This property holds a Qt Model containing all the preferred dictionaries with language description and theirs codes. This model makes the Qt::DisplayRole as well as the roles defined in DictionaryRoles available.

Access functions:

  • QAbstractListModel *dictionaryModel()

[read-only] modified : bool

Access functions:

  • bool modified() const

Notifier signal:

  • void modifiedChanged()

preferredLanguages : QStringList

This property holds the list of preferred languages.

Access functions:

  • QStringList preferredLanguages() const
  • void setPreferredLanguages(const QStringList &lang)

Notifier signal:

  • void preferredLanguagesChanged()

skipRunTogether : bool

This property holds whether Sonnet should skip checking compounds words.

Access functions:

  • bool skipRunTogether() const
  • void setSkipRunTogether(bool)

Notifier signal:

  • void skipRunTogetherChanged()

skipUppercase : bool

This property holds whether Sonnet should skip checkign words starting with an uppercase letter.

Access functions:

  • bool skipUppercase() const
  • void setSkipUppercase(bool)

Notifier signal:

  • void skipUppercaseChanged()

Member Function Documentation

[explicit] Settings::Settings(QObject *parent = nullptr)

[invokable] void Settings::save()

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

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