Pages
API Documentation
On this page

Sonnet::SpellCheckDecorator Class

Connects a Sonnet::Highlighter to a QTextEdit extending the context menu of the text edit with spell check suggestions. More...

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

List of all members, including inherited members

Public Functions

Protected Functions

Detailed Description

Member Function Documentation

[explicit] SpellCheckDecorator::SpellCheckDecorator(QPlainTextEdit *textEdit)

Creates a spell-check decorator.

textEdit the QPlainTextEdit in need of spell-checking. It also is used as the QObject parent for the decorator.

[explicit] SpellCheckDecorator::SpellCheckDecorator(QTextEdit *textEdit)

Creates a spell-check decorator.

textEdit the QTextEdit in need of spell-checking. It also is used as the QObject parent for the decorator.

Sonnet::Highlighter *SpellCheckDecorator::highlighter() const

Returns the hightlighter used by the decorator

See also setHighlighter()

[virtual protected] bool SpellCheckDecorator::isSpellCheckingEnabledForBlock(const QString &textBlock) const

Returns true if the spell checking should be enabled for a given block of text The default implementation always returns true.

void SpellCheckDecorator::setHighlighter(Sonnet::Highlighter *highlighter)

Set a custom highlighter on the decorator.

SpellCheckDecorator does not take ownership of the new highlighter, and you must manually delete the old highlighter.

See also highlighter()

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