def __init__(self, controlPanel): SwitchButton.__init__(self, controlPanel=controlPanel, key='bia', label='BIA', fmt='{:s}', cmdHead='%s bia' % controlPanel.actorName)
def __init__(self, controlPanel, key, label, safetyCheck=False): cmdStrOn = f'{controlPanel.actorName} power on={key}' cmdStrOff = f'{controlPanel.actorName} power off={key}' SwitchButton.__init__(self, controlPanel=controlPanel, key=key, label=label, cmdHead='', cmdStrOn=cmdStrOn, cmdStrOff=cmdStrOff, safetyCheck=safetyCheck)
def __init__(self, controlPanel, name): cmdStrOn = '%s HPheaters on %s' % (controlPanel.actorName, name) cmdStrOff = '%s HPheaters off %s' % (controlPanel.actorName, name) SwitchButton.__init__(self, controlPanel=controlPanel, key='heaters', label=name.capitalize(), ind=controlPanel.heaterChannels[name], cmdHead='', cmdStrOn=cmdStrOn, cmdStrOff=cmdStrOff)
def __init__(self, controlPanel, key, label=None, fmt='{:g}'): label = key.capitalize() if label is None else label cmdStrOn = f'{controlPanel.actorName} arc on={key}' cmdStrOff = f'{controlPanel.actorName} arc off={key}' SwitchButton.__init__(self, controlPanel=controlPanel, key=key, label=label, fmt=fmt, cmdHead='', cmdStrOn=cmdStrOn, cmdStrOff=cmdStrOff)
def __init__(self, controlPanel, pduPort): cmdStrOn = '%s power on=%s' % (controlPanel.actorName, pduPort.powerName) cmdStrOff = '%s power off=%s' % (controlPanel.actorName, pduPort.powerName) SwitchButton.__init__(self, controlPanel=controlPanel, key=pduPort.pduPort, label=pduPort.powerName.capitalize(), ind=1, fmt='{:s}', cmdHead='', cmdStrOn=cmdStrOn, cmdStrOff=cmdStrOff)
def __init__(self, controlPanel): cmdHead = '%s pump' % controlPanel.actorName SwitchButton.__init__(self, controlPanel, 'pumpSpeed', label='', cmdHead='', cmdStrOn='%s start' % cmdHead, cmdStrOff='%s stop' % cmdHead, labelOn='START', labelOff='STOP', safetyCheck=True) self.buttonOff.setColor(*styles.colorWidget('abort'))
def __init__(self, controlPanel, pcmPort): force = 'force' if pcmPort.powerName == 'bee' else '' cmdStrOn = '%s power on %s' % (controlPanel.actorName, pcmPort.powerName) cmdStrOff = '%s power off %s %s' % (controlPanel.actorName, pcmPort.powerName, force) safetyCheck = pcmPort.powerName == 'bee' SwitchButton.__init__(self, controlPanel=controlPanel, key=pcmPort.pcmPort, label=pcmPort.powerName.capitalize(), ind=1, fmt='{:s}', cmdHead='', cmdStrOn=cmdStrOn, cmdStrOff=cmdStrOff, safetyCheck=safetyCheck)
def __init__(self, controlPanel): EnuDeviceCmd.__init__(self, controlPanel) self.switchBia = SwitchBia(controlPanel=controlPanel) self.switchStrobe = SwitchButton(controlPanel=controlPanel, key='biaConfig', label='STROBE', cmdHead='%s bia strobe' % controlPanel.actorName) self.setBiaParam = SetBiaParamCmd(controlPanel=controlPanel) self.grid.addWidget(self.switchBia, 1, 0) self.grid.addWidget(self.switchStrobe, 1, 1) self.grid.addLayout(self.setBiaParam, 2, 0, 1, 3)
def __init__(self, controlPanel): cmdHead = '%s turbo' % controlPanel.actorName SwitchButton.__init__(self, controlPanel, 'turboSpeed', label='', cmdHead='', cmdStrOn='%s start' % cmdHead, cmdStrOff='%s stop' % cmdHead, labelOn='START', labelOff='STOP', safetyCheck=True)
def setText(self, txt): txt = 1 if txt == 'on' else 0 return SwitchButton.setText(self, txt=txt)
def __init__(self, controlPanel, arc): cmdStrOn = '%s iis on=%s' % (controlPanel.actorName, arc) cmdStrOff = '%s iis off=%s' % (controlPanel.actorName, arc) SwitchButton.__init__(self, controlPanel=controlPanel, key=arc, label=arc.capitalize(), cmdHead='', cmdStrOn=cmdStrOn, cmdStrOff=cmdStrOff)