Skip to content

Commit

Permalink
Add visual indicator for beam status to the gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli Stavitski committed Oct 26, 2017
1 parent 5dad5d7 commit 93a862c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 8 deletions.
4 changes: 4 additions & 0 deletions isstools/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1836,15 +1836,19 @@ def labelAcceleratorStatusUpdate(self,**kwargs):
if kwargs['value'] == 0:
self.labelAcceleratorStatus.setText('Beam available')
self.labelAcceleratorStatus.setStyleSheet('color: rgb(19,139,67)')
self.labelAcceleratorStatusIndicator.setStyleSheet('background-color: rgb(95,249,95)')
elif kwargs['value'] == 1:
self.labelAcceleratorStatus.setText('Accelerator setup')
self.labelAcceleratorStatus.setStyleSheet('color: rgb(209,116,42)')
self.labelAcceleratorStatusIndicator.setStyleSheet('background-color: rgb(209,116,42)')
elif kwargs['value'] == 2:
self.labelAcceleratorStatus.setText('Accelerator studies')
self.labelAcceleratorStatus.setStyleSheet('color: rgb(209,116,42)')
self.labelAcceleratorStatusIndicator.setStyleSheet('background-color: rgb(209,116,42)')
elif kwargs['value'] == 3:
self.labelAcceleratorStatus.setText('Beam has dumped')
self.labelAcceleratorStatus.setStyleSheet('color: rgb(237,30,30)')
self.labelAcceleratorStatusIndicator.setStyleSheet('background-color: rgb(237,30,30)')

def run_prep_traj(self):
self.RE(self.prep_traj_plan())
Expand Down
49 changes: 41 additions & 8 deletions isstools/ui/XLive.ui
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</rect>
</property>
<property name="currentIndex">
<number>4</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab_11">
<attribute name="title">
Expand Down Expand Up @@ -2414,7 +2414,7 @@ sampling time</string>
</rect>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab_8">
<attribute name="title">
Expand Down Expand Up @@ -5484,7 +5484,7 @@ b</string>
<widget class="QGroupBox" name="groupBox_11">
<property name="geometry">
<rect>
<x>780</x>
<x>940</x>
<y>10</y>
<width>371</width>
<height>131</height>
Expand Down Expand Up @@ -5631,7 +5631,7 @@ b</string>
<rect>
<x>20</x>
<y>10</y>
<width>361</width>
<width>341</width>
<height>20</height>
</rect>
</property>
Expand Down Expand Up @@ -5691,9 +5691,9 @@ b</string>
<widget class="QLabel" name="labelBeamCurrent">
<property name="geometry">
<rect>
<x>390</x>
<x>430</x>
<y>10</y>
<width>341</width>
<width>241</width>
<height>20</height>
</rect>
</property>
Expand All @@ -5711,7 +5711,7 @@ b</string>
<widget class="QLabel" name="labelAcceleratorStatus">
<property name="geometry">
<rect>
<x>390</x>
<x>430</x>
<y>30</y>
<width>291</width>
<height>21</height>
Expand All @@ -5734,14 +5734,47 @@ b</string>
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="labelAcceleratorStatusIndicator">
<property name="geometry">
<rect>
<x>379</x>
<y>10</y>
<width>41</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<widget class="QLabel" name="labelCurrentEnergy">
<property name="geometry">
<rect>
<x>690</x>
<y>10</y>
<width>241</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Current energy</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>2220</width>
<height>20</height>
<height>19</height>
</rect>
</property>
</widget>
Expand Down

0 comments on commit 93a862c

Please sign in to comment.