BCIEditor — BCI-Framework documentation

# BCIEditor

class `bci_framework.framework.editor.editor.` `BCIEditor`(linenumber: PySide2.QtWidgets.QTextEdit, extension: Literal[.py, .css] = '.py', *args, **kwargs)

  Custom QTextEdit with autocompleter and linenumbers.

  Parameters

    - linenumber – QTextEdit object that will be updated with linenumbers.

    - extension – To set the highlighter.

  `connect_`() → None

    Update linenumber.

  `focusInEvent`(event) → None

    Keep the focus on the editor.

  `insert_completion`(completion: str) → None

    Process and inset the desired option.

  `keyPressEvent`(event)

    Process key events.

  `set_completer`(completer: Autocompleter) → None

    Update the autocompleter used.

  `set_options`() → None

    Configure QTextEdit.

  `show_completer`(completion_prefix: str) → None

    Show better options for current text.

  `text_under_cursor`(tc=None) → str

    Return de text under cursor.

  `update_linenumber`() → None

    Update linenumber.

  `wheelEvent`(evt)

    Update the offset of the linenumber.