# `TaurusMessagePanel`

digraph inheritancedbfc580e92 { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "QObject" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QObject(parent: QObject|None = None)"]; "wrapper" -> "QObject" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QPaintDevice" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QPaintDevice()"]; "simplewrapper" -> "QPaintDevice" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QWidget" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QWidget(parent: QWidget|None = None, flags: Qt.WindowFlags|Qt.WindowType = Qt.WindowFlags())"]; "QObject" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QPaintDevice" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusMessagePanel" [URL="#taurus.qt.qtgui.panel.TaurusMessagePanel",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="A panel intended to display a taurus error."]; "QWidget" -> "TaurusMessagePanel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "simplewrapper" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded]; "wrapper" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded]; "simplewrapper" -> "wrapper" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class TaurusMessagePanel(err_type=None, err_value=None, err_traceback=None, parent=None, designMode=False)

  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()

  Import from `taurus.qt.qtgui.panel` as:

      from taurus.qt.qtgui.panel import TaurusMessagePanel

  ErrorHandlers = {<class 'tango._tango.DevFailed'>: <class 'taurus.qt.qtgui.panel.taurusmessagepanel.TangoMessageErrorHandler'>}
  PyTango = <module 'tango' from '/usr/lib/python3/dist-packages/tango/__init__.py'>
  addButton(button, role=3)

    Adds the given button with the given to the button box

    Parameters:

      - button (PyQt5.Qt.QPushButton) – the button to be added

      - role (PyQt5.Qt.QDialogButtonBox.ButtonRole) – button role

  buttonBox()

    Returns the button box from this panel

    Returns:

      the button box from this panel

    Return type:

      PyQt5.Qt.QDialogButtonBox

  checkBox()

    Returns the check box from this panel

    Returns:

      the check box from this panel

    Return type:

      PyQt5.Qt.QCheckBox

  checkBoxState()

    Returns the check box state

    Returns:

      the check box state

    Return type:

      PyQt5.Qt.CheckState

  checkBoxText()

    Returns the check box text

    Returns:

      the check box text

    Return type:

      str

  classmethod findErrorHandler(err_type)

    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

  getDetailedHtml()

    Returns the current detailed HTML of this panel

    Returns:

      the detailed HTML for this panel

    Return type:

      str

  getDetailedText()

    Returns the current detailed text of this panel

    Returns:

      the detailed text for this panel

    Return type:

      str

  getError()

    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, Exception, traceback>

  getOriginHtml()

    Returns the current origin HTML of this panel

    Returns:

      the origin HTML for this panel

    Return type:

      str

  getOriginText()

    Returns the current origin text of this panel

    Returns:

      the origin text for this panel

    Return type:

      str

  getText()

    Returns the current text of this panel

    Returns:

      the text for this panel

    Return type:

      str

  loadUi(filename=None, path=None)
  classmethod registerErrorHandler(err_type, err_handler)
  reportComboBox()
  setCheckBoxState(state)

    Sets the checkbox state.

    Parameters:

      text (PyQt5.Qt.CheckState) – new checkbox state

  setCheckBoxText(text)

    Sets the checkbox text.

    Parameters:

      text (str) – new checkbox text

  setCheckBoxVisible(visible)

    Sets the checkbox visibility.

    Parameters:

      visible (bool) – True makes checkbox visible, False hides it

  setDetailedHtml(html)

    Sets the detailed HTML of the dialog

    Parameters:

      html (str) – the new HTML text

  setDetailedText(text)

    Sets the detailed text of the dialog

    Parameters:

      text (str) – the new text

  setError(err_type=None, err_value=None, err_traceback=None)

    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:

      - err_type – the exception type of the exception being handled (a class object)

      - err_value (object) – exception object

      - err_traceback (TracebackType) – a traceback object which encapsulates the call stack at the point where the exception originally occurred

  setIconPixmap(pixmap)

    Sets the icon to the dialog

    Parameters:

      pixmap (PyQt5.Qt.QPixmap) – the icon pixmap

  setOriginHtml(html)

    Sets the origin HTML of the dialog

    Parameters:

      html (str) – the new HTML text

  setOriginText(text)

    Sets the origin text of the dialog

    Parameters:

      text (str) – the new text

  setText(text)

    Sets the text of this panel

    Parameters:

      text (str) – the new text

  toggledDetails

    int = …, arguments: Sequence = …) -> PYQT_SIGNAL

    types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

    Type:

      pyqtSignal(*types, name

    Type:

      str = …, revision