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.

currentValue

The color for when widget is in state 0 :rtype: int

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) –

state0Color

The color for when widget is in state 0 :rtype: QColor

state10Color

The color for when widget is in state 10 :rtype: QColor

state11Color

The color for when widget is in state 11 :rtype: QColor

state12Color

The color for when widget is in state 12 :rtype: QColor

state13Color

The color for when widget is in state 13 :rtype: QColor

state14Color

The color for when widget is in state 14 :rtype: QColor

state15Color

The color for when widget is in state 15 :rtype: QColor

state1Color

The color for when widget is in state 1 :rtype: QColor

state2Color

The color for when widget is in state 2 :rtype: QColor

state3Color

The color for when widget is in state 3 :rtype: QColor

state4Color

The color for when widget is in state 4 :rtype: QColor

state5Color

The color for when widget is in state 5 :rtype: QColor

state6Color

The color for when widget is in state 6 :rtype: QColor

state7Color

The color for when widget is in state 7 :rtype: QColor

state8Color

The color for when widget is in state 8 :rtype: QColor

state9Color

The color for when widget is in state 9 :rtype: QColor

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.