reborn.gui.misc package

Submodules

reborn.gui.misc.pen_editor module

reborn.gui.misc.pen_editor.dbgmsg(*args, **kwargs)[source]
class reborn.gui.misc.pen_editor.PenStylePreview(parent=None, pen=None, editable=True)[source]

Bases: QFrame

Simple QFrame that displays a QPen instance.

Parameters:
  • parent (QObject) – Look at Qt docs for this.

  • pen (QPen or None) – A QPen instance.

  • editable (bool) – If True, mouse clicks allow editing.

changed

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

Type:

str = …, revision

paintEvent(self, a0: Optional[QPaintEvent])[source]
update_pen(pen)[source]
get_pen()[source]
mousePressEvent(self, a0: Optional[QMouseEvent])[source]
class reborn.gui.misc.pen_editor.PenStyleEditor(parent=None, pen=None)[source]

Bases: QWidget

Simple QWidget for specifying a QPen.

Parameters:
  • () (parent) – Look up Qt docs… I don’t know exactly what this does…

  • pen (QPen or None) – A QPen instance.

changed

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

Type:

str = …, revision

set_color(color=None)[source]
set_style(style)[source]
set_width(value)[source]
set_width_from_edit()[source]
set_pen(pen)[source]
get_pen()[source]
on_change()[source]
class reborn.gui.misc.pen_editor.PenStyleDialog(parent=None, pen=None)[source]

Bases: QDialog

Simple QDialog for specifying a QPen. Emits QPen on accept.

Parameters:

pen (QPen or None) – A QPen instance to start with.

initUI()[source]
on_ok_button_clicked()[source]
set_pen(pen)[source]
get_pen()[source]
reborn.gui.misc.pen_editor.pen_dialog(parent=None, pen=None)[source]

Opens a simple QDialog to get a QPen. Returns the QPen.

Parameters:

pen (QPen or None) – A QPen instance to start with.

Returns:

QPen

reborn.gui.misc.spinbox module

class reborn.gui.misc.spinbox.BetterDoubleSpinBox(*args, format='e', decimals=5, **kwargs)[source]

Bases: QDoubleSpinBox

validate(self, input: str, pos: int) Tuple[QValidator.State, str, int][source]
valueFromText(self, text: str) float[source]
textFromValue(self, v: float) str[source]
stepBy(self, steps: int)[source]
setValueSilently(value)[source]
reborn.gui.misc.spinbox.character_orders(text)[source]

Given a string in scientific notation (e.g. 56.23e-5), return a list where each element gives the order-of-magnitude corresponding to that character in the string. For example:

print(character_orders(“4.4966429e2”))

[ 2. 1. 1. 0. -1. -2. -3. -4. -5. -5. -5.]

Module contents