Changeset 1391
- Timestamp:
- Jul 4, 2013 6:15:05 PM (12 years ago)
- Location:
- moxy/trunk/src/moxy/qtlib
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified moxy/trunk/src/moxy/qtlib/bcdaqwidgets.py ¶
r1390 r1391 93 93 self.labelSignal = BcdaQSignalDef() 94 94 self.clut = dict(CLUT) 95 96 self.useAlarmState = False 97 self.severity_color_list = ['green', 'orange', 'red'] 95 98 96 99 # for use with describing the styleSheet … … 162 165 # caller wants to be notified of this camonitor event 163 166 self.ca_callback(pvname=pvname, char_value=char_value, **kw) 164 # TODO: could update the bgColor on alarm state165 # PyEpics has {upper,lower}_{alarm,warning,ctrl,disp}_limit166 # these values are None, unless given an explicit value by the PV167 167 168 168 def SetText(self, *args, **kw): … … 170 170 # pull the new text from the cache (set by onPVChange() method) 171 171 self.setText(self.text_cache) 172 173 # if desired, color the text based on the alarm severity 174 if self.useAlarmState and self.pv is not None: 175 self.pv.get_ctrlvars() 176 if self.pv.severity is not None: 177 color = self.severity_color_list[self.pv.severity] 178 self.UpdateStyleSheet({'color': color}) 172 179 173 180 def UpdateStyleSheet(self, changes_dict):
Note: See TracChangeset
for help on using the changeset viewer.