my_module.py
Go to the documentation of this file.
1 import os
2 import roslib
3 roslib.load_manifest('pr2_motor_diagnostic_tool')
4 import rospy
5 
6 from qt_gui.plugin import Plugin
7 from diagnostic_tool_widget import DiagnosticToolWidget
8 
9 class MyPlugin(Plugin):
10 
11  def __init__(self, context):
12  super(MyPlugin, self).__init__(context)
13  # give QObjects reasonable names
14  self.setObjectName('MyPlugin')
15 
16  # create QWidget
17  self._widget = DiagnosticToolWidget()
18  # get path to UI file which is a sibling of this file
19  # in this example the .ui file is in the same folder as this Python file
20  #ui_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'MyPlugin.ui')
21  # extend the widget with all attributes and children from UI file
22  # loadUi(ui_file, self._widget)
23  # give QObjects reasonable names
24  #self._widget.setObjectName('MyPluginUi')
25  # add widget to the user interface
26  context.add_widget(self._widget)
27 
28  def shutdown_plugin(self):
29  # TODO unregister all publishers here
30  self._widget.close_all()
31  def save_settings(self, plugin_settings, instance_settings):
32  # TODO save intrinsic configuration, usually using:
33  # instance_settings.set_value(k, v)
34  pass
35 
36  def restore_settings(self, plugin_settings, instance_settings):
37  # TODO restore intrinsic configuration, usually using:
38  # v = instance_settings.value(k)
39  pass
40 
41  #def trigger_configuration(self):
42  # Comment in to signal that the plugin has a way to configure it
43  # Usually used to open a dialog to offer the user a set of configuration
def shutdown_plugin(self)
Definition: my_module.py:28
def __init__(self, context)
Definition: my_module.py:11
def restore_settings(self, plugin_settings, instance_settings)
Definition: my_module.py:36
def save_settings(self, plugin_settings, instance_settings)
Definition: my_module.py:31


pr2_motor_diagnostic_tool
Author(s): Rahul Udasi
autogenerated on Wed Jan 6 2021 03:39:21