PyDMLabel

class pydm.widgets.label.PyDMLabel(parent=None, init_channel=None)[source]

Bases: QLabel, TextFormatter, PyDMWidget, DisplayFormat

A QLabel with support for setting the text via a PyDM Channel, or through the PyDM Rules system.

Note

If a PyDMLabel is configured to use a Channel, and also with a rule which changes the ‘Text’ property, the behavior is undefined. Use either the Channel or a text rule, but not both.

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

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

check_enable_state()[source]

If the channel this label is connected to becomes disconnected, display only the name of the channel.

displayFormat

displayFormat property.

Getter:

Returns the displayFormat

Setter:

Sets the displayFormat

Type:

int

value_changed(new_value)[source]

Callback invoked when the Channel value is changed. Sets the value of new_value accordingly at the Label.

Parameters:

new_value (str, int, float, bool or np.ndarray) – The new value from the channel. The type depends on the channel.

Note

See QLabel Documentation for all inherited properties and methods.