TextCustomEditor::PlainTextSyntaxSpellCheckingHighlighter Class

The PlainTextSyntaxSpellCheckingHighlighter class Author: Laurent Montel <montel@kde.org>. More...

Header: #include <TextCustomEditor/PlainTextSyntaxSpellCheckingHighlighter>
CMake: find_package(KF6TextCustomEditor REQUIRED)
target_link_libraries(mytarget PRIVATE KF6::TextCustomEditor)

Public Functions

PlainTextSyntaxSpellCheckingHighlighter(TextCustomEditor::PlainTextEditor *plainText, const QColor &misspelledColor = Qt::red)
virtual ~PlainTextSyntaxSpellCheckingHighlighter() override
void toggleSpellHighlighting(bool on)

Reimplemented Public Functions

virtual void highlightBlock(const QString &text) override
virtual void setDefinition(const KSyntaxHighlighting::Definition &def) override

Reimplemented Protected Functions

virtual void applyFormat(int offset, int length, const KSyntaxHighlighting::Format &format) override
virtual void setMisspelled(int start, int count) override
virtual void unsetMisspelled(int start, int count) override

Detailed Description

Member Function Documentation

[explicit] PlainTextSyntaxSpellCheckingHighlighter::PlainTextSyntaxSpellCheckingHighlighter(TextCustomEditor::PlainTextEditor *plainText, const QColor &misspelledColor = Qt::red)

Constructs a syntax and spell checking highlighter for plain text.

[override virtual noexcept] PlainTextSyntaxSpellCheckingHighlighter::~PlainTextSyntaxSpellCheckingHighlighter()

Destroys the highlighter.

[override virtual protected] void PlainTextSyntaxSpellCheckingHighlighter::applyFormat(int offset, int length, const KSyntaxHighlighting::Format &format)

Applies syntax highlighting format.

[override virtual] void PlainTextSyntaxSpellCheckingHighlighter::highlightBlock(const QString &text)

Highlights a block of text.

[override virtual] void PlainTextSyntaxSpellCheckingHighlighter::setDefinition(const KSyntaxHighlighting::Definition &def)

Sets the syntax definition for highlighting.

[override virtual protected] void PlainTextSyntaxSpellCheckingHighlighter::setMisspelled(int start, int count)

Sets the color of misspelled words.

void PlainTextSyntaxSpellCheckingHighlighter::toggleSpellHighlighting(bool on)

Toggles spell highlighting on or off.

[override virtual protected] void PlainTextSyntaxSpellCheckingHighlighter::unsetMisspelled(int start, int count)

Clears misspelled word highlighting.