35 from python_qt_binding.QtCore
import Qt, Signal, Slot
36 from python_qt_binding.QtWidgets
import QPushButton, QTextEdit, QVBoxLayout, QWidget
43 from diagnostic_msgs.msg
import DiagnosticArray
48 _message_updated = Signal(dict)
49 _queue_updated = Signal()
53 :param name: Name of inspecting diagnostic status
54 :param timeline: Timeline object from which a status is fetched
58 super(InspectorWindow, self).
__init__(parent=parent)
59 self.setWindowTitle(name)
72 self.
timeline.message_updated.connect(
99 """ called when this window is closed
101 Calls close on all snapshots, and emits the closed signal
106 for snap
in self.
snaps:
113 This method just calls _signal_queue_updated in 'best effort' manner.
114 This method should be called by signal with DirectConnection.
126 if status
is not None:
135 This method just calls _signal_message_updated in 'best effort' manner.
136 This method should be called by signal with DirectConnection.
145 rospy.logdebug(
'InspectorWin message_updated')
148 status = status[self.
_name]
152 scroll_value = self.
disp.verticalScrollBar().value()
155 self.
disp.write_status.emit(status)
157 if self.
disp.verticalScrollBar().maximum() < scroll_value:
158 scroll_value = self.
disp.verticalScrollBar().maximum()
159 self.
disp.verticalScrollBar().setValue(scroll_value)
164 self.
snaps.append(snap)