How to use the pydm.widgets.frame.PyDMFrame function in pydm

To help you get started, we’ve selected a few pydm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github slaclab / rogue / python / pyrogue / pydm / customwidgets / displays / variable_tree.py View on Github external
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
github slaclab / rogue / python / pyrogue / pydm / widgets / command_tree.py View on Github external
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
github slaclab / pydm / pydm / widgets / qtplugins.py View on Github external
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)
github slaclab / rogue / python / pyrogue / pydm / widgets / root_control.py View on Github external
def __init__(self, parent=None, init_channel=None):
        PyDMFrame.__init__(self, parent, init_channel)
        self._node = None
github slaclab / rogue / python / pyrogue / pydm / widgets / run_control.py View on Github external
# 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)
github slaclab / rogue / python / pyrogue / pydm / widgets / command_tree.py View on Github external
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  = []