Bases: PyQt4.QtGui.QWidget
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 = TaurusMessagePanel()
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 = TaurusMessagePanel(*exc_info)
msgbox.show()
Adds the given button with the given to the button box
Parameters: |
|
---|
Returns the button box from this panel
Returns: | the button box from this panel |
---|---|
Return type: | PyQt4.Qt.QDialogButtonBox |
Returns the check box from this panel
Returns: | the check box from this panel |
---|---|
Return type: | PyQt4.Qt.QCheckBox |
Returns the check box state
Returns: | the check box state |
---|---|
Return type: | PyQt4.Qt.CheckState |
Returns the check box text
Returns: | the check box text |
---|---|
Return type: | str |
Finds the proper error handler class for the given error
Parameters: | err_type (class object) – error class |
---|---|
Returns: | a message box error handler |
Return type: | TaurusMessageBoxErrorHandler class object |
Returns the current detailed HTML of this panel
Returns: | the detailed HTML for this panel |
---|---|
Return type: | str |
Returns the current detailed text of this panel
Returns: | the detailed text for this panel |
---|---|
Return type: | str |
Returns the current exception information of this panel
Returns: | the current exception information (same as type as returned by sys.exc_info()) |
---|---|
Return type: | tuple<type, value, traceback> |
Returns the current origin HTML of this panel
Returns: | the origin HTML for this panel |
---|---|
Return type: | str |
Returns the current origin text of this panel
Returns: | the origin text for this panel |
---|---|
Return type: | str |
Returns the current text of this panel
Returns: | the text for this panel |
---|---|
Return type: | str |
Sets the checkbox state.
Parameters: | text (PyQt4.Qt.CheckState) – new checkbox state |
---|
Sets the checkbox visibility.
Parameters: | visible (bool) – True makes checkbox visible, False hides it |
---|
Sets the detailed HTML of the dialog
Parameters: | html (str) – the new HTML text |
---|
Sets the exception object. Example usage:
dev = taurus.Device("sys/tg_test/1")
exc_info = None
msgbox = TaurusMessagePanel()
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 |
---|