PyDMMultiStateIndicator

class pydm.widgets.byte.PyDMMultiStateIndicator(parent: Optional[QWidget] = None, init_channel=None)[source]

Bases: QWidget, PyDMWidget

Widget with 16 available states that are set by the connected channel. Each state represents a different color that can be configured.

Parameters:
  • parent (QWidget) – The parent widget for the Label

  • init_channel (str, optional) – The channel to be used by the widget.

eventFilter(self, a0: Optional[QObject], a1: Optional[QEvent]) bool[source]
paintEvent(event: QPaintEvent) None[source]

Paint events are sent to widgets that need to update themselves, for instance when part of a widget is exposed because a covering widget was moved.

Paint the widget according to the state colors.

Parameters:

event (QPaintEvent) –

value_changed(new_val: int) None[source]

Callback invoked when the Channel value is changed. :param new_val: The new value from the channel. :type new_val: int

Note

See QWidget Documentation for all inherited properties and methods.