コード例 #1
0
    def __init__(self, parent=None):
        Tester.__init__(self)
        super(CalibrationDialog, self).__init__(parent=parent)

        self.setupUi(self)

        self.debug("Initialization of the calibration dialog")

        self._thread_pool = getPool(parent=self)

        # get motor positions and set the corresponding spin boxes
        key = self.MOTORX
        spinbox = self.dsb_rbx
        value = getMotorPosition(devices.DEVICE_PATHS[key])
        if self.testFloat(value):
            spinbox.setValue(value)

        key = self.MOTORY
        spinbox = self.dsb_rby
        value = getMotorPosition(devices.DEVICE_PATHS[key])
        if self.testFloat(value):
            spinbox.setValue(value)

        key = self.MOTORZ
        spinbox = self.dsb_rbz
        value = getMotorPosition(devices.DEVICE_PATHS[key])
        if self.testFloat(value):
            spinbox.setValue(value)
コード例 #2
0
    def __init_variables(self):
        self.debug("Init variables")

        # motors widget
        self.motors = None

        # widget with diamond correction
        self.diacorr = None

        # tread pool
        self._thread_pool = getPool(parent=self)
コード例 #3
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent=parent)
        Tester.__init__(self)

        # device path
        self.MOTORX = devices.DEVICE_PATHS[self.MOTORX_KEY]

        # thread pool
        self._thread_pool = getPool(parent=self)

        self.debug("Initializing diamond correction widget")
        self.setupUi(self)

        # signal starting the calculation
        self.sign_updatecalc.connect(self.startCalculation)

        # signals from spinboxes to update the calculation
        self.connect(self.dsb_dtip, QtCore.SIGNAL("valueChanged (double)"),
                     self.startCalculation)
        self.connect(self.dsb_bsurface, QtCore.SIGNAL("valueChanged (double)"),
                     self.startCalculation)