示例#1
0
 def on_chargeMonitorComboBox_currentIndexChanged(self, value):
     if type(value) == type(1):
         text = "%s" % self.chargeMonitorComboBox.itemText(value)
         self.dataContainer.chargeMonitor = "%s" % text
     elif type(value) == type(QString()):
         self.dataContainer.chargeMonitor = "%s" % value
     else:
         debug(self, "Type is %s" % type(value))
示例#2
0
 def on_setpointSpinBox_valueChanged(self, setpointVal):
     ''' Disable widget to prevent going too fast '''
     self.setpointSpinBox.setEnabled(False)
     delta  = setpointVal - self._oldSetpoint 
     for index, knob in enumerate(self.dataContainer.knobs):
         curVal = knob.caget()
         newVal = curVal + knob.weight * delta
         debug(self, "%s --( %f + %f * %f ) --> %f" % ( knob.pvName, curVal, knob.weight, delta, newVal ))
         knob.caput(newVal)
         
     self._oldSetpoint = setpointVal
     self.setpointSpinBox.setEnabled(True)