Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.underline.setVisible(self._show_underline)
def set_device_display(self, display):
"""Typhos callback: set the :class:`TyphosDeviceDisplay`."""
self.device_display = display
def toggle():
toggle_display(display.display_widget)
self.label.toggle_requested.connect(toggle)
# Make designable properties from the title label available here as well
label_alignment = forward_property('label', QtWidgets.QLabel, 'alignment')
label_font = forward_property('label', QtWidgets.QLabel, 'font')
label_indent = forward_property('label', QtWidgets.QLabel, 'indent')
label_margin = forward_property('label', QtWidgets.QLabel, 'margin')
label_openExternalLinks = forward_property('label', QtWidgets.QLabel,
'openExternalLinks')
label_pixmap = forward_property('label', QtWidgets.QLabel, 'pixmap')
label_text = forward_property('label', QtWidgets.QLabel, 'text')
label_textFormat = forward_property('label', QtWidgets.QLabel,
'textFormat')
label_textInteractionFlags = forward_property('label', QtWidgets.QLabel,
'textInteractionFlags')
label_wordWrap = forward_property('label', QtWidgets.QLabel, 'wordWrap')
# Make designable properties from the grid_layout
layout_margin = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'margin')
layout_spacing = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'spacing')
label_wordWrap = forward_property('label', QtWidgets.QLabel, 'wordWrap')
# Make designable properties from the grid_layout
layout_margin = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'margin')
layout_spacing = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'spacing')
# Make designable properties from the underline
underline_palette = forward_property('underline', QtWidgets.QFrame,
'palette')
underline_styleSheet = forward_property('underline', QtWidgets.QFrame,
'styleSheet')
underline_lineWidth = forward_property('underline', QtWidgets.QFrame,
'lineWidth')
underline_midLineWidth = forward_property('underline', QtWidgets.QFrame,
'midLineWidth')
class TyphosDeviceDisplay(utils.TyphosBase, widgets.TyphosDesignerMixin,
_DisplayTypes):
"""
Main display for a single ophyd Device.
This contains the widgets for all of the root devices signals, and any
methods you would like to display. By typhos convention, the base
initialization sets up the widgets and the :meth:`.from_device` class
method will automatically populate the resulting display.
Parameters
----------
parent : QWidget, optional
self.device_display = display
def toggle():
toggle_display(display.display_widget)
self.label.toggle_requested.connect(toggle)
# Make designable properties from the title label available here as well
label_alignment = forward_property('label', QtWidgets.QLabel, 'alignment')
label_font = forward_property('label', QtWidgets.QLabel, 'font')
label_indent = forward_property('label', QtWidgets.QLabel, 'indent')
label_margin = forward_property('label', QtWidgets.QLabel, 'margin')
label_openExternalLinks = forward_property('label', QtWidgets.QLabel,
'openExternalLinks')
label_pixmap = forward_property('label', QtWidgets.QLabel, 'pixmap')
label_text = forward_property('label', QtWidgets.QLabel, 'text')
label_textFormat = forward_property('label', QtWidgets.QLabel,
'textFormat')
label_textInteractionFlags = forward_property('label', QtWidgets.QLabel,
'textInteractionFlags')
label_wordWrap = forward_property('label', QtWidgets.QLabel, 'wordWrap')
# Make designable properties from the grid_layout
layout_margin = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'margin')
layout_spacing = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'spacing')
# Make designable properties from the underline
underline_palette = forward_property('underline', QtWidgets.QFrame,
'palette')
underline_styleSheet = forward_property('underline', QtWidgets.QFrame,
self._show_underline = bool(value)
self.underline.setVisible(self._show_underline)
def set_device_display(self, display):
"""Typhos callback: set the :class:`TyphosDeviceDisplay`."""
self.device_display = display
def toggle():
toggle_display(display.display_widget)
self.label.toggle_requested.connect(toggle)
# Make designable properties from the title label available here as well
label_alignment = forward_property('label', QtWidgets.QLabel, 'alignment')
label_font = forward_property('label', QtWidgets.QLabel, 'font')
label_indent = forward_property('label', QtWidgets.QLabel, 'indent')
label_margin = forward_property('label', QtWidgets.QLabel, 'margin')
label_openExternalLinks = forward_property('label', QtWidgets.QLabel,
'openExternalLinks')
label_pixmap = forward_property('label', QtWidgets.QLabel, 'pixmap')
label_text = forward_property('label', QtWidgets.QLabel, 'text')
label_textFormat = forward_property('label', QtWidgets.QLabel,
'textFormat')
label_textInteractionFlags = forward_property('label', QtWidgets.QLabel,
'textInteractionFlags')
label_wordWrap = forward_property('label', QtWidgets.QLabel, 'wordWrap')
# Make designable properties from the grid_layout
layout_margin = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'margin')
layout_spacing = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'spacing')
@show_underline.setter
def show_underline(self, value):
self._show_underline = bool(value)
self.underline.setVisible(self._show_underline)
def set_device_display(self, display):
"""Typhos callback: set the :class:`TyphosDeviceDisplay`."""
self.device_display = display
def toggle():
toggle_display(display.display_widget)
self.label.toggle_requested.connect(toggle)
# Make designable properties from the title label available here as well
label_alignment = forward_property('label', QtWidgets.QLabel, 'alignment')
label_font = forward_property('label', QtWidgets.QLabel, 'font')
label_indent = forward_property('label', QtWidgets.QLabel, 'indent')
label_margin = forward_property('label', QtWidgets.QLabel, 'margin')
label_openExternalLinks = forward_property('label', QtWidgets.QLabel,
'openExternalLinks')
label_pixmap = forward_property('label', QtWidgets.QLabel, 'pixmap')
label_text = forward_property('label', QtWidgets.QLabel, 'text')
label_textFormat = forward_property('label', QtWidgets.QLabel,
'textFormat')
label_textInteractionFlags = forward_property('label', QtWidgets.QLabel,
'textInteractionFlags')
label_wordWrap = forward_property('label', QtWidgets.QLabel, 'wordWrap')
# Make designable properties from the grid_layout
layout_margin = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'margin')
label_textFormat = forward_property('label', QtWidgets.QLabel,
'textFormat')
label_textInteractionFlags = forward_property('label', QtWidgets.QLabel,
'textInteractionFlags')
label_wordWrap = forward_property('label', QtWidgets.QLabel, 'wordWrap')
# Make designable properties from the grid_layout
layout_margin = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'margin')
layout_spacing = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'spacing')
# Make designable properties from the underline
underline_palette = forward_property('underline', QtWidgets.QFrame,
'palette')
underline_styleSheet = forward_property('underline', QtWidgets.QFrame,
'styleSheet')
underline_lineWidth = forward_property('underline', QtWidgets.QFrame,
'lineWidth')
underline_midLineWidth = forward_property('underline', QtWidgets.QFrame,
'midLineWidth')
class TyphosDeviceDisplay(utils.TyphosBase, widgets.TyphosDesignerMixin,
_DisplayTypes):
"""
Main display for a single ophyd Device.
This contains the widgets for all of the root devices signals, and any
methods you would like to display. By typhos convention, the base
initialization sets up the widgets and the :meth:`.from_device` class
method will automatically populate the resulting display.
label_alignment = forward_property('label', QtWidgets.QLabel, 'alignment')
label_font = forward_property('label', QtWidgets.QLabel, 'font')
label_indent = forward_property('label', QtWidgets.QLabel, 'indent')
label_margin = forward_property('label', QtWidgets.QLabel, 'margin')
label_openExternalLinks = forward_property('label', QtWidgets.QLabel,
'openExternalLinks')
label_pixmap = forward_property('label', QtWidgets.QLabel, 'pixmap')
label_text = forward_property('label', QtWidgets.QLabel, 'text')
label_textFormat = forward_property('label', QtWidgets.QLabel,
'textFormat')
label_textInteractionFlags = forward_property('label', QtWidgets.QLabel,
'textInteractionFlags')
label_wordWrap = forward_property('label', QtWidgets.QLabel, 'wordWrap')
# Make designable properties from the grid_layout
layout_margin = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'margin')
layout_spacing = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'spacing')
# Make designable properties from the underline
underline_palette = forward_property('underline', QtWidgets.QFrame,
'palette')
underline_styleSheet = forward_property('underline', QtWidgets.QFrame,
'styleSheet')
underline_lineWidth = forward_property('underline', QtWidgets.QFrame,
'lineWidth')
underline_midLineWidth = forward_property('underline', QtWidgets.QFrame,
'midLineWidth')
class TyphosDeviceDisplay(utils.TyphosBase, widgets.TyphosDesignerMixin,
def show_underline(self, value):
self._show_underline = bool(value)
self.underline.setVisible(self._show_underline)
def set_device_display(self, display):
"""Typhos callback: set the :class:`TyphosDeviceDisplay`."""
self.device_display = display
def toggle():
toggle_display(display.display_widget)
self.label.toggle_requested.connect(toggle)
# Make designable properties from the title label available here as well
label_alignment = forward_property('label', QtWidgets.QLabel, 'alignment')
label_font = forward_property('label', QtWidgets.QLabel, 'font')
label_indent = forward_property('label', QtWidgets.QLabel, 'indent')
label_margin = forward_property('label', QtWidgets.QLabel, 'margin')
label_openExternalLinks = forward_property('label', QtWidgets.QLabel,
'openExternalLinks')
label_pixmap = forward_property('label', QtWidgets.QLabel, 'pixmap')
label_text = forward_property('label', QtWidgets.QLabel, 'text')
label_textFormat = forward_property('label', QtWidgets.QLabel,
'textFormat')
label_textInteractionFlags = forward_property('label', QtWidgets.QLabel,
'textInteractionFlags')
label_wordWrap = forward_property('label', QtWidgets.QLabel, 'wordWrap')
# Make designable properties from the grid_layout
layout_margin = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'margin')
layout_spacing = forward_property('grid_layout', QtWidgets.QHBoxLayout,
def toggle():
toggle_display(display.display_widget)
self.label.toggle_requested.connect(toggle)
# Make designable properties from the title label available here as well
label_alignment = forward_property('label', QtWidgets.QLabel, 'alignment')
label_font = forward_property('label', QtWidgets.QLabel, 'font')
label_indent = forward_property('label', QtWidgets.QLabel, 'indent')
label_margin = forward_property('label', QtWidgets.QLabel, 'margin')
label_openExternalLinks = forward_property('label', QtWidgets.QLabel,
'openExternalLinks')
label_pixmap = forward_property('label', QtWidgets.QLabel, 'pixmap')
label_text = forward_property('label', QtWidgets.QLabel, 'text')
label_textFormat = forward_property('label', QtWidgets.QLabel,
'textFormat')
label_textInteractionFlags = forward_property('label', QtWidgets.QLabel,
'textInteractionFlags')
label_wordWrap = forward_property('label', QtWidgets.QLabel, 'wordWrap')
# Make designable properties from the grid_layout
layout_margin = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'margin')
layout_spacing = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'spacing')
# Make designable properties from the underline
underline_palette = forward_property('underline', QtWidgets.QFrame,
'palette')
underline_styleSheet = forward_property('underline', QtWidgets.QFrame,
'styleSheet')
self.label.toggle_requested.connect(toggle)
# Make designable properties from the title label available here as well
label_alignment = forward_property('label', QtWidgets.QLabel, 'alignment')
label_font = forward_property('label', QtWidgets.QLabel, 'font')
label_indent = forward_property('label', QtWidgets.QLabel, 'indent')
label_margin = forward_property('label', QtWidgets.QLabel, 'margin')
label_openExternalLinks = forward_property('label', QtWidgets.QLabel,
'openExternalLinks')
label_pixmap = forward_property('label', QtWidgets.QLabel, 'pixmap')
label_text = forward_property('label', QtWidgets.QLabel, 'text')
label_textFormat = forward_property('label', QtWidgets.QLabel,
'textFormat')
label_textInteractionFlags = forward_property('label', QtWidgets.QLabel,
'textInteractionFlags')
label_wordWrap = forward_property('label', QtWidgets.QLabel, 'wordWrap')
# Make designable properties from the grid_layout
layout_margin = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'margin')
layout_spacing = forward_property('grid_layout', QtWidgets.QHBoxLayout,
'spacing')
# Make designable properties from the underline
underline_palette = forward_property('underline', QtWidgets.QFrame,
'palette')
underline_styleSheet = forward_property('underline', QtWidgets.QFrame,
'styleSheet')
underline_lineWidth = forward_property('underline', QtWidgets.QFrame,
'lineWidth')
underline_midLineWidth = forward_property('underline', QtWidgets.QFrame,
'midLineWidth')