How to use the pydm.widgets.base.PyDMWritableWidget.__init__ 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 / pydm / pydm / widgets / spinbox.py View on Github external
def __init__(self, parent=None, init_channel=None):
        QDoubleSpinBox.__init__(self, parent)
        PyDMWritableWidget.__init__(self, init_channel=init_channel)
        self.valueBeingSet = False
        self.setEnabled(False)
        self._alarm_sensitive_border = False
        self._show_step_exponent = True
        self.step_exponent = 0
        self.setDecimals(0)
        self.app = QApplication.instance()
        self.setAccelerated(True)
github slaclab / pydm / pydm / widgets / pushbutton.py View on Github external
def __init__(self, parent=None, label=None, icon=None,
                 pressValue=None, relative=False,
                 init_channel=None):
        if icon:
            QPushButton.__init__(self, icon, label, parent)
        elif label:
            QPushButton.__init__(self, label, parent)
        else:
            QPushButton.__init__(self, parent)
        PyDMWritableWidget.__init__(self, init_channel=init_channel)
        self._pressValue = pressValue
        self._relative = relative
        self._alarm_sensitive_border = False
        self._show_confirm_dialog = False
        self._confirm_message = PyDMPushButton.DEFAULT_CONFIRM_MESSAGE
        self._password_protected = False
        self._password = ""
        self._protected_password = ""
        self.clicked.connect(self.sendValue)
github pcdshub / typhon / typhos / textedit.py View on Github external
def __init__(self, parent=None, init_channel=None, variety_metadata=None,
                 ophyd_signal=None):

        self._display_text = None
        self._encoding = "utf-8"
        self._delimiter = '\n'
        self._ophyd_signal = ophyd_signal
        self._format = 'plain'
        self._raw_value = None

        QtWidgets.QWidget.__init__(self, parent)
        PyDMWritableWidget.__init__(self, init_channel=init_channel)
        # superclasses do *not* support cooperative init:
        # super().__init__(self, parent=parent, init_channel=init_channel)

        self._setup_ui()
        self.variety_metadata = variety_metadata
github slaclab / pydm / pydm / widgets / line_edit.py View on Github external
def __init__(self, parent=None, init_channel=None):
        QLineEdit.__init__(self, parent)
        PyDMWritableWidget.__init__(self, init_channel=init_channel)
        self.app = QApplication.instance()
        self._display = None
        self._scale = 1

        self.returnPressed.connect(self.send_value)
        self.unitMenu = QMenu('Convert Units', self)
        self.create_unit_options()
        self._display_format_type = self.DisplayFormat.Default
        self._string_encoding = "utf_8"
        if utilities.is_pydm_app():
            self._string_encoding = self.app.get_string_encoding()
github slaclab / pydm / pydm / widgets / checkbox.py View on Github external
def __init__(self, parent=None, init_channel=None):
        QCheckBox.__init__(self, parent)
        PyDMWritableWidget.__init__(self, init_channel=init_channel)
        self.clicked.connect(self.send_value)
github slaclab / pydm / pydm / widgets / waveformtable.py View on Github external
def __init__(self, parent=None, init_channel=None):
        QTableWidget.__init__(self, parent)
        PyDMWritableWidget.__init__(self, init_channel=init_channel)
        self._columnHeaders = ["Value"]
        self._rowHeaders = []
        self._itemsFlags = (Qt.ItemIsSelectable |
                            Qt.ItemIsEditable |
                            Qt.ItemIsEnabled)
        self.waveform = None
        self._valueBeingSet = False
        self.setColumnCount(1)
        self.cellChanged.connect(self.send_waveform)
github slaclab / pydm / pydm / widgets / slider.py View on Github external
def __init__(self, parent=None, init_channel=None):
        QFrame.__init__(self, parent)
        PyDMWritableWidget.__init__(self, init_channel=init_channel)
        self.alarmSensitiveContent = True
        self.alarmSensitiveBorder = False
        # Internal values for properties
        self._show_limit_labels = True
        self._show_value_label = True
        self._user_defined_limits = False
        self._needs_limit_info = True
        self._minimum = None
        self._maximum = None
        self._user_minimum = -10.0
        self._user_maximum = 10.0
        self._num_steps = 101
        self._orientation = Qt.Horizontal
        # Set up all the internal widgets that make up a PyDMSlider.
        # We'll add all these things to layouts when we call setup_widgets_for_orientation
        label_size_policy = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Fixed)