Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for a in attrs:
le = QLineEdit()
le.setReadOnly(True)
le.setText(str(getattr(self._var,a)))
fl.addRow(a,le)
le = QLineEdit()
le.setReadOnly(True)
le.setText(self._path)
fl.addRow('PyDM Path',le)
msgBox.exec()
class VariableTree(PyDMFrame):
def __init__(self, parent=None, init_channel=None, incGroups=None, excGroups=['Hidden']):
PyDMFrame.__init__(self, parent, init_channel)
self._client = None
self._node = None
self._incGroups = incGroups
self._excGroups = excGroups
self._tree = None
self._addr = None
self._port = None
self._en = False
self._children = []
if init_channel is not None:
self._en = True
self._widget = QLineEdit()
self._value = self._cmd.valueDisp()
self._widget.setText(self._value)
self._widget.setToolTip(self._cmd.description)
self._widget.textChanged.connect(self._argChanged)
self._top._tree.setItemWidget(self,3,self._widget)
#@Slot(str)
def _argChanged(self,value):
self._btn.pressValue = value
class CommandTree(PyDMFrame):
def __init__(self, parent=None, init_channel=None, incGroups=None, excGroups=['Hidden']):
PyDMFrame.__init__(self, parent, init_channel)
self._node = None
self._path = None
self._incGroups = incGroups
self._excGroups = excGroups
self._tree = None
self._children = []
def connection_changed(self, connected):
build = (self._node is None) and (self._connected != connected and connected == True)
super(CommandTree, self).connection_changed(connected)
if not build: return
PyDMEmbeddedDisplayPlugin = qtplugin_factory(PyDMEmbeddedDisplay,
group=WidgetCategory.CONTAINER,
extensions=BASE_EXTENSIONS)
# Enum Button plugin
PyDMEnumButtonPlugin = qtplugin_factory(PyDMEnumButton,
group=WidgetCategory.INPUT,
extensions=BASE_EXTENSIONS)
# Enum Combobox plugin
PyDMEnumComboBoxPlugin = qtplugin_factory(PyDMEnumComboBox,
group=WidgetCategory.INPUT,
extensions=BASE_EXTENSIONS)
# Frame plugin
PyDMFramePlugin = qtplugin_factory(PyDMFrame, group=WidgetCategory.CONTAINER,
is_container=True,
extensions=BASE_EXTENSIONS)
# Image plugin
PyDMImageViewPlugin = qtplugin_factory(PyDMImageView,
group=WidgetCategory.DISPLAY,
extensions=BASE_EXTENSIONS)
# Line Edit plugin
PyDMLineEditPlugin = qtplugin_factory(PyDMLineEdit, group=WidgetCategory.INPUT,
extensions=BASE_EXTENSIONS)
# Log Viewer
PyDMLogDisplayPlugin = qtplugin_factory(PyDMLogDisplay,
group=WidgetCategory.DISPLAY,
extensions=BASE_EXTENSIONS)
def __init__(self, parent=None, init_channel=None):
PyDMFrame.__init__(self, parent, init_channel)
self._node = None
# the license terms in the LICENSE.txt file found in the top-level directory
# of this distribution and at:
# https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.
# No part of the rogue software platform, including this file, may be
# copied, modified, propagated, or distributed except according to the terms
# contained in the LICENSE.txt file.
#-----------------------------------------------------------------------------
import pyrogue
from pydm.widgets.frame import PyDMFrame
from pydm.widgets import PyDMLineEdit, PyDMEnumComboBox
from pyrogue.pydm.data_plugins.rogue_plugin import nodeFromAddress
from qtpy.QtCore import Qt, Property
from qtpy.QtWidgets import QVBoxLayout, QHBoxLayout, QFormLayout, QGroupBox
class RunControl(PyDMFrame):
def __init__(self, parent=None, init_channel=None):
PyDMFrame.__init__(self, parent, init_channel)
self._node = None
def connection_changed(self, connected):
build = (self._node is None) and (self._connected != connected and connected == True)
super(RunControl, self).connection_changed(connected)
if not build: return
self._node = nodeFromAddress(self.channel)
self._path = self.channel
vb = QVBoxLayout()
self.setLayout(vb)
def __init__(self, parent=None, init_channel=None, incGroups=None, excGroups=['Hidden']):
PyDMFrame.__init__(self, parent, init_channel)
self._node = None
self._path = None
self._incGroups = incGroups
self._excGroups = excGroups
self._tree = None
self._children = []