spelltextedit

The spelltextedit module contains a classes to add spell checking to an edit widget.

class openlp.core.ui.lib.spelltextedit.Highlighter(*args)[source]

Bases: PyQt5.QtGui.QSyntaxHighlighter

Provides a text highlighter for pointing out spelling errors in text.

WORDS = "(?iu)[\\w\\']+"
highlightBlock(text)[source]

Highlight mis spelt words in a block of text.

Note, this is a Qt hook.

class openlp.core.ui.lib.spelltextedit.SpellAction(*args)[source]

Bases: PyQt5.QtWidgets.QAction

A special QAction that returns the text in a signal.

correct
class openlp.core.ui.lib.spelltextedit.SpellTextEdit(parent=None, formatting_tags_allowed=True)[source]

Bases: PyQt5.QtWidgets.QPlainTextEdit

Spell checking widget based on QPlanTextEdit.

contextMenuEvent(event)[source]

Provide the context menu for the text edit region.

correct_word(word)[source]

Replaces the selected text with word.

html_tag(tag)[source]

Replaces the selected text with word.

mousePressEvent(event)[source]

Handle mouse clicks within the text edit region.

set_language(action)[source]

Changes the language for this spelltextedit.

Parameters:action – The action.