BCIEditor

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

Custom QTextEdit with autocompleter and linenumbers.

Parameters
  • linenumber – QTextEdit object that will be updated with linenumbers.

  • extension – To set the highlighter.

connect_()None[source]

Update linenumber.

focusInEvent(event)None[source]

Keep the focus on the editor.

insert_completion(completion: str)None[source]

Process and inset the desired option.

keyPressEvent(event)[source]

Process key events.

set_completer(completer: Autocompleter)None[source]

Update the autocompleter used.

set_options()None[source]

Configure QTextEdit.

show_completer(completion_prefix: str)None[source]

Show better options for current text.

text_under_cursor(tc=None)str[source]

Return de text under cursor.

update_linenumber()None[source]

Update linenumber.

wheelEvent(evt)[source]

Update the offset of the linenumber.