How to use the pydm.PyQt.QtCore.pyqtSlot 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 / tests / test_utils / fake_widgets.py View on Github external
    @pyqtSlot(tuple)
    def recv_enums(self, enums):
        """
        Get enum strings signal

        :param enums: enum strings
        :type enums:  tuple of str
        """
        self.enums = enums
        self.enums_updated_signal.emit()
github slaclab / pydm / tests / test_utils / fake_widgets.py View on Github external
    @pyqtSlot(int)
    def recv_sevr(self, sevr):
        """
        Get alarm state signal

        :param sevr: alarm state
        :type sevr:  int
        """
        self.sevr = sevr
        self.sevr_updated_signal.emit()
github slaclab / pydm / tests / test_utils / fake_widgets.py View on Github external
    @pyqtSlot(float)
    @pyqtSlot(str)
    def send_value(self, value):
        """
        Send desired value to plugin slot.

        :param value: value to send
        :type value: int, float, or str
        """
        self.send_value_signal[type(value)].emit(value)
github slaclab / pydm / pydm / widgets / indicator.py View on Github external
    @pyqtSlot(int)
    def alarmSeverityChanged(self, new_alarm_severity):
        if new_alarm_severity == 0:
            self.no_alarm_signal.emit()
        elif new_alarm_severity == 1:
            self.minor_alarm_signal.emit()
        elif new_alarm_severity == 2:
            self.major_alarm_signal.emit()
        elif new_alarm_severity == 3:
            self.invalid_alarm_signal.emit()
github slaclab / pydm / pydm / widgets / indicator.py View on Github external
    @pyqtSlot(bool)
    def connectionStateChanged(self, connected):
        if connected:
            self.connected_signal.emit()
        else:
            self.disconnected_signal.emit()
github slaclab / pydm / pydm / widgets / waveformplot_qtplugin.py View on Github external
    @pyqtSlot()
    def edit_curves(self):
        edit_curves_dialog = WaveformPlotCurveEditorDialog(self.waveform_plot)
        edit_curves_dialog.exec_()
github slaclab / pydm / examples / positioner / positioner_module.py View on Github external
    @pyqtSlot()
    def move_motors(self):
        if self.moving:
            return
        
        self.moving = True
        self.ui.pushButton.setEnabled(False)
        self.display_manager_window.statusBar().showMessage("Moving motors...")
        self.motor1pv.put(self.m1des)
        self.motor2pv.put(self.m2des)
        self.motor3pv.put(self.m3des)
        
        waiting = True
        while waiting:
            time.sleep(0.001)
            waiting = not all([pv.put_complete for pv in self.motor_pvs])
        self.display_manager_window.statusBar().showMessage("Motor move complete.", 2000)
github slaclab / pydm / pydm / data_plugins / local_plugin.py View on Github external
        @pyqtSlot(np.ndarray)
        def put_waveform(self, value):
            """
            This is a deprecated function kept temporarily for compatibility
            with old code.

            :param value: The waveform value we'd like to put to our attr.
            :type value:  np.ndarray
            """
            self.put_value(value)
github slaclab / pydm / pydm / widgets / timeplot_qtplugin.py View on Github external
    @pyqtSlot()
    def edit_curves(self):
        edit_curves_dialog = TimePlotCurveEditorDialog(self.time_plot)
        edit_curves_dialog.exec_()
github slaclab / pydm / pydm / data_plugins / local_plugin.py View on Github external
        @pyqtSlot(str)
        @pyqtSlot(np.ndarray)
        def put_value(self, value):
            """
            Set our object attribute's value. If the attribute is a function,
            we will execute it.

            :param value: The value we'd like to set in our object.
            :type value:  int, float, str, or np.ndarray.
            """
            # Field: replace value
            if self.nargs is None:
                try:
                    setattr(obj, self.attr, value)
                except:
                    return
            # Function of zero arguments: call function