def _create_label(self, base): label = PyDMLabel() label.channel = f'ca://{base}{VGET}' label.precisionFromPV = False label.precision = 0 return label
def _specViewLayout(self): dev = self.device.substitute(dev='TuneProc') # Mode lbl_mode = QLabel('Mode', self) self.cb_mode = PyDMEnumComboBox(self, dev.substitute(propty='SpecMode-Sel')) self.lb_mode = PyDMLabel(self, dev.substitute(propty='SpecMode-Sts')) hbox_mode = QHBoxLayout() hbox_mode.addWidget(self.cb_mode) hbox_mode.addWidget(self.lb_mode) # Time window lbl_timewdw = QLabel('Time Window [ms]', self) self.le_timewdw = PyDMLineEdit(self, dev.substitute(propty='SpecTime-SP')) self.le_timewdw.precisionFromPV = True self.lb_timewdw = PyDMLabel(self, dev.substitute(propty='SpecTime-RB')) hbox_timewdw = QHBoxLayout() hbox_timewdw.addWidget(self.le_timewdw) hbox_timewdw.addWidget(self.lb_timewdw) lay = QFormLayout() lay.setLabelAlignment(Qt.AlignRight) lay.setFormAlignment(Qt.AlignCenter) lay.addRow(lbl_mode, hbox_mode) lay.addRow(lbl_timewdw, hbox_timewdw) return lay
def _auxCommandsWidget(self): self._ld_speedlim = QLabel('Max Phase Speed\n[mm/s]', self) self._sb_speedlim = PyDMSpinbox( self, self.dev_pref.substitute(propty='MaxPhaseSpeed-SP')) self._sb_speedlim.showStepExponent = False self._sb_speedlim.setStyleSheet('max-width:4.5em;') self._lb_speedlim = PyDMLabel( self, self.dev_pref.substitute(propty='MaxPhaseSpeed-RB')) self._ld_homeaxis = QLabel('Do homing', self) self._pb_home = PyDMPushButton(self, label='', icon=qta.icon('mdi.keyboard-return')) self._pb_home.setToolTip('Execute homing for selected axis.') self._pb_home.channel = self.dev_pref.substitute(propty='DevCtrl-Cmd') self._pb_home.pressValue = 10 # Home self._pb_home.setObjectName('Home') self._pb_home.setStyleSheet( '#Home{min-width:30px; max-width:30px; icon-size:25px;}') self._ld_standby = QLabel('Enable Standby Mode', self) self._pb_standby = PyDMPushButton( self, label='', icon=qta.icon('mdi.alpha-a-box-outline')) self._pb_standby.setToolTip( 'Enable standby mode for automatic motion.') self._pb_standby.channel = \ self.dev_pref.substitute(propty='DevCtrl-Cmd') self._pb_standby.pressValue = 5 # Standby self._pb_standby.setObjectName('Standby') self._pb_standby.setStyleSheet( '#Standby{min-width:30px; max-width:30px; icon-size:25px;}') self._ld_lastcomm = QLabel('Last Command', self) self._lb_lastcomm = PyDMLabel( self, self.dev_pref.substitute(propty='LastDevCtrlCmd-Mon')) gbox_auxcmd = QGroupBox('Auxiliary Commands', self) lay_auxcmd = QGridLayout(gbox_auxcmd) lay_auxcmd.addWidget(self._ld_speedlim, 0, 0) lay_auxcmd.addWidget(self._sb_speedlim, 0, 1) lay_auxcmd.addWidget(self._lb_speedlim, 0, 2) lay_auxcmd.addItem(QSpacerItem(1, 10, QSzPlcy.Ignored, QSzPlcy.Fixed), 1, 0) lay_auxcmd.addWidget(self._ld_homeaxis, 2, 0) lay_auxcmd.addWidget(self._pb_home, 2, 1, 1, 2, alignment=Qt.AlignCenter) lay_auxcmd.addWidget(self._ld_standby, 3, 0) lay_auxcmd.addWidget(self._pb_standby, 3, 1, 1, 2, alignment=Qt.AlignCenter) lay_auxcmd.addWidget(self._ld_lastcomm, 4, 0) lay_auxcmd.addWidget(self._lb_lastcomm, 4, 1, 1, 2) return gbox_auxcmd
def _setupBiasPSWidget(self): self._ld_biasswtsel = QLabel('Switch', self) self._bt_biasswtsel = PyDMStateButton( self, self.prefix + self.dev_pref + ':EG-BiasPS:switch') self._ld_biasswtsts = QLabel('Status', self) self._led_biassswtsts = SiriusLedState( self, self.prefix + self.dev_pref + ':EG-BiasPS:swstatus') self._ld_biasvoltsp = QLabel('Voltage SP [V]', self) self._sb_biasvoltsp = SiriusSpinbox( self, self.prefix + self.dev_pref + ':EG-BiasPS:voltoutsoft') self._sb_biasvoltsp.showStepExponent = False self._ld_biasvoltrb = QLabel('Voltage RB [V]', self) self._lb_biasvoltrb = PyDMLabel( self, self.prefix + self.dev_pref + ':EG-BiasPS:voltinsoft') self._ld_biascurrrb = QLabel('Current RB [A]', self) self._lb_biascurrrb = PyDMLabel( self, self.prefix + self.dev_pref + ':EG-BiasPS:currentinsoft') wid = QGroupBox('Bias Power Supply', self) lay = QGridLayout(wid) lay.addWidget(self._ld_biasswtsel, 0, 0) lay.addWidget(self._bt_biasswtsel, 1, 0) lay.addWidget(self._ld_biasswtsts, 0, 1) lay.addWidget(self._led_biassswtsts, 1, 1) lay.addWidget(self._ld_biasvoltsp, 0, 2) lay.addWidget(self._sb_biasvoltsp, 1, 2) lay.addWidget(self._ld_biasvoltrb, 0, 3) lay.addWidget(self._lb_biasvoltrb, 1, 3) lay.addWidget(self._ld_biascurrrb, 0, 4) lay.addWidget(self._lb_biascurrrb, 1, 4) return wid
class TransmLineStatusDetails(SiriusDialog): """Transmission Line Status Details.""" def __init__(self, parent=None, prefix='', section=''): super().__init__(parent) self.prefix = prefix self.prefix += ('-' if prefix and not prefix.endswith('-') else '') self.section = section.upper() self.chs = SEC_2_CHANNELS[self.section] self.setObjectName(self.section + 'App') self.setWindowTitle(self.section + ' Transm. Line Detailed Status') self._setupUi() def _setupUi(self): self.lb_circtin = PyDMLabel( self, self.prefix+self.chs['TL Sts']['Circ TIn']) self.lb_circtin.showUnits = True self.lb_circtin.setStyleSheet('qproperty-alignment: AlignLeft;') self.lb_circtout = PyDMLabel( self, self.prefix+self.chs['TL Sts']['Circ TOut']) self.lb_circtout.showUnits = True self.lb_circtout.setStyleSheet('qproperty-alignment: AlignLeft;') self.led_circarc = SiriusLedAlert( self, self.prefix+self.chs['TL Sts']['Circ Arc']) if self.section == 'SI': self.led_loadarc = SiriusLedAlert( self, self.prefix+self.chs['TL Sts']['Load Arc']) self.led_circflwrt = SiriusLedAlert( self, self.prefix+self.chs['TL Sts']['Circ FlwRt']) self.led_loadflwrt = SiriusLedAlert( self, self.prefix+self.chs['TL Sts']['Load FlwRt']) self.led_circintlkop = SiriusLedAlert( self, self.prefix+self.chs['TL Sts']['Circ Intlk']) lay = QFormLayout(self) lay.setLabelAlignment(Qt.AlignRight) lay.addRow(QLabel('<h4>Transm. Line - Detailed Status</h4>')) lay.addItem(QSpacerItem(0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed)) lay.addRow('Circulator T In: ', self.lb_circtin) lay.addRow('Circulator T Out: ', self.lb_circtout) lay.addItem(QSpacerItem(0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed)) lay.addRow('Circulator Arc Detector: ', self.led_circarc) if self.section == 'SI': lay.addRow('Load Arc Detector: ', self.led_loadarc) lay.addRow('Circulator Flow: ', self.led_circflwrt) lay.addRow('Load Flow: ', self.led_loadflwrt) lay.addRow('Circulator Intlk: ', self.led_circintlkop) self.setStyleSheet(""" PyDMLabel{ qproperty-alignment: AlignLeft; } QLed{ max-width: 1.29em; } .QLabel{ max-height:2em; qproperty-alignment: AlignRight; }""")
class APUInterlockDetails(SiriusDialog): """APU Interlock Details Dialog.""" def __init__(self, parent=None, prefix='', device=''): super().__init__(parent) self._prefix = prefix self._device = _PVName(device) self.dev_pref = self._device.substitute(prefix=prefix) self.setObjectName('IDApp') self.setWindowTitle(device + ' Interlock Details') self._setupUi() def _setupUi(self): self._ld_ilkistop = QLabel('Stop\n(Input)', self) self._led_ilkistop = PyDMLed( self, self.dev_pref.substitute(propty='IntlkInStop-Mon')) self._led_ilkistop.offColor = PyDMLed.LightGreen self._led_ilkistop.onColor = PyDMLed.Red self._lb_ilkistop = PyDMLabel( self, self.dev_pref.substitute(propty='IntlkInStop-Mon')) hbox_ilkistop = QHBoxLayout() hbox_ilkistop.addWidget(self._led_ilkistop) hbox_ilkistop.addWidget(self._lb_ilkistop) self._ld_ilkieopn = QLabel('Emergency Open Gap\n(Input)', self) self._led_ilkieopn = PyDMLed( self, self.dev_pref.substitute(propty='IntlkInEOpnGap-Mon')) self._led_ilkieopn.offColor = PyDMLed.LightGreen self._led_ilkieopn.onColor = PyDMLed.Red self._lb_ilkieopn = PyDMLabel( self, self.dev_pref.substitute(propty='IntlkInEOpnGap-Mon')) hbox_eopngap = QHBoxLayout() hbox_eopngap.addWidget(self._led_ilkieopn) hbox_eopngap.addWidget(self._lb_ilkieopn) self._ld_ilkogapopn = QLabel('Gap Opened\n(Output)', self) self._lb_ilkogapopn = PyDMLabel( self, self.dev_pref.substitute(propty='IntlkOutGapStt-Mon')) self._lb_ilkogapopn.setAlignment(Qt.AlignCenter) self._ld_ilkopwr = QLabel('Power Enabled\n(Output)', self) self._led_ilkopwr = PyDMLed( self, self.dev_pref.substitute(propty='IntlkOutPwrEnbld-Mon')) self._led_ilkopwr.offColor = PyDMLed.Red self._led_ilkopwr.onColor = PyDMLed.LightGreen lay = QGridLayout(self) lay.addWidget( QLabel('<h4>Interlock status</h4>', self, alignment=Qt.AlignCenter), 0, 0, 1, 2) lay.addWidget(self._ld_ilkistop, 1, 0) lay.addLayout(hbox_ilkistop, 1, 1) lay.addWidget(self._ld_ilkieopn, 2, 0) lay.addLayout(hbox_eopngap, 2, 1) lay.addWidget(self._ld_ilkogapopn, 3, 0) lay.addWidget(self._lb_ilkogapopn, 3, 1) lay.addWidget(self._ld_ilkopwr, 4, 0) lay.addWidget(self._led_ilkopwr, 4, 1)
def _setupUi(self): self._ld_stthw = QLabel('Hardware state', self) self._led_stthw = PyDMLedMultiChannel( self, channels2values={ self.dev_pref.substitute(propty='StateHw-Mon'): { 'value': [0x4C, 0x3C], 'comp': 'in' } }) # in [Op, Ready] self._led_stthw.offColor = PyDMLed.Yellow self._led_stthw.onColor = PyDMLed.LightGreen self._led_stthw.setObjectName('led') self._led_stthw.setStyleSheet('#led{max-width: 1.29em;}') self._led_stthw.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Preferred) self._lb_stthw = PyDMLabel( self, self.dev_pref.substitute(propty='StateHw-Mon')) self._ld_sttsys = QLabel('System state', self) self._led_sttsys = PyDMLedMultiChannel( self, channels2values={ self.dev_pref.substitute(propty='State-Mon'): { 'value': [1, 4], 'comp': 'in' } }) # in [Op, Standby] self._led_sttsys.offColor = PyDMLed.Yellow self._led_sttsys.onColor = PyDMLed.LightGreen self._led_sttsys.setObjectName('led') self._led_sttsys.setStyleSheet('#led{max-width: 1.29em;}') self._led_sttsys.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Preferred) self._lb_sttsys = PyDMLabel( self, self.dev_pref.substitute(propty='State-Mon')) self._ld_isopr = QLabel('Is operational', self) self._led_isopr = PyDMLed( self, self.dev_pref.substitute(propty='IsOperational-Mon')) self._led_isopr.offColor = PyDMLed.Red self._led_isopr.onColor = PyDMLed.LightGreen self._led_isopr.setStyleSheet('max-width: 1.29em;') self._led_isopr.setSizePolicy(QSzPlcy.Maximum, QSzPlcy.Preferred) lay_hwsys = QGridLayout(self) lay_hwsys.addWidget( QLabel('<h4>Hardware&&LowLevel</h4>', self, alignment=Qt.AlignCenter), 0, 0, 1, 3) lay_hwsys.addWidget(self._ld_stthw, 2, 0) lay_hwsys.addWidget(self._led_stthw, 2, 1) lay_hwsys.addWidget(self._lb_stthw, 2, 2) lay_hwsys.addWidget(self._ld_sttsys, 3, 0) lay_hwsys.addWidget(self._led_sttsys, 3, 1) lay_hwsys.addWidget(self._lb_sttsys, 3, 2) lay_hwsys.addWidget(self._ld_isopr, 4, 0) lay_hwsys.addWidget(self._led_isopr, 4, 1)
def _setupFamiliesLayout(self): lay = QGridLayout() lb_family = QLabel('<h4>Family</h4>', self, alignment=Qt.AlignCenter) lb_family.setStyleSheet('max-height:1.29em;') lay.addWidget(lb_family, 0, 1) lb_rbdesc = QLabel('<h4>'+self.intstrength+'-RB</h4>', self, alignment=Qt.AlignCenter) lb_rbdesc.setStyleSheet('max-height:1.29em;') lay.addWidget(lb_rbdesc, 0, 2) if self.param == 'tune': lb_refdesc = QLabel('<h4>RefKL-Mon</h4>', self, alignment=Qt.AlignCenter) lb_refdesc.setStyleSheet('max-height:1.29em;') lay.addWidget(lb_refdesc, 0, 3) lb_lastddesc = QLabel('<h4>'+self.intstrength_calcdesc+'</h4>', self, alignment=Qt.AlignCenter) lb_lastddesc.setStyleSheet('max-height:1.29em;') lay.addWidget(lb_lastddesc, 0, 4) row = 1 for fam in self.fams: dev_name = _PVName(self.acc+'-Fam:PS-'+fam) pref_name = dev_name.substitute(prefix=self.prefix) pbt = QPushButton(qta.icon('fa5s.list-ul'), '', self) pbt.setObjectName('pbt') pbt.setStyleSheet(""" #pbt{ min-width:25px; max-width:25px; min-height:25px; max-height:25px; icon-size:20px;}""") _hlautil.connect_window( pbt, _PSDetailWindow, parent=self, psname=dev_name) lay.addWidget(pbt, row, 0) lb_name = QLabel(fam, self, alignment=Qt.AlignCenter) lay.addWidget(lb_name, row, 1) lb_rb = PyDMLabel(self, pref_name.substitute( propty=self.intstrength+'-RB')) lay.addWidget(lb_rb, row, 2) if self.param == 'tune': lb_ref = PyDMLabel(self, self.ioc_prefix.substitute( propty='RefKL'+fam+'-Mon')) lay.addWidget(lb_ref, row, 3) lb_calc = PyDMLabel(self, self.ioc_prefix.substitute( propty=self.intstrength_calcpv.format(fam))) lay.addWidget(lb_calc, row, 4) row += 1 return lay
def _setupHVPSWidget(self): self._ld_hvpsswtsel = QLabel('Switch', self) self._bt_hvpsswtsel = PyDMStateButton( self, self.prefix + self.dev_pref + ':EG-HVPS:switch') self._ld_hvpsswtsts = QLabel('Status', self) self._led_hvpsswtsts = SiriusLedState( self, self.prefix + self.dev_pref + ':EG-HVPS:swstatus') self._ld_hvpsvoltsp = QLabel('Voltage SP [kV]', self) self._sb_hvpsvoltsp = SiriusSpinbox( self, self.prefix + self.dev_pref + ':EG-HVPS:voltoutsoft') self._sb_hvpsvoltsp.showStepExponent = False self._ld_hvpsvoltrb = QLabel('Voltage RB [kV]', self) self._lb_hvpsvoltrb = PyDMLabel( self, self.prefix + self.dev_pref + ':EG-HVPS:voltinsoft') self._ld_hvpsenblsel = QLabel('Enable') self._bt_hvpsenblsel = PyDMStateButton( self, self.prefix + self.dev_pref + ':EG-HVPS:enable') self._ld_hvpsenblsts = QLabel('Status') self._led_hvpsenblsts = SiriusLedState( self, self.prefix + self.dev_pref + ':EG-HVPS:enstatus') self._ld_hvpscurrsp = QLabel('Current SP [mA]') self._sb_hvpscurrsp = SiriusSpinbox( self, self.prefix + self.dev_pref + ':EG-HVPS:currentoutsoft') self._sb_hvpscurrsp.showStepExponent = False self._ld_hvpscurrrb = QLabel('Current RB [mA]') self._lb_hvpscurrrb = PyDMLabel( self, self.prefix + self.dev_pref + ':EG-HVPS:currentinsoft') wid = QGroupBox('High Voltage Power Supply', self) lay = QGridLayout(wid) lay.addWidget(self._ld_hvpsswtsel, 0, 0) lay.addWidget(self._bt_hvpsswtsel, 1, 0) lay.addWidget(self._ld_hvpsswtsts, 0, 1) lay.addWidget(self._led_hvpsswtsts, 1, 1) lay.addWidget(self._ld_hvpsvoltsp, 0, 2) lay.addWidget(self._sb_hvpsvoltsp, 1, 2) lay.addWidget(self._ld_hvpsvoltrb, 0, 3) lay.addWidget(self._lb_hvpsvoltrb, 1, 3) lay.addItem(QSpacerItem(1, 15, QSzPlcy.Ignored, QSzPlcy.Fixed), 2, 0) lay.addWidget(self._ld_hvpsenblsel, 3, 0) lay.addWidget(self._bt_hvpsenblsel, 4, 0) lay.addWidget(self._ld_hvpsenblsts, 3, 1) lay.addWidget(self._led_hvpsenblsts, 4, 1) lay.addWidget(self._ld_hvpscurrsp, 3, 2) lay.addWidget(self._sb_hvpscurrsp, 4, 2) lay.addWidget(self._ld_hvpscurrrb, 3, 3) lay.addWidget(self._lb_hvpscurrrb, 4, 3) return wid
def _statusWidget(self): label_Conn = QLabel('Connection:', self) hbox_Conn = create_propty_layout(parent=self, prefix=self.cam_prefix, propty='Connection', propty_type='mon') label_Temp = QLabel('Temperature State:', self) self.lb_Temp = PyDMLabel(self, self.cam_prefix.substitute(propty='Temp-Mon')) self.lb_Temp.setStyleSheet('min-width:7.1em; max-width:7.1em;') self.lb_Temp.setAlignment(Qt.AlignCenter) self.led_TempState = SiriusLedAlert( self, self.cam_prefix.substitute(propty='TempState-Mon')) self.led_TempState.setStyleSheet('min-width:1.29em; max-width:1.29em;') self.lb_TempState = PyDMLabel( self, self.cam_prefix.substitute(propty='TempState-Mon')) self.lb_TempState.setStyleSheet('min-width:2.5em; max-width:2.5em;') hbox_Temp = QHBoxLayout() hbox_Temp.addWidget(self.lb_Temp) hbox_Temp.addWidget(self.led_TempState) hbox_Temp.addWidget(self.lb_TempState) label_LastErr = QLabel('Last Error:', self) hbox_LastErr = create_propty_layout(parent=self, prefix=self.cam_prefix, propty='LastErr', propty_type='mon', cmd={ 'label': 'Clear Last Error', 'pressValue': 1, 'name': 'ClearLastErr' }) label_Reset = QLabel('Reset Camera:', self) self.pb_dtl = PyDMPushButton( label='', icon=qta.icon('fa5s.sync'), parent=self, pressValue=1, init_channel=self.cam_prefix.substitute(propty='Rst-Cmd')) self.pb_dtl.setObjectName('reset') self.pb_dtl.setStyleSheet( "#reset{min-width:25px; max-width:25px; icon-size:20px;}") wid = QWidget() flay = QFormLayout(wid) flay.setLabelAlignment(Qt.AlignRight) flay.setFormAlignment(Qt.AlignHCenter) flay.addRow(label_Conn, hbox_Conn) flay.addRow(label_Temp, hbox_Temp) flay.addRow(label_LastErr, hbox_LastErr) flay.addRow(label_Reset, self.pb_dtl) return wid
def _setupDigMonLayout(self): lb_x = QLabel('<h4>X</h4>', self, alignment=Qt.AlignCenter) lb_y = QLabel('<h4>Y</h4>', self, alignment=Qt.AlignCenter) self.lb_tunex = PyDMLabel(self, 'SI-Glob:DI-Tune-H:TuneFrac-Mon') self.lb_tuney = PyDMLabel(self, 'SI-Glob:DI-Tune-V:TuneFrac-Mon') lay = QGridLayout() lay.addWidget(lb_x, 0, 0) lay.addWidget(self.lb_tunex, 0, 1) lay.addWidget(lb_y, 1, 0) lay.addWidget(self.lb_tuney, 1, 1) lay.setColumnStretch(0, 1) lay.setColumnStretch(1, 5) return lay
def _setupBCSettingsWidget(self): gbox_settings = QGroupBox('Bunch Cleaning Settings', self) ld_bcenbl = QLabel('Enable', self) cb_bcenbl = PyDMStateButton(self, self.dev_pref + ':CLEAN_ENABLE') ld_bcamp = QLabel('Amplitude', self) sb_bcamp = PyDMSpinbox(self, self.dev_pref + ':CLEAN_AMPL') sb_bcamp.showStepExponent = False lb_svamp = PyDMLabel(self, self.dev_pref + ':CLEAN_SAVE_AMPL') ld_bctune = QLabel('Tune', self) sb_bctune = PyDMSpinbox(self, self.dev_pref + ':CLEAN_TUNE') sb_bctune.showStepExponent = False lb_svfreq = PyDMLabel(self, self.dev_pref + ':CLEAN_SAVE_FREQ') ld_bcspan = QLabel('Span', self) le_bcspan = PyDMLineEdit(self, self.dev_pref + ':CLEAN_SPAN') lb_svspan = PyDMLabel(self, self.dev_pref + ':CLEAN_SAVE_SPAN') ld_bcper = QLabel('Period', self) le_bcper = PyDMLineEdit(self, self.dev_pref + ':CLEAN_PERIOD') lb_svper = PyDMLabel(self, self.dev_pref + ':CLEAN_SAVE_PERIOD') ld_bcpatt = QLabel('Mask', self) le_bcpatt = PyDMLineEdit(self, self.dev_pref + ':CLEAN_PATTERN') lay_clean = QGridLayout(gbox_settings) lay_clean.addWidget(QLabel('SAVED VALS.'), 0, 2) lay_clean.addWidget(ld_bcamp, 1, 0) lay_clean.addWidget(sb_bcamp, 1, 1) lay_clean.addWidget(lb_svamp, 1, 2) lay_clean.addWidget(ld_bctune, 2, 0) lay_clean.addWidget(sb_bctune, 2, 1) lay_clean.addWidget(lb_svfreq, 2, 2) lay_clean.addWidget(ld_bcspan, 3, 0) lay_clean.addWidget(le_bcspan, 3, 1) lay_clean.addWidget(lb_svspan, 3, 2) lay_clean.addWidget(ld_bcper, 4, 0) lay_clean.addWidget(le_bcper, 4, 1) lay_clean.addWidget(lb_svper, 4, 2) lay_clean.addWidget(ld_bcenbl, 5, 0) lay_clean.addWidget(cb_bcenbl, 5, 1) lay = QGridLayout() lay.addWidget(ld_bcpatt, 0, 0) lay.addWidget(le_bcpatt, 0, 1) lay_clean.addLayout(lay, 6, 0, 1, 3) return gbox_settings
def dataItem(self, channel, style): '''Get data channel info''' if style == 0: channel_info = PyDMLabel(parent=self, init_channel=self.prefix + self.device_name + ':' + channel) elif style in [1, 2, 4]: channel_info = PyDMSpinbox(parent=self, init_channel=self.prefix + self.device_name + ':' + channel) channel_info.showStepExponent = False else: channel_info = QLabel("Error", self) return channel_info
def _setupConfigurationWidget(self): statebutton_Test = PyDMStateButton( self, self.dcct_prefix.substitute(propty='Test-Sel')) statebutton_Test.shape = 1 statebutton_Test.setStyleSheet('min-width:6em; max-width:6em;') label_Test = PyDMLabel(self, self.dcct_prefix.substitute(propty='Test-Sts')) hlay_test = QHBoxLayout() hlay_test.addWidget(statebutton_Test) hlay_test.addWidget(label_Test) self.bt_dl = PyDMPushButton( parent=self, pressValue=1, icon=qta.icon('fa5s.sync'), init_channel=self.dcct_prefix.substitute(propty='Download-Cmd')) self.bt_dl.setObjectName('bt_dl') self.bt_dl.setStyleSheet( '#bt_dl{min-width:25px; max-width:25px; icon-size:20px;}') gbox_test = QGroupBox('Configurations') lay = QFormLayout(gbox_test) lay.setLabelAlignment(Qt.AlignRight) lay.setFormAlignment(Qt.AlignCenter) lay.addRow('Enable test current: ', hlay_test) lay.addRow('Download Configurations: ', self.bt_dl) return gbox_test
def _interlock_layout(self): interlock_layout = QGridLayout() intlk_cnt = 8 if 'Sept' not in self._devname else 7 for i in range(intlk_cnt): label = PyDMLabel( self, getattr(self, '_intlk' + str(i + 1) + '_lbcte_pv')) led = PyDMLed(self, getattr(self, '_intlk' + str(i + 1) + '_mon_pv')) led.onColor = led.LightGreen led.offColor = led.Red interlock_layout.addWidget(led, i, 0) interlock_layout.addWidget(label, i, 1) self.reset_bt = PyDMPushButton(parent=self, init_channel=self._reset_cmd_pv, pressValue=1) self.reset_bt.setIcon(qta.icon('fa5s.sync')) self.reset_bt.setObjectName('reset_bt') self.reset_bt.setStyleSheet( '#reset_bt{min-width:25px; max-width:25px; icon-size:20px;}') interlock_layout.addWidget(self.reset_bt, i + 1, 0, 1, 2, alignment=Qt.AlignHCenter) return interlock_layout
def _setupUi(self): self.scrn_view = SiriusScrnView(prefix=self._prefix, device=self._scrn) self.cb_scrntype = PyDMEnumComboBox( self, self._scrn_pref.substitute(propty='ScrnType-Sel')) self.l_scrntype = PyDMLabel( self, self._scrn_pref.substitute(propty='ScrnType-Sts')) self.led_scrntype = PyDMLed( self, self._scrn_pref.substitute(propty='ScrnType-Sts'), color_list=[ PyDMLed.LightGreen, PyDMLed.Red, PyDMLed.Red, PyDMLed.Yellow ]) self.led_scrntype.shape = 2 lay = QGridLayout() lay.addWidget( QLabel('<h3>Screen View</h3>', self, alignment=Qt.AlignCenter), 0, 0, 1, 4) lay.addItem(QSpacerItem(20, 20, QSzPlcy.Fixed, QSzPlcy.Fixed), 1, 0) lay.addWidget( QLabel('Select Screen Type: ', self, alignment=Qt.AlignRight), 2, 0) lay.addWidget(self.cb_scrntype, 2, 1) lay.addWidget(self.l_scrntype, 2, 2) lay.addWidget(self.led_scrntype, 2, 3) lay.addItem(QSpacerItem(20, 40, QSzPlcy.Fixed, QSzPlcy.Fixed), 4, 0) lay.addWidget(self.scrn_view, 5, 0, 1, 4) self.setLayout(lay)
def _setupUi(self): lay = QGridLayout(self) lay.setAlignment(Qt.AlignTop) lay.setHorizontalSpacing(25) lay.setVerticalSpacing(15) self.title = QLabel( '<h4>LLRF Interlock Details</h4>', self, alignment=Qt.AlignCenter) lay.addWidget(self.title, 0, 0, 1, 3) # inputs col = 0 for name, dic in self.chs['LLRF Intlk Details']['Inputs'].items(): gbox = QGroupBox(name, self) lay_intlk = QGridLayout(gbox) lay_intlk.setAlignment(Qt.AlignTop) lay_intlk.setHorizontalSpacing(9) lay_intlk.setVerticalSpacing(0) icol = 0 for key in dic['Status']: desc = QLabel(key, self, alignment=Qt.AlignCenter) desc.setStyleSheet('QLabel{min-width:1em; max-width:2.5em;}') lay_intlk.addWidget(desc, 0, icol) icol += 1 labels = dic['Labels'] for idx, label in enumerate(labels): irow, icol = idx+1, 0 for key, pvn in dic['Status'].items(): led = SiriusLedAlert(self, self.prefix+pvn, bit=idx) led.shape = led.Square if key != 'Mon': led.offColor = led.DarkRed lay_intlk.addWidget(led, irow, icol) icol += 1 lbl = QLabel(label, self) lbl.setStyleSheet('QLabel{min-width:12em;}') lay_intlk.addWidget(lbl, irow, icol) lay.addWidget(gbox, 1, col) col += 1 # timestamps gbox_time = QGroupBox('Timestamps', self) lay_time = QGridLayout(gbox_time) lay_time.setAlignment(Qt.AlignTop) lay_time.setHorizontalSpacing(9) lay_time.setVerticalSpacing(9) for idx, pvn in self.chs['LLRF Intlk Details']['Timestamps'].items(): irow = int(idx)-1 desc = QLabel('Interlock '+idx, self, alignment=Qt.AlignCenter) desc.setStyleSheet('QLabel{min-width:6em;}') lbl = PyDMLabel(self, self.prefix+pvn) lbl.showUnits = True lay_time.addWidget(desc, irow, 0) lay_time.addWidget(lbl, irow, 1) lay.addWidget(gbox_time, 1, col)
def setupui(self): self.layoutg = QGridLayout(self) grpbx = self._create_formlayout_groupbox( 'General Configurations', (('BPMMode-Sel', 'Operation Mode'), ('TriggerRep-Sel', 'Repeat Acquisitions'), ('TriggerHwDly-SP', 'Delay [us]'), ('SamplesPre-SP', 'Pre-Trigger NrSamples'), ('SamplesPost-SP', 'Post-Trigger NrSamples'), ('Trigger-Sel', 'Trigger Type'))) self.layoutg.addWidget(grpbx, 0, 0) grpbx = QGroupBox('Acquisition Control', self) gdl = QGridLayout(grpbx) pb1 = PyDMPushButton(grpbx, init_channel=self.get_pvname('TriggerEvent-Sel'), label='Start', pressValue=0) gdl.addWidget(pb1, 0, 0) pb2 = PyDMPushButton(grpbx, init_channel=self.get_pvname('TriggerEvent-Sel'), label='Stop', pressValue=1) gdl.addWidget(pb2, 0, 1) pb1 = PyDMPushButton(grpbx, init_channel=self.get_pvname('TriggerEvent-Sel'), label='Abort', pressValue=2) gdl.addWidget(pb1, 1, 0) lab = QLabel('Status:') lab.setAlignment(Qt.AlignCenter) gdl.addWidget(lab, 2, 0) lab = PyDMLabel(grpbx, init_channel=self.get_pvname('Status-Sts')) lab.setAlignment(Qt.AlignCenter) gdl.addWidget(lab, 2, 1) self.layoutg.addWidget(grpbx, 1, 0) grpbx = self._create_formlayout_groupbox('MultiBunch Configurations', ( ('Channel-Sel', 'Acquisition Rate'), ('Shots-SP', 'Number of Shots'), ('UpdateTime-SP', 'Update Interval'), ('TbtTagEn-Sel', 'Sync Timing', False), ('TbtTagDly-SP', 'TbT Delay', False), ('TbtDataMaskEn-Sel', 'Mask Data', False), ('TbtDataMaskSamplesBeg-SP', 'Mask Begin', False), ('TbtDataMaskSamplesEnd-SP', 'Mask End', False), )) grpbx.rules = self.basic_rule('BPMMode-Sts', True) self.layoutg.addWidget(grpbx, 2, 0) grpbx = self._create_formlayout_groupbox( 'Auto Trigger Configurations', (('DataTrigChan-Sel', 'Type of Rate as Trigger'), ('TriggerDataSel-SP', 'Channel'), ('TriggerDataPol-Sel', 'Slope'), ('TriggerDataThres-SP', 'Threshold'), ('TriggerDataHyst-SP', 'Hysteresis'))) grpbx.rules = self.basic_rule('Trigger-Sts', True, val=2) self.layoutg.addWidget(grpbx, 3, 0)
def connection_changed(self, connected): build = (self._node is None) and (self._connected != connected and connected is True) super(RunControl, self).connection_changed(connected) if not build: return self._node = nodeFromAddress(self.channel) self._path = self.channel vb = QVBoxLayout() self.setLayout(vb) gb = QGroupBox('Run Control ({})'.format(self._node.name)) vb.addWidget(gb) vb = QVBoxLayout() gb.setLayout(vb) fl = QFormLayout() fl.setRowWrapPolicy(QFormLayout.DontWrapRows) fl.setFormAlignment(Qt.AlignHCenter | Qt.AlignTop) fl.setLabelAlignment(Qt.AlignRight) vb.addLayout(fl) w = PyDMEnumComboBox(parent=None, init_channel=self._path + '.runRate') w.alarmSensitiveContent = False w.alarmSensitiveBorder = False fl.addRow('Run Rate:', w) hb = QHBoxLayout() vb.addLayout(hb) fl = QFormLayout() fl.setRowWrapPolicy(QFormLayout.DontWrapRows) fl.setFormAlignment(Qt.AlignHCenter | Qt.AlignTop) fl.setLabelAlignment(Qt.AlignRight) hb.addLayout(fl) w = PyDMEnumComboBox(parent=None, init_channel=self._path + '.runState') w.alarmSensitiveContent = False w.alarmSensitiveBorder = False fl.addRow('Run State:', w) fl = QFormLayout() fl.setRowWrapPolicy(QFormLayout.DontWrapRows) fl.setFormAlignment(Qt.AlignHCenter | Qt.AlignTop) fl.setLabelAlignment(Qt.AlignRight) hb.addLayout(fl) w = PyDMLabel(parent=None, init_channel=self._path + '.runCount') w.showUnits = False w.precisionFromPV = True w.alarmSensitiveContent = False w.alarmSensitiveBorder = False fl.addRow('Run Count:', w)
def _setupUi(self): self._ld_ilkistop = QLabel('Stop\n(Input)', self) self._led_ilkistop = PyDMLed( self, self.dev_pref.substitute(propty='IntlkInStop-Mon')) self._led_ilkistop.offColor = PyDMLed.LightGreen self._led_ilkistop.onColor = PyDMLed.Red self._lb_ilkistop = PyDMLabel( self, self.dev_pref.substitute(propty='IntlkInStop-Mon')) hbox_ilkistop = QHBoxLayout() hbox_ilkistop.addWidget(self._led_ilkistop) hbox_ilkistop.addWidget(self._lb_ilkistop) self._ld_ilkieopn = QLabel('Emergency Open Gap\n(Input)', self) self._led_ilkieopn = PyDMLed( self, self.dev_pref.substitute(propty='IntlkInEOpnGap-Mon')) self._led_ilkieopn.offColor = PyDMLed.LightGreen self._led_ilkieopn.onColor = PyDMLed.Red self._lb_ilkieopn = PyDMLabel( self, self.dev_pref.substitute(propty='IntlkInEOpnGap-Mon')) hbox_eopngap = QHBoxLayout() hbox_eopngap.addWidget(self._led_ilkieopn) hbox_eopngap.addWidget(self._lb_ilkieopn) self._ld_ilkogapopn = QLabel('Gap Opened\n(Output)', self) self._lb_ilkogapopn = PyDMLabel( self, self.dev_pref.substitute(propty='IntlkOutGapStt-Mon')) self._lb_ilkogapopn.setAlignment(Qt.AlignCenter) self._ld_ilkopwr = QLabel('Power Enabled\n(Output)', self) self._led_ilkopwr = PyDMLed( self, self.dev_pref.substitute(propty='IntlkOutPwrEnbld-Mon')) self._led_ilkopwr.offColor = PyDMLed.Red self._led_ilkopwr.onColor = PyDMLed.LightGreen lay = QGridLayout(self) lay.addWidget( QLabel('<h4>Interlock status</h4>', self, alignment=Qt.AlignCenter), 0, 0, 1, 2) lay.addWidget(self._ld_ilkistop, 1, 0) lay.addLayout(hbox_ilkistop, 1, 1) lay.addWidget(self._ld_ilkieopn, 2, 0) lay.addLayout(hbox_eopngap, 2, 1) lay.addWidget(self._ld_ilkogapopn, 3, 0) lay.addWidget(self._lb_ilkogapopn, 3, 1) lay.addWidget(self._ld_ilkopwr, 4, 0) lay.addWidget(self._led_ilkopwr, 4, 1)
def setup_ui(self): self.setLayout(QVBoxLayout()) bpm_table = QTableWidget(self) col_labels = ["X Pos (mm)", "Y Pos (mm)"] bpm_table.setColumnCount(len(col_labels)) bpm_table.setHorizontalHeaderLabels(col_labels) data = dev_list(self.start_marker, self.end_marker) bpm_names = [bpm['device'] for bpm in data] bpm_table.setRowCount(len(bpm_names)) bpm_table.setVerticalHeaderLabels(bpm_names) for row, bpm_name in enumerate(bpm_names): for col, axis in enumerate(("X", "Y")): pos = PyDMLabel() pos.channel = "ca://{}:{}".format(bpm_name, axis) pos.showUnits = True bpm_table.setCellWidget(row, col, pos) self.layout().addWidget(bpm_table)
def _setupUi(self): self.lb_circtin = PyDMLabel( self, self.prefix+self.chs['TL Sts']['Circ TIn']) self.lb_circtin.showUnits = True self.lb_circtin.setStyleSheet('qproperty-alignment: AlignLeft;') self.lb_circtout = PyDMLabel( self, self.prefix+self.chs['TL Sts']['Circ TOut']) self.lb_circtout.showUnits = True self.lb_circtout.setStyleSheet('qproperty-alignment: AlignLeft;') self.led_circarc = SiriusLedAlert( self, self.prefix+self.chs['TL Sts']['Circ Arc']) if self.section == 'SI': self.led_loadarc = SiriusLedAlert( self, self.prefix+self.chs['TL Sts']['Load Arc']) self.led_circflwrt = SiriusLedAlert( self, self.prefix+self.chs['TL Sts']['Circ FlwRt']) self.led_loadflwrt = SiriusLedAlert( self, self.prefix+self.chs['TL Sts']['Load FlwRt']) self.led_circintlkop = SiriusLedAlert( self, self.prefix+self.chs['TL Sts']['Circ Intlk']) lay = QFormLayout(self) lay.setLabelAlignment(Qt.AlignRight) lay.addRow(QLabel('<h4>Transm. Line - Detailed Status</h4>')) lay.addItem(QSpacerItem(0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed)) lay.addRow('Circulator T In: ', self.lb_circtin) lay.addRow('Circulator T Out: ', self.lb_circtout) lay.addItem(QSpacerItem(0, 10, QSzPlcy.Ignored, QSzPlcy.Fixed)) lay.addRow('Circulator Arc Detector: ', self.led_circarc) if self.section == 'SI': lay.addRow('Load Arc Detector: ', self.led_loadarc) lay.addRow('Circulator Flow: ', self.led_circflwrt) lay.addRow('Load Flow: ', self.led_loadflwrt) lay.addRow('Circulator Intlk: ', self.led_circintlkop) self.setStyleSheet(""" PyDMLabel{ qproperty-alignment: AlignLeft; } QLed{ max-width: 1.29em; } .QLabel{ max-height:2em; qproperty-alignment: AlignRight; }""")
def _kick_layout(self): self.kick_sp_widget = PyDMSpinboxScrollbar(self, self._kick_sp_pv) self.kick_rb_label = PyDMLabel(self, self._kick_rb_pv) self.kick_rb_label.showUnits = True self.kick_rb_label.precisionFromPV = True self.kick_mon_label = PyDMLabel(self, self._kick_mon_pv) self.kick_mon_label.showUnits = True self.kick_mon_label.precisionFromPV = True kick_layout = QFormLayout() kick_layout.setLabelAlignment(Qt.AlignRight) kick_layout.setFormAlignment(Qt.AlignHCenter) kick_layout.addRow('SP:', self.kick_sp_widget) kick_layout.addRow('RB:', self.kick_rb_label) kick_layout.addRow('Mon:', self.kick_mon_label) return kick_layout
def _setupGeneralInfoLayout(self): label_MtrPrefix = QLabel('Motor Prefix: ', self) self.PyDMLabel_MtrPrefix = PyDMLabel( self, self.scrn_prefix.substitute(propty='MtrCtrlPrefix-Cte')) self.PyDMLabel_MtrPrefix.setStyleSheet( """max-width:14.20em; max-height:1.29em;""") label_CamPrefix = QLabel('Camera Prefix: ', self) self.PyDMLabel_CamPrefix = PyDMLabel( self, self.scrn_prefix.substitute(propty='CamPrefix-Cte')) self.PyDMLabel_CamPrefix.setStyleSheet( """max-width:14.20em; max-height:1.29em;""") flay = QFormLayout() flay.addRow(label_MtrPrefix, self.PyDMLabel_MtrPrefix) flay.addRow(label_CamPrefix, self.PyDMLabel_CamPrefix) flay.setLabelAlignment(Qt.AlignRight) flay.setFormAlignment(Qt.AlignCenter) return flay
def _voltage_layout(self): voltage_layout = QVBoxLayout() self.voltage_sp_widget = PyDMSpinboxScrollbar(self, self._voltage_sp_pv) self.voltage_rb_label = PyDMLabel(self, self._voltage_rb_pv) self.voltage_rb_label.showUnits = True self.voltage_rb_label.precisionFromPV = True self.voltage_mon_label = PyDMLabel(self, self._voltage_mon_pv) self.voltage_mon_label.showUnits = True self.voltage_mon_label.precisionFromPV = True voltage_layout = QFormLayout() voltage_layout.setLabelAlignment(Qt.AlignRight) voltage_layout.setFormAlignment(Qt.AlignHCenter) voltage_layout.addRow('SP:', self.voltage_sp_widget) voltage_layout.addRow('RB:', self.voltage_rb_label) voltage_layout.addRow('Mon:', self.voltage_mon_label) return voltage_layout
def create_pair_sel(self, parent, pvname, device=None, is_vert=False): """.""" device = device or self.device basename = _PVName(device).substitute(prefix=self.prefix, propty_name=pvname) wid = QWidget(parent) if is_vert: lay = QVBoxLayout(wid) else: lay = QHBoxLayout(wid) lay.setContentsMargins(0, 0, 0, 0) pdm_cbbx = PyDMEnumComboBox(wid, basename.substitute(propty_suffix='Sel')) pdm_lbl = PyDMLabel(wid, basename.substitute(propty_suffix='Sts')) pdm_lbl.setAlignment(Qt.AlignCenter) lay.addWidget(pdm_cbbx) lay.addWidget(pdm_lbl) wid.sp_wid = pdm_cbbx wid.rb_wid = pdm_lbl return wid
def _setupTopUpModeWidget(self): self._ld_tuperd = QLabel('Period', self) self._sb_tuperd = SiriusSpinbox( self, self._inj_prefix.substitute(propty='TopUpPeriod-SP')) self._sb_tuperd.showStepExponent = False self._lb_tuperd = PyDMLabel( self, self._inj_prefix.substitute(propty='TopUpPeriod-RB')) self._lb_tuperd.showUnits = True self._ld_tumaxpu = QLabel('Max.Nr.Pulses', self) self._sb_tumaxpu = SiriusSpinbox( self, self._inj_prefix.substitute(propty='TopUpMaxNrPulses-SP')) self._sb_tumaxpu.showStepExponent = False self._lb_tumaxpu = PyDMLabel( self, self._inj_prefix.substitute(propty='TopUpMaxNrPulses-RB')) self._lb_tumaxpu.showUnits = True wid = QWidget() lay = QGridLayout(wid) lay.setContentsMargins(0, 6, 0, 0) lay.setAlignment(Qt.AlignTop) lay.addWidget(self._ld_tuperd, 0, 0) lay.addWidget(self._sb_tuperd, 0, 1) lay.addWidget(self._lb_tuperd, 0, 2) lay.addWidget(self._ld_tumaxpu, 1, 0) lay.addWidget(self._sb_tumaxpu, 1, 1) lay.addWidget(self._lb_tumaxpu, 1, 2) lay.setColumnStretch(0, 3) lay.setColumnStretch(1, 2) lay.setColumnStretch(2, 2) wid.setStyleSheet(""" .QLabel{ min-width: 6.5em; max-width: 6.5em; min-height: 1.5em; qproperty-alignment: 'AlignRight | AlignVCenter'; } PyDMLabel{ qproperty-alignment: AlignCenter; }""") return wid
def _setupMeasSettingsWidget(self, mode): if mode == 'Normal': prefix = self.dcct_prefix visible = True elif mode == 'Fast': prefix = self.dcct_prefix.substitute(propty_name=mode) visible = False l_smpcnt = QLabel('Sample Count: ', self) spinbox_SampleCnt = PyDMSpinbox( self, prefix.substitute(propty=prefix.propty_name + 'SampleCnt-SP')) spinbox_SampleCnt.showStepExponent = False label_SampleCnt = PyDMLabel( self, prefix.substitute(propty=prefix.propty_name + 'SampleCnt-RB')) hlay_smpcnt = QHBoxLayout() hlay_smpcnt.addWidget(spinbox_SampleCnt) hlay_smpcnt.addWidget(label_SampleCnt) l_measperiod = QLabel('Period [s]: ', self) spinbox_MeasPeriod = PyDMSpinbox( self, prefix.substitute(propty=prefix.propty_name + 'MeasPeriod-SP')) spinbox_MeasPeriod.showStepExponent = False label_MeasPeriod = PyDMLabel( self, prefix.substitute(propty=prefix.propty_name + 'MeasPeriod-RB')) hlay_measperiod = QHBoxLayout() hlay_measperiod.addWidget(spinbox_MeasPeriod) hlay_measperiod.addWidget(label_MeasPeriod) flay_modesettings = QFormLayout() flay_modesettings.addRow(l_smpcnt, hlay_smpcnt) flay_modesettings.addRow(l_measperiod, hlay_measperiod) flay_modesettings.setContentsMargins(0, 0, 0, 0) modesettings = QWidget(self) modesettings.setLayout(flay_modesettings) modesettings.setVisible(visible) return modesettings
def _create_corr_summwidget(self, corr): """Create and return a corrector detail widget.""" wid = QWidget() wid.setSizePolicy(QSzPlcy.Preferred, QSzPlcy.Maximum) lay = QGridLayout(wid) lay.setContentsMargins(0, 0, 0, 0) lay.setAlignment(Qt.AlignCenter) propty_sp = 'Current-SP' if corr.sec == 'LI' else 'Kick-SP' propty_mon = propty_sp.replace('SP', 'Mon') led = SiriusLedState( self, corr.substitute(prefix=self.prefix, propty='PwrState-Sts')) led.setStyleSheet("max-width:1.29em;") lay.addWidget(led, 1, 1) nickname = corr.get_nickname(sec=corr.sec == 'LI', dev=True) pb = QPushButton(nickname, self) if corr.dis == 'PU': util.connect_window(pb, PUDetailWindow, parent=self, devname=corr) else: util.connect_window(pb, PSDetailWindow, parent=self, psname=corr) pb.setStyleSheet(""" min-width:6em; max-width:6em; min-height:1.29em;""") lay.addWidget(pb, 1, 2) sp_kick = PyDMSpinboxScrollbar( self, corr.substitute(prefix=self.prefix, propty=propty_sp)) sp_kick.setStyleSheet("QDoubleSpinBox{min-width:4em; max-width:4em; }" "QScrollBar{max-width:4em;}") sp_kick.spinbox.precisionFromPV = False sp_kick.spinbox.precision = 1 sp_kick.scrollbar.limitsFromPV = True lay.addWidget(sp_kick, 1, 3, 2, 1) lb_kick = PyDMLabel( self, corr.substitute(prefix=self.prefix, propty=propty_mon)) lb_kick.setStyleSheet(""" min-width:5em; max-width:5em; min-height:1.29em;""") lb_kick.showUnits = True lb_kick.precisionFromPV = False lb_kick.precision = 1 lb_kick.setAlignment(Qt.AlignCenter) lay.addWidget(lb_kick, 1, 4) return wid
def _ctrlmode_layout(self): ctrlmode_layout = QHBoxLayout() self.ctrlmode_led = SiriusLedAlert(parent=self, init_channel=self._ctrlmode_pv) self.ctrlmode_label = PyDMLabel(parent=self, init_channel=self._ctrlmode_pv) ctrlmode_layout.addStretch() ctrlmode_layout.addWidget(self.ctrlmode_led) ctrlmode_layout.addWidget(self.ctrlmode_label) return ctrlmode_layout