puzzlestream.ui.codeeditor module

Code editor module.

contains PSCodeEdit, a subclass of PyCodeEdit

class puzzlestream.ui.codeeditor.PSCodeEdit(server_script=None, args=None)[source]

Bases: pyqode.python.widgets.code_edit.PyCodeEdit

PyCodeEdit with some added functionality.

addShortcut(sequence, target)[source]

Add shortcut to the editor.

Args:

sequence (str): Key sequence. target: Method to be executed when sequence is entered.

autoformat()[source]
property focusIn
focusInEvent(event: PyQt5.QtCore.QEvent)[source]

Overrides focusInEvent to emits the focused_in signal

Parameters

event – QFocusEvent

setCurrentLineColor(color=<PyQt5.QtGui.QColor object>)[source]

Set colour of current active line to color,

setRightMarginColor(color=<PyQt5.QtGui.QColor object>)[source]

Set colour of right margin line to color,

setSyntaxColorScheme(scheme='dark')[source]

Set syntax colour scheme to scheme (str, dark or light).

sortImports()[source]