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)
66 self.layout_vertical.addWidget(self.
disp, 1)
72 self.timeline.message_updated.connect(
74 self.timeline.queue_updated.connect(
76 self._message_updated.connect(
78 self._queue_updated.connect(
82 self.timeline_pane.pause_changed.connect(self.timeline.set_paused)
83 self.timeline_pane.position_changed.connect(self.timeline.set_position)
84 self.timeline.pause_changed.connect(self.timeline_pane.set_paused)
85 self.timeline.position_changed.connect(self.timeline_pane.set_position)
90 self.layout_vertical.addWidget(self.
snapshot)
99 """ called when this window is closed 101 Calls close on all snapshots, and emits the closed signal 106 for snap
in self.
snaps:
108 self.closed.emit(self.
_name)
113 This method just calls _signal_queue_updated in 'best effort' manner. 114 This method should be called by signal with DirectConnection. 119 self._queue_updated.emit()
125 status = self.timeline.get_all_status_by_name(self.
_name)
126 self.timeline_pane.set_levels([s.level
for s
in status])
127 self.timeline_pane.set_position(self.timeline.position)
128 self.timeline_pane.redraw.emit()
134 This method just calls _signal_message_updated in 'best effort' manner. 135 This method should be called by signal with DirectConnection. 140 self._message_updated.emit(status)
144 rospy.logdebug(
'InspectorWin message_updated')
146 status = status[self.
_name]
147 scroll_value = self.disp.verticalScrollBar().value()
150 self.disp.write_status.emit(status)
152 if self.disp.verticalScrollBar().maximum() < scroll_value:
153 scroll_value = self.disp.verticalScrollBar().maximum()
154 self.disp.verticalScrollBar().setValue(scroll_value)
159 self.snaps.append(snap)
_queue_updated_processing
def _signal_message_updated(self, status)
def _signal_queue_updated(self)
_message_updated_processing
def message_updated(self, status)
def closeEvent(self, event)
def __init__(self, parent, name, timeline)