panic.gui.widgets module¶
Classes¶
iValidatedWidget¶
- class panic.gui.widgets.iValidatedWidget[source]¶
This class assumes that you have a self.api=PanicAPI() member in your subclass
Typical usage:
self.setAllowedUsers(self.api.get_admins_for_alarm(len(items)==1 and items[0].get_alarm_tag())) if not self.validate(‘onDisable/Enable(%s,%s)’%(checked,[a.get_alarm_tag() for a in items])):
returnThis class requires PanicAdminUsers and UserValidator PyAlarm properties to be declared.
PanicAdminUsers : [root, tester] UserValidator : user_login.TangoLoginDialog
AlarmFormula¶
Functions¶
raw autodoc¶
- class panic.gui.widgets.AlarmFormula(model=None, parent=None, device=None, _locals=None, allow_edit=False)[source]
Bases: PyQt4.QtGui.QSplitter
- updateFormula(formula='', parse=True)[source]
- This method will take the formula text box and will store two variables:
- self.formula: unprocessed formula in a single row
- self.test.formula: formula with all alarms and attributes replaced
- class panic.gui.widgets.AlarmPreview(tag=None, formula=None, parent=None, allow_edit=False)[source]
Bases: PyQt4.QtGui.QDialog
- static showCurrentAlarmPreview(gui, tag=None, formula=None)[source]
It gets current Alarm from GUI and tries to show it up
- panic.gui.widgets.AlarmsSelector(alarms, text='Choose alarms to modify')[source]
- class panic.gui.widgets.AttributesPreview(model='', parent=None, source=None)[source]
Bases: PyQt4.QtGui.QFrame
- class panic.gui.widgets.CleanMainWindow[source]
Bases: PyQt4.QtGui.QMainWindow, panic.gui.widgets.WindowManager
- panic.gui.widgets.addOkCancelButtons(widget, cancel=True)[source]
- panic.gui.widgets.clean_str(s)[source]
- class panic.gui.widgets.clickableQLineEdit(*args)[source]
Bases: PyQt4.QtGui.QLineEdit
This class is a QLineEdit that executes a ‘hook’ method every time is double-clicked
- setClickHook(hook)[source]
the hook must be a function or callable
- class panic.gui.widgets.clickableQTextEdit(*args)[source]
Bases: PyQt4.QtGui.QTextEdit
This class is a QLineEdit that executes a ‘hook’ method every time is double-clicked
- setClickHook(hook)[source]
the hook must be a function or callable
- panic.gui.widgets.formatAlarm(f)[source]
- panic.gui.widgets.getAlarmReport(alarm, parent=None)[source]
- panic.gui.widgets.getAlarmTimestamp(alarm, attr_value=None, use_taurus=True)[source]
Returns alarm activation timestamp (or 0) of an alarm object
- panic.gui.widgets.get_archive_trend(models=None, length=14400, show=False)[source]
- panic.gui.widgets.get_bold_font(points=8)[source]
- panic.gui.widgets.get_snap_api()[source]
- panic.gui.widgets.get_user()[source]
- class panic.gui.widgets.iValidatedWidget[source]
Bases: object
This class assumes that you have a self.api=PanicAPI() member in your subclass
Typical usage:
self.setAllowedUsers(self.api.get_admins_for_alarm(len(items)==1 and items[0].get_alarm_tag())) if not self.validate(‘onDisable/Enable(%s,%s)’%(checked,[a.get_alarm_tag() for a in items])):
returnThis class requires PanicAdminUsers and UserValidator PyAlarm properties to be declared.
PanicAdminUsers : [root, tester] UserValidator : user_login.TangoLoginDialog- KEEP = 60¶
- panic.gui.widgets.line2multiline(line)[source]
- panic.gui.widgets.multiline2line(lines)[source]
- panic.gui.widgets.print_clean(s)[source]
- panic.gui.widgets.setCheckBox(cb, v)[source]
- panic.gui.widgets.trace(msg, head='', level=0, clean=False, use_taurus=False)[source]