Bases: PyQt4.QtGui.QDialog
A panel intended to display a taurus error. Example:
dev = taurus.Device("sys/tg_test/1")
try:
print dev.read_attribute("throw_exception")
except PyTango.DevFailed, df:
msgbox = TaurusMessageBox()
msgbox.show()
You can show the error outside the exception handling code. If you do this, you should keep a record of the exception information as given by sys.exc_info():
dev = taurus.Device("sys/tg_test/1")
exc_info = None
try:
print dev.read_attribute("throw_exception")
except PyTango.DevFailed, df:
exc_info = sys.exc_info()
if exc_info:
msgbox = TaurusMessageBox(*exc_info)
msgbox.show()
Adds the given button with the given to the button box
Parameters: |
|
---|
Returns the current text of this panel
Returns: | the text for this panel |
---|---|
Return type: | str |
Returns the taurus.qt.qtgui.panel.TaurusMessagePanel.
Returns: | the internal panel |
---|---|
Return type: | taurus.qt.qtgui.panel.TaurusMessagePanel |
Sets the detailed text of the dialog
Parameters: | text (str) – the new text |
---|
Sets the exception object. Example usage:
dev = taurus.Device("sys/tg_test/1")
exc_info = None
msgbox = TaurusMessageBox()
try:
print dev.read_attribute("throw_exception")
except PyTango.DevFailed, df:
exc_info = sys.exc_info()
if exc_info:
msgbox.setError(*exc_info)
msgbox.show()
Parameters: |
|
---|
Sets the icon to the dialog
Parameters: | pixmap (PyQt4.Qt.QPixmap) – the icon pixmap |
---|
Sets the text of the dialog
Parameters: | text (str) – the new text |
---|