Sonnet
highlighter.cpp
164 // prevent crash from QSyntaxHighlighter::~QSyntaxHighlighter -> (...) -> QTextDocument::contentsChange() signal emission:
165 // ASSERT failure in Sonnet::Highlighter: "Called object is not of the correct type (class destructor may have already run)"
322 d->contentsChangeConnection = connect(document(), &QTextDocument::contentsChange, this, &Highlighter::contentsChange);
386 qCDebug(SONNET_LOG_UI) << "No dictionary for \"" << lang << "\" staying with the current language.";
488QStringList Highlighter::suggestionsForWord(const QString &word, const QTextCursor &cursor, int max)
bool autoDetectLanguageDisabled() const
Returns whether the automatic language detection is disabled, overriding the Sonnet settings.
Definition highlighter.cpp:204
void slotAutoDetection()
Run auto detection, disabling spell checking if too many errors are found.
Definition highlighter.cpp:236
void addWordToDictionary(const QString &word)
Adds the given word permanently to the dictionary.
Definition highlighter.cpp:469
void activeChanged(const QString &description)
Emitted when as-you-type spell checking is enabled or disabled.
QString currentLanguage() const
Returns the current language used for spell checking.
Definition highlighter.cpp:375
bool isWordMisspelled(const QString &word)
Checks if a given word is marked as misspelled by the highlighter.
Definition highlighter.cpp:504
QStringList suggestionsForWord(const QString &word, int max=10)
Returns a list of suggested replacements for the given misspelled word.
Definition highlighter.cpp:479
bool automatic() const
Returns the state of the automatic disabling of spell checking.
Definition highlighter.cpp:199
bool spellCheckerFound() const
Returns whether a spell checking backend with support for the currentLanguage was found.
Definition highlighter.cpp:170
void setMisspelledColor(const QColor &color)
Sets the color in which the highlighter underlines misspelled words.
Definition highlighter.cpp:509
void setAutomatic(bool automatic)
Sets whether to automatically disable spell checking if there's too many errors.
Definition highlighter.cpp:219
void setAutoDetectLanguageDisabled(bool autoDetectDisabled)
Sets whether to disable the automatic language detection.
Definition highlighter.cpp:231
bool checkerEnabledByDefault() const
Return true if checker is enabled by default.
Definition highlighter.cpp:514
void setDocument(QTextDocument *document)
Set a new QTextDocument for this highlighter to operate on.
Definition highlighter.cpp:519
void setCurrentLanguage(const QString &language)
Set language to use for spell checking.
Definition highlighter.cpp:380
Q_SCRIPTABLE Q_NOREPLY void start()
bool isSpace(char32_t ucs4)
bool isValid() const const
KeyPress
Type type() const const
qsizetype count() const const
QList< T > mid(qsizetype pos, qsizetype length) const const
bool contains(const Key &key) const const
T value(const Key &key, const T &defaultValue) const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
void installEventFilter(QObject *filterObj)
T qobject_cast(QObject *object)
QString tr(const char *sourceText, const char *disambiguation, int n)
const QChar at(qsizetype position) const const
qsizetype length() const const
QTextBlockUserData * currentBlockUserData() const const
QTextDocument * document() const const
QTextCharFormat format(int position) const const
void rehighlight()
void setCurrentBlockState(int newState)
void setCurrentBlockUserData(QTextBlockUserData *data)
void setDocument(QTextDocument *doc)
void setFormat(int start, int count, const QColor &color)
red
Key_Enter
ControlModifier
bool isValid() const const
QTextBlock next() const const
int position() const const
QTextBlockUserData * userData() const const
SpellCheckUnderline
void setFontUnderline(bool underline)
void setUnderlineColor(const QColor &color)
void setUnderlineStyle(UnderlineStyle style)
QTextBlock block() const const
void clearSelection()
bool hasSelection() const const
void insertText(const QString &text)
int positionInBlock() const const
void contentsChange(int position, int charsRemoved, int charsAdded)
QTextBlock findBlock(int pos) const const
void setInterval(int msec)
void setSingleShot(bool singleShot)
void start()
void timeout()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:10 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:10 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.