PyDMRelatedDisplayButton

class pydm.widgets.related_display_button.PyDMRelatedDisplayButton(parent=None, filename=None)[source]

A QPushButton capable of opening a new Display at the same of at a new window.

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

  • filename (str, optional) – The file to be opened

displayFilename

use the ‘filenames’ property. This property simply returns the first filename from the ‘filenames’ property. The filename to open

Returns

Return type

str

Type

DEPRECATED

macros

The macro substitutions to use when launching the display, in JSON object format.

Returns

Return type

list of str

mousePressEvent(self, QMouseEvent)[source]
openInNewWindow

If true, the button will open the display in a new window, rather than in the existing window.

Returns

Return type

bool

open_display(filename, macro_string='', target=None)[source]

Open the configured filename with the given target.

Parameters

target (int) – PyDMRelatedDisplayButton.EXISTING_WINDOW or 0 will open the file on the same window. PyDMRelatedDisplayButton.NEW_WINDOW or 1 will result on a new process.

push_button_release_event(mouse_event)[source]

Opens the related display given by filename. If the Shift Key is hold it will open in a new window.

Called when a mouse button is released. A widget receives mouse release events when it has received the corresponding mouse press event. This means that if the user presses the mouse inside your widget, then drags the mouse somewhere else before releasing the mouse button, your widget receives the release event.

Parameters

mouse_event (QMouseEvent) –

showIcon

Whether or not we should show the selected Icon.

Returns

Return type

bool