Esempio n. 1
0
 def __init__(self, context):
     """
     :type context: qt_gui.PluginContext
     """
     super(RobotMonitorPlugin, self).__init__(context)
     self._robot_monitor = RobotMonitorWidget(context, 'diagnostics_agg')
     if context.serial_number() > 1:
         self._robot_monitor.setWindowTitle(
             self._robot_monitor.windowTitle() +
             (' (%d)' % context.serial_number()))
     context.add_widget(self._robot_monitor)
     self.setObjectName('rqt Robot Monitor')
Esempio n. 2
0
 def _show_monitor(self):
     with QMutexLocker(self._show_mutex):
         try:
             if self._monitor_shown:
                 self.context.remove_widget(self._monitor)
                 self._monitor_close()
                 self._monitor_shown = False
             else:
                 self._monitor = RobotMonitorWidget(self.context,
                                                    '/diagnostics_agg')
                 if self._plugin_settings:
                     self._monitor.restore_settings(self._plugin_settings,
                                                    self._instance_settings)
                 self.context.add_widget(self._monitor)
                 self._monitor_shown = True
         except Exception:
             if self._monitor_shown == False:
                 raise
             #TODO: when closeEvents is available fix this hack
             # (It ensures the button will toggle correctly)
             self._monitor_shown = False
             self._show_monitor()
    def __init__(self, timeline, parent, topic):
        super(RobotMonitorBagView, self).__init__(timeline, parent, topic)

        self._widget = RobotMonitorWidget(parent)
        parent.layout().addWidget(self._widget)