Beispiel #1
0
    def __init__(self, context):
        """
        :param context: plugin context hook to enable adding widgets as a ROS_GUI pane, ''PluginContext''
        """
        super(Web, self).__init__(context)
        self.setObjectName('Web')

        #  This method is used to allow user to type a url into the url bar
        self._web = WebWidget()
        if context.serial_number() > 1:
            self._web.setWindowTitle(self._web.windowTitle() + (' (%d)' % context.serial_number()))
        context.add_widget(self._web)
Beispiel #2
0
class Web(Plugin):
    """
    Plugin to interface with webtools via ros_gui
    """
    def __init__(self, context):
        """
        :param context: plugin context hook to enable adding widgets as a ROS_GUI pane, ''PluginContext''
        """
        super(Web, self).__init__(context)
        self.setObjectName('Web')

        #  This method is used to allow user to type a url into the url bar
        self._web = WebWidget()
        if context.serial_number() > 1:
            self._web.setWindowTitle(self._web.windowTitle() + (' (%d)' % context.serial_number()))
        context.add_widget(self._web)

        #  This method is used to specify a static url
        #  NOTE: this method will hide the url bar
        #self._web = WebWidget('http://ros.org')
        #context.add_widget(self._web)

        #  To change the url at a later time use this function
        # self._web.set_url('http://willowgarage.com')

    def shutdown_plugin(self):
        pass

    def save_settings(self, plugin_settings, instance_settings):
        # NOTE: This line is required to save the url bar autocompleter data between sessions
        self._web.save_settings(instance_settings)

    def restore_settings(self, plugin_settings, instance_settings):
        # NOTE: This line is required to restore the url bar autocompleter data between sessions
        self._web.restore_settings(instance_settings)
Beispiel #3
0
class Web(Plugin):
    """
    Plugin to interface with webtools via ros_gui
    """
    def __init__(self, context):
        """
        :param context: plugin context hook to enable adding widgets as a ROS_GUI pane, ''PluginContext''
        """
        super(Web, self).__init__(context)
        self.setObjectName('Web')

        #  This method is used to allow user to type a url into the url bar
        self._web = WebWidget()
        if context.serial_number() > 1:
            self._web.setWindowTitle(self._web.windowTitle() + (' (%d)' % context.serial_number()))
        context.add_widget(self._web)

        #  This method is used to specify a static url
        #  NOTE: this method will hide the url bar
        #self._web = WebWidget('http://ros.org')
        #context.add_widget(self._web)

        #  To change the url at a later time use this function 
        # self._web.set_url('http://willowgarage.com')

    def shutdown_plugin(self):
        pass

    def save_settings(self, plugin_settings, instance_settings):
        # NOTE: This line is required to save the url bar autocompleter data between sessions 
        self._web.save_settings(instance_settings)

    def restore_settings(self, plugin_settings, instance_settings):
        # NOTE: This line is required to restore the url bar autocompleter data between sessions 
        self._web.restore_settings(instance_settings)
Beispiel #4
0
    def __init__(self, context):
        """
        :param context: plugin context hook to enable adding widgets as a ROS_GUI pane, ''PluginContext''
        """
        super(Web, self).__init__(context)
        self.setObjectName('Web')

        #  This method is used to allow user to type a url into the url bar
        self._web = WebWidget()
        if context.serial_number() > 1:
            self._web.setWindowTitle(self._web.windowTitle() + (' (%d)' % context.serial_number()))
        context.add_widget(self._web)