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> |
Since: | 5.0 |
Inherits: | QObject |
Public Functions
(since 5.12) | SpellCheckDecorator(QPlainTextEdit *textEdit) |
SpellCheckDecorator(QTextEdit *textEdit) | |
Sonnet::Highlighter * | highlighter() const |
void | setHighlighter(Sonnet::Highlighter *highlighter) |
Protected Functions
virtual bool | isSpellCheckingEnabledForBlock(const QString &textBlock) const |
Detailed Description
Member Function Documentation
[explicit, since 5.12]
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.
This function was introduced in 5.12.
[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().