PyRogueLineEdit

For conceptual usage, see:

class pyrogue.pydm.widgets.PyRogueLineEdit(parent, init_channel=None, show_units=True, read_only=False)[source]

PyDM line edit with Rogue-specific display and unit handling.

Parameters:
  • parent (QWidget) – Parent Qt widget.

  • init_channel (str | None, default: None) – Initial Rogue channel address.

  • show_units (bool, default: True) – If True, display channel units in a dedicated unit label.

  • read_only (bool, default: False) – Unused compatibility parameter retained for legacy call sites.

check_enable_state()[source]

Update read-only state based on channel write access.

Return type:

None

dirty()

Whether user-edited text is pending commit.

Return type:

bool

focusOutEvent(event)[source]

Clear dirty state when focus leaves the widget.

Return type:

None

Parameters:

event (qtpy.QtGui.QFocusEvent)

send_value()[source]

Emit a send_value_signal to update channel value.

The text is cleaned of all units, user-formatting and scale values before being sent back to the channel. This function is attached the ReturnPressed signal of the PyDMLineEdit

Return type:

None

set_display()[source]

Set the text display of the PyDMLineEdit.

The original value given by the PV is converted to a text entry based on the current settings for scale value, precision, a user-defined format, and the current units. If the user is currently entering a value in the PyDMLineEdit the text will not be changed.

Return type:

None

text_edited()[source]

Mark widget dirty when user edits text.

Return type:

None

unit_changed(new_unit)[source]

Update displayed units text.

Return type:

None

Parameters:

new_unit (str)