38 from python_qt_binding.QtWidgets
import QTextEdit
39 from python_qt_binding.QtCore
import Signal
41 from diagnostic_msgs.msg
import DiagnosticStatus
45 """Display a single static status message. Helps facilitate copy/paste""" 46 write_status = Signal(DiagnosticStatus)
49 super(StatusSnapshot, self).
__init__()
52 if status
is not None:
53 self.write_status.emit(status)
60 self.
_write(
"Full Name", status.name)
61 self.
_write(
"Component", status.name.split(
'/')[-1])
62 self.
_write(
"Hardware ID", status.hardware_id)
64 self.
_write(
"Message", status.message)
65 self.insertPlainText(
'\n')
67 for value
in status.values:
68 self.
_write(value.key, value.value)
72 self.setFontWeight(75)
73 self.insertPlainText(str(k))
75 self.insertPlainText(
': ')
77 self.setFontWeight(50)
78 self.insertPlainText(str(v))
79 self.insertPlainText(
'\n')
def _write_status(self, status)
def __init__(self, status=None, parent=None)