lib.spelltextedit.*¶
Provides
-
class
lib.spelltextedit.LineNumberArea(parent)[source]¶ Bases:
PyQt5.QtWidgets.QWidget- Parameters
parent (
QPlainTextEdit) – Editor in which the line numbers shall be displayed
-
class
lib.spelltextedit.PythonEnchantHighlighter(*args)[source]¶ Bases:
PyQt5.QtGui.QSyntaxHighlighterQSyntaxHighlighter subclass which consults a PyEnchant dictionary
-
braces= ['\\{', '\\}', '\\(', '\\)', '\\[', '\\]']¶
-
enable_enchant= False¶
-
err_format= <PyQt5.QtGui.QTextCharFormat object>¶
-
keywords= ['and', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'yield', 'None', 'True', 'False']¶
-
match_multiline(text, delimiter, in_state, style)[source]¶ Do highlighting of multi-line strings.
delimitershould be aQRegExpfor triple-single-quotes or triple-double-quotes, andin_stateshould be a unique integer to represent the corresponding state changes when inside those strings. Returns True if we’re still inside a multi-line string when this function is finished.
-
operators= ['=', '==', '!=', '<', '<=', '>', '>=', '\\+', '-', '\\*', '/', '//', '\\%', '\\*\\*', '\\+=', '-=', '\\*=', '/=', '\\%=', '\\^', '\\|', '\\&', '\\~', '>>', '<<']¶
-
-
class
lib.spelltextedit.SpellTextEdit(parent=None, line_numbers=True)[source]¶ Bases:
PyQt5.QtWidgets.QPlainTextEditQPlainTextEdit subclass which does spell-checking using PyEnchant
-
createCorrectionsMenu(cursor, parent=None)[source]¶ Create and return a menu for correcting the selected word.
-
createFormatsMenu(parent=None)[source]¶ Create and return a menu for selecting the spell-check language.
-
createLanguagesMenu(parent=None)[source]¶ Create and return a menu for selecting the spell-check language.
-
createSpellcheckContextMenu(pos)[source]¶ Create and return an augmented default context menu.
This may be used as an alternative to the QPoint-taking form of
createStandardContextMenuand will work on pre-5.5 Qt.
-
cursorForMisspelling(pos)[source]¶ Return a cursor selecting the misspelled word at
posorNoneThis leverages the fact that QPlainTextEdit already has a system for processing its contents in limited-size blocks to keep things fast.
-
max_suggestions= 20¶
-
show_line_numbers(visible)[source]¶ Show line number area if visible else hide it
- Parameters
visible (
bool) – Line number area visibility
-
spaces_per_tab= 4¶
-
pyspread