5 from python_qt_binding.QtCore
import Slot, QCoreApplication, QBasicTimer, QSettings
6 from python_qt_binding.QtGui
import QWidget
8 from std_msgs.msg
import Int8
13 def __init__(self, widget_class, name, window, *args):
14 super(OCSPlugin, self).
__init__(
None)
17 self.
_widget = widget_class(self, args[0])
19 self.
_widget = widget_class(self)
33 self._timer.start(33, self)
35 settings = QSettings(
"OCS", self.
_name)
36 if settings.value(
"mainWindowGeometry")
is not None:
37 self.restoreGeometry(settings.value(
"mainWindowGeometry"))
46 if rospy.is_shutdown():
47 QCoreApplication.instance().quit()
60 settings = QSettings(
"OCS", self.
_name)
61 settings.setValue(
"mainWindowGeometry", self.saveGeometry())
64 self._window_control_pub.publish(msg)
68 settings = QSettings(
"OCS", self.
_name)
69 settings.setValue(
"mainWindowGeometry", self.saveGeometry())
72 settings = QSettings(
"OCS", self.
_name)
73 settings.setValue(
"mainWindowGeometry", self.saveGeometry())