opentps.gui.panels.scriptingPanel package

Submodules

opentps.gui.panels.scriptingPanel.pythonHighlighter module

class PythonHighlighter(parent: QTextDocument)

Bases: QSyntaxHighlighter

Syntax highlighter for the Python language.

braces = ['\\{', '\\}', '\\(', '\\)', '\\[', '\\]']
highlightBlock(text)

Apply syntax highlighting to the given block of text.

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)

Do highlighting of multi-line strings. delimiter should be a QRegExp for triple-single-quotes or triple-double-quotes, and in_state should 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 = ['=', '==', '!=', '<', '<=', '>', '>=', '\\+', '-', '\\*', '/', '//', '\\%', '\\*\\*', '\\+=', '-=', '\\*=', '/=', '\\%=', '\\^', '\\|', '\\&', '\\~', '>>', '<<']
format(color, style='')

Return a QTextCharFormat with the given attributes.

opentps.gui.panels.scriptingPanel.scriptingPanel module

class ScriptingFileView

Bases: QWidget

close(self) bool
class ScriptingPanel

Bases: QWidget

newScriptFile()
newScriptingWindow()
newScriptingWindowSignal

str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

opentps.gui.panels.scriptingPanel.scriptingWindow module

class ScriptingWindow

Bases: QWidget

Module contents