Sonnet
spellcheckhighlighter.h
25 /// On other QML applications, you can add the SpellcheckHighlighter as a child of a TextArea/TextField.
56 Q_PROPERTY(QQuickTextDocument *document READ quickDocument WRITE setQuickDocument NOTIFY documentChanged)
60 Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged)
64 Q_PROPERTY(int selectionStart READ selectionStart WRITE setSelectionStart NOTIFY selectionStartChanged)
80 Q_PROPERTY(QColor misspelledColor READ misspelledColor WRITE setMisspelledColor NOTIFY misspelledColorChanged)
111 Q_PROPERTY(bool autoDetectLanguageDisabled READ autoDetectLanguageDisabled WRITE setAutoDetectLanguageDisabled NOTIFY autoDetectLanguageDisabledChanged)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_INVOKABLE void replaceWord(const QString &word)
Replace word at the current cursor position.
Definition: spellcheckhighlighter.cpp:483
void setCurrentLanguage(const QString &language)
Set language to use for spell checking.
Definition: spellcheckhighlighter.cpp:444
Q_SLOTSQ_SLOTS
Q_INVOKABLE void addWordToDictionary(const QString &word)
Adds the given word permanently to the dictionary.
Definition: spellcheckhighlighter.cpp:471
bool wordIsMisspelled
This property holds whether the current word under the mouse is misspelled.
Definition: spellcheckhighlighter.h:72
Q_SCRIPTABLE Q_NOREPLY void start()
QString currentLanguage
This property holds the current language used for spell checking.
Definition: spellcheckhighlighter.h:84
QString wordUnderMouse
This property holds the current word under the mouse.
Definition: spellcheckhighlighter.h:76
int selectionStart
This property holds the start of the selection.
Definition: spellcheckhighlighter.h:64
bool active
This property holds whether spell checking is enabled.
Definition: spellcheckhighlighter.h:101
int cursorPosition
This property holds the current cursor position.
Definition: spellcheckhighlighter.h:60
Q_INVOKABLE QStringList suggestions(int position, int max=5)
Returns a list of suggested replacements for the given misspelled word.
Definition: spellcheckhighlighter.cpp:369
QQuickTextDocument document
This property holds the underneath document from a QML TextEdit.
Definition: spellcheckhighlighter.h:56
void setDocument(QTextDocument *document)
Set a new QTextDocument for this highlighter to operate on.
Definition: spellcheckhighlighter.cpp:509
The Sonnet Highlighter class, used for drawing red lines in text fields when detecting spelling mista...
Definition: spellcheckhighlighter.h:51
Q_INVOKABLEQ_INVOKABLE
Q_SIGNALSQ_SIGNALS
Q_INVOKABLE void ignoreWord(const QString &word)
Ignores the given word.
Definition: spellcheckhighlighter.cpp:477
bool checkerEnabledByDefault() const
Return true if checker is enabled by default.
void slotAutoDetection()
Run auto detection, disabling spell checking if too many errors are found.
Definition: spellcheckhighlighter.cpp:215
bool autoDetectLanguageDisabled
This property holds whether the automatic language detection is disabled overriding the Sonnet global...
Definition: spellcheckhighlighter.h:111
bool automatic
This property holds whether spell checking is automatically disabled if there's too many errors.
Definition: spellcheckhighlighter.h:106
Q_INVOKABLE bool isWordMisspelled(const QString &word)
Checks if a given word is marked as misspelled by the highlighter.
Definition: spellcheckhighlighter.cpp:610
Q_DISABLE_COPY(Class)
QObject * parent() const const
bool spellCheckerFound
This property holds whether a spell checking backend with support for the currentLanguage was found.
Definition: spellcheckhighlighter.h:89
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 3 2023 03:59:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 3 2023 03:59:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.