17 import roslib; roslib.load_manifest(
'airbus_cobot_gui')
33 Interface for Python widgets which use the ROS client library.
34 User-defined plugins may either subclass `airbus_cobot_gui::Widget` or according to duck typing implement only the needed methods.
35 A widget must not call rospy.init_node() as this is performed once by the framework.
36 The name of the ROS node consists of the prefix "airbus_cobot_gui_py_node_" and the process id.
40 """! The constructor."""
41 self.
_label = str(self.__class__.__name__)
44 self.
_user = User(userid=
'Unknown', privilege=Privilege.NONE)
48 def install(self, widget_descriptors = {}):
49 """! Install widget configuration.
50 @param widget_descriptors: widget descriptors.
51 @type widget_descriptors: dict{strings}.
53 self.
_label = widget_descriptors[
'label']
55 if widget_descriptors[
'style-sheet']
is not None:
56 self._widget.setStyleSheet(widget_descriptors[
'style-sheet'])
59 """! Sets content user interface.
60 @param window_ui: user interface object.
61 @type window_ui: QObject.
66 """! Get widget user interface.
67 @return widget: widget ui.
68 @type widget: QWidget.