UI.texteditor module

Module to define TextEditor widget, define common text functionality: fontcolor, fontstyle, fontweigh, alignment, bold, italic… This widget is useful to show/edit note properties of stream, equipment… or whatever a rich text could be used

class UI.texteditor.TextEditor(text='', parent=None)[source]

Bases: QWidget

Text editor widget

Methods

MergeFormat(fmt)

Merge format to current text

bold()

Set bold property of font

center()

Center align of text

colordialog()

Show dialog to choose font color

font(family)

Change font of text

italic()

Set italic property of font

justify()

Justify text to end of line

left()

Left align of text

pointSize(size)

Change point size of font

right()

Right align of text

setText([text])

Set text value

strikethrough()

Set strikethrough property of font

subscript()

Set subscript property of font

superscript()

Set superscript property of font

underline()

Set underline property of font

updateUI()

Update button status when cursor move

textChanged

textChanged

pyqtSignal(*types, name: 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.

__init__(text='', parent=None)[source]

Constructor, opcional parameter text to set initial value

setText(text=None)[source]

Set text value

MergeFormat(fmt)[source]

Merge format to current text

font(family)[source]

Change font of text

left()[source]

Left align of text

center()[source]

Center align of text

right()[source]

Right align of text

justify()[source]

Justify text to end of line

pointSize(size)[source]

Change point size of font

bold()[source]

Set bold property of font

italic()[source]

Set italic property of font

underline()[source]

Set underline property of font

strikethrough()[source]

Set strikethrough property of font

superscript()[source]

Set superscript property of font

subscript()[source]

Set subscript property of font

updateUI()[source]

Update button status when cursor move

colordialog()[source]

Show dialog to choose font color