TextCustomEditor::PlainTextEditor Class
The PlainTextEditor class Author: Laurent Montel <montel@kde.org>. More...
| Header: | #include <TextCustomEditor/PlainTextEditor> |
| CMake: | find_package(KF6TextCustomEditor REQUIRED)target_link_libraries(mytarget PRIVATE KF6::TextCustomEditor) |
Public Functions
| PlainTextEditor(QWidget *parent = nullptr) | |
| virtual | ~PlainTextEditor() override |
| bool | activateLanguageMenu() const |
| void | addIgnoreWords(const QStringList &lst) |
| bool | checkSpellingEnabled() const |
| virtual void | createHighlighter() |
| bool | emojiSupport() const |
| Sonnet::Highlighter * | highlighter() const |
| bool | searchSupport() const |
| void | setActivateLanguageMenu(bool activate) |
| void | setCheckSpellingEnabled(bool check) |
| void | setEmojiSupport(bool b) |
| virtual void | setReadOnly(bool readOnly) |
| void | setSearchSupport(bool b) |
| void | setSpellCheckingConfigFileName(const QString &_fileName) |
| void | setSpellCheckingLanguage(const QString &_language) |
| void | setSpellCheckingSupport(bool check) |
| void | setTextToSpeechSupport(bool b) |
| void | setWebShortcutSupport(bool b) |
| QString | spellCheckingConfigFileName() const |
| const QString & | spellCheckingLanguage() const |
| bool | spellCheckingSupport() const |
| bool | textToSpeechSupport() const |
| bool | webShortcutSupport() const |
Public Slots
| void | slotCheckSpelling() |
| void | slotDisplayMessageIndicator(const QString &message) |
| void | slotSpeakText() |
| void | slotZoomReset() |
Signals
| void | checkSpellingChanged(bool) |
| void | findText() |
| void | languageChanged(const QString &) |
| void | replaceText() |
| void | say(const QString &text) |
| void | searchSupportChanged() |
| void | spellCheckStatus(const QString &) |
| void | spellCheckerAutoCorrect(const QString ¤tWord, const QString &autoCorrectWord) |
Protected Functions
| virtual void | addExtraMenuEntry(QMenu *menu, QPoint pos) |
| virtual void | clearDecorator() |
| virtual Sonnet::SpellCheckDecorator * | createSpellCheckDecorator() |
| bool | handleShortcut(QKeyEvent *event) |
| bool | overrideShortcut(QKeyEvent *event) |
| void | setHighlighter(Sonnet::Highlighter *_highLighter) |
| virtual void | updateHighLighter() |
Reimplemented Protected Functions
| virtual void | contextMenuEvent(QContextMenuEvent *event) override |
| virtual bool | event(QEvent *ev) override |
| virtual void | focusInEvent(QFocusEvent *event) override |
| virtual void | keyPressEvent(QKeyEvent *event) override |
| virtual void | wheelEvent(QWheelEvent *event) override |
Detailed Description
Member Function Documentation
[explicit] PlainTextEditor::PlainTextEditor(QWidget *parent = nullptr)
Constructs a new PlainTextEditor.
[override virtual noexcept] PlainTextEditor::~PlainTextEditor()
Destroys the editor.
bool PlainTextEditor::activateLanguageMenu() const
Returns whether the language menu is activated.
See also setActivateLanguageMenu().
[virtual protected] void PlainTextEditor::addExtraMenuEntry(QMenu *menu, QPoint pos)
Adds extra menu entries at the given position. Can be overridden by subclasses.
void PlainTextEditor::addIgnoreWords(const QStringList &lst)
Adds words to the spell checker's ignore list.
[signal] void PlainTextEditor::checkSpellingChanged(bool)
Emitted when spell checking is enabled or disabled.
bool PlainTextEditor::checkSpellingEnabled() const
Returns whether spell checking is currently enabled.
See also setCheckSpellingEnabled().
[virtual protected] void PlainTextEditor::clearDecorator()
Clears the spell check decorator.
[override virtual protected] void PlainTextEditor::contextMenuEvent(QContextMenuEvent *event)
Handles context menu events.
[virtual] void PlainTextEditor::createHighlighter()
Creates the syntax highlighter for the editor.
[virtual protected] Sonnet::SpellCheckDecorator *PlainTextEditor::createSpellCheckDecorator()
Creates the spell check decorator for the editor.
bool PlainTextEditor::emojiSupport() const
Returns whether emoji support is enabled.
See also setEmojiSupport().
[override virtual protected] bool PlainTextEditor::event(QEvent *ev)
[signal] void PlainTextEditor::findText()
Emitted when the user wants to search for text.
[override virtual protected] void PlainTextEditor::focusInEvent(QFocusEvent *event)
Handles focus-in events.
[protected] bool PlainTextEditor::handleShortcut(QKeyEvent *event)
Handles keyboard shortcuts.
Sonnet::Highlighter *PlainTextEditor::highlighter() const
Returns the syntax highlighter instance.
See also setHighlighter().
[override virtual protected] void PlainTextEditor::keyPressEvent(QKeyEvent *event)
Handles key press events.
[signal] void PlainTextEditor::languageChanged(const QString &)
Emitted when the spell checking language changes.
[protected] bool PlainTextEditor::overrideShortcut(QKeyEvent *event)
Checks whether a shortcut should be overridden.
[signal] void PlainTextEditor::replaceText()
Emitted when the user wants to open the replace dialog.
[signal] void PlainTextEditor::say(const QString &text)
Emitted to speak text.
bool PlainTextEditor::searchSupport() const
Returns whether text search is supported.
See also setSearchSupport().
[signal] void PlainTextEditor::searchSupportChanged()
Emitted when search support is enabled or disabled.
void PlainTextEditor::setActivateLanguageMenu(bool activate)
Sets whether to activate the language menu.
See also activateLanguageMenu().
void PlainTextEditor::setCheckSpellingEnabled(bool check)
Sets whether spell checking should be enabled.
See also checkSpellingEnabled().
void PlainTextEditor::setEmojiSupport(bool b)
Sets whether to support emoji.
See also emojiSupport().
[protected] void PlainTextEditor::setHighlighter(Sonnet::Highlighter *_highLighter)
Sets the syntax highlighter for the editor.
See also highlighter().
[virtual] void PlainTextEditor::setReadOnly(bool readOnly)
Sets whether the editor is read-only.
void PlainTextEditor::setSearchSupport(bool b)
See also searchSupport().
void PlainTextEditor::setSpellCheckingConfigFileName(const QString &_fileName)
Sets the configuration file name for spell checking.
See also spellCheckingConfigFileName().
void PlainTextEditor::setSpellCheckingLanguage(const QString &_language)
Sets the language to use for spell checking.
See also spellCheckingLanguage().
void PlainTextEditor::setSpellCheckingSupport(bool check)
Sets whether to support spell checking.
See also spellCheckingSupport().
void PlainTextEditor::setTextToSpeechSupport(bool b)
Sets whether to support text-to-speech.
See also textToSpeechSupport().
void PlainTextEditor::setWebShortcutSupport(bool b)
Sets whether to support web shortcuts.
See also webShortcutSupport().
[slot] void PlainTextEditor::slotCheckSpelling()
Checks the spelling of the document.
[slot] void PlainTextEditor::slotDisplayMessageIndicator(const QString &message)
Displays a message to the user.
[slot] void PlainTextEditor::slotSpeakText()
Speaks the selected text.
[slot] void PlainTextEditor::slotZoomReset()
Resets the zoom level to the default.
[signal] void PlainTextEditor::spellCheckStatus(const QString &)
Emitted to display spell checking status.
[signal] void PlainTextEditor::spellCheckerAutoCorrect(const QString ¤tWord, const QString &autoCorrectWord)
Emitted when auto-correction is applied.
QString PlainTextEditor::spellCheckingConfigFileName() const
Returns the spell checking configuration file name.
See also setSpellCheckingConfigFileName().
const QString &PlainTextEditor::spellCheckingLanguage() const
Returns the language used for spell checking.
See also setSpellCheckingLanguage().
bool PlainTextEditor::spellCheckingSupport() const
Returns whether spell checking is supported.
See also setSpellCheckingSupport().
bool PlainTextEditor::textToSpeechSupport() const
Returns whether text-to-speech is supported.
See also setTextToSpeechSupport().
[virtual protected] void PlainTextEditor::updateHighLighter()
Updates the syntax highlighter.
bool PlainTextEditor::webShortcutSupport() const
Returns whether web shortcut support is enabled.
See also setWebShortcutSupport().
[override virtual protected] void PlainTextEditor::wheelEvent(QWheelEvent *event)
Handles mouse wheel events for zoom.