PyDMByteIndicator¶
-
class
pydm.widgets.byte.
PyDMByteIndicator
(parent=None, init_channel=None)[source]¶ Widget for graphical representation of bits from an integer number with support for Channels and more from PyDM
- Parameters
parent (QWidget) – The parent widget for the Label
init_channel (str, optional) – The channel to be used by the widget.
-
bigEndian
¶ Whether the most significant bit is at the start or end of the widget.
- Returns
- Return type
bool
-
circles
¶ Draw indicators as circles, rather than rectangles.
- Returns
- Return type
bool
-
connection_changed
(connected)[source]¶ Callback invoked when the connection state of the Channel is changed. This callback acts on the connection state to enable/disable the widget and also trigger the change on alarm severity to ALARM_DISCONNECTED.
- Parameters
connected (int) – When this value is 0 the channel is disconnected, 1 otherwise.
-
init_for_designer
()[source]¶ Method called after the constructor to tweak configurations for when using the widget with the Qt Designer
-
labelPosition
¶ The side of the widget to display labels on.
- Returns
- Return type
int
-
labels
¶ Labels for each bit.
- Returns
- Return type
list
-
numBits
¶ Number of bits to interpret.
- Returns
- Return type
int
-
offColor
¶ The color for a bit in the ‘off’ state.
- Returns
- Return type
QColor
-
onColor
¶ The color for a bit in the ‘on’ state.
- Returns
- Return type
QColor
-
orientation
¶ Whether to lay out the bit indicators vertically or horizontally.
- Returns
- Return type
int
-
rebuild_layout
()[source]¶ Method to reorganize the top-level widget and its contents according to the layout property values.
-
shift
¶ Bit shift.
- Returns
- Return type
int
-
showLabels
¶ Whether or not to show labels next to each bit indicator.
- Returns
- Return type
bool