Skip to content

Commit

Permalink
Merge pull request #659 from lnls-sirius/update-epu50
Browse files Browse the repository at this point in the history
Add new Polarization PVs to EPU50 window
  • Loading branch information
anacso17 authored Sep 11, 2023
2 parents 161d458 + 8cbf994 commit 48efed1
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions pyqt-apps/siriushla/si_id_control/epu.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

from ..util import connect_newprocess, connect_window
from ..widgets import PyDMLogLabel, SiriusLedAlert, PyDMLed, \
SiriusLedState, PyDMLedMultiChannel, SiriusLabel, SiriusSpinbox
SiriusLedState, PyDMLedMultiChannel, SiriusLabel, SiriusSpinbox, \
SiriusEnumComboBox

from .base import IDCommonControlWindow, IDCommonDialog, \
IDCommonSummaryBase, IDCommonSummaryHeader, IDCommonSummaryWidget
Expand Down Expand Up @@ -108,6 +109,24 @@ def _mainControlsWidget(self):

row += 5

self._ld_pol = QLabel('Polarization', self)
self._cb_pol = SiriusEnumComboBox(
self, self.dev_pref.substitute(propty='Polarization-Sel'))
self._lb_prop = SiriusLabel(
self, self.dev_pref.substitute(propty='Polarization-Sts'))
self._ld_polmov = QLabel('Polarization Motion', self)
self._pb_polstart = PyDMPushButton(
self, label='', icon=qta.icon('fa5s.play'))
self._pb_polstart.setToolTip(
'Start automatic Polarization motion towards previously '
'entered setpoint.')
pvname = self.dev_pref.substitute(propty='ChangePolarization-Cmd')
self._pb_polstart.channel = pvname
self._pb_polstart.pressValue = 1
self._pb_polstart.setObjectName('Start')
self._pb_polstart.setStyleSheet(
'#Start{min-width:30px; max-width:30px; icon-size:25px;}')

self._ld_stopall = QLabel('Stop All Motion', self)
self._pb_stopall = PyDMPushButton(
self, label='', icon=qta.icon('fa5s.times'))
Expand All @@ -123,10 +142,17 @@ def _mainControlsWidget(self):
self._led_ismov = SiriusLedState(
self, self.dev_pref.substitute(propty='Moving-Mon'))

lay.addWidget(self._ld_stopall, row, 0)
lay.addWidget(self._pb_stopall, row, 1)
lay.addWidget(self._ld_ismov, row+1, 0)
lay.addWidget(self._led_ismov, row+1, 1, alignment=Qt.AlignLeft)
lay.addWidget(self._ld_pol, row, 0)
lay.addWidget(self._cb_pol, row, 1)
lay.addWidget(self._lb_prop, row, 2)
lay.addWidget(self._ld_polmov, row+1, 0)
lay.addWidget(self._pb_polstart, row+1, 1)
lay.addItem(
QSpacerItem(1, 15, QSzPlcy.Ignored, QSzPlcy.Fixed), row+2, 0)
lay.addWidget(self._ld_stopall, row+3, 0)
lay.addWidget(self._pb_stopall, row+3, 1)
lay.addWidget(self._ld_ismov, row+4, 0)
lay.addWidget(self._led_ismov, row+4, 1, alignment=Qt.AlignLeft)

gbox.setStyleSheet(
'.QLabel{qproperty-alignment: "AlignRight | AlignVCenter";}')
Expand Down

0 comments on commit 48efed1

Please sign in to comment.