ark::gui::PluginInterface

Defined in header “ark/gui/plugin_interface.hh”.


This structure is an abstraction, allowing plugins to register their widgets, subscribers, and other methods.

This was intended to separate I/O of a plugin into a separate layer.

Methods

  • PluginInterface(PluginPtr plugin, RendererInterfacePtr renderer)
    Initializes the plugin interface against the specified parent plugin.

  • QWidget * add_widget()
    Allocates a new widget and returns a reference to it.

  • const std::vector< QWidget * > & widgets()
    Returns the widgets that interacts with the rest of the GUI. Call add_widget() to add a new widget.

  • const std::map< std::string, KeyboardCallback > & keyboard_shortcuts()
    Returns all of the keyboard shortcuts for this plugin. Call add_keyboard_shortcut() to register a new shortcut.

  • const std::vector< TopologyChangeCallback > & topology_callbacks()
    Returns all of the topology callbacks.

  • QWidget * add_statusbar_widget()
    Allocates a new statusbar widget. These are placed on the left-hand side of the statusbar, and give you a chance to report some interesting state that will be visible at all times.

  • const std::vector< QWidget * > & statusbar_widgets()
    Returns all of the widgets that sit on the statusbar.

  • PluginPtr & parent_plugin()
    Returns the parent plugin.

  • RendererInterfacePtr renderer()
    Returns a renderer that you can use to display your 3D graphics.

  • PluginCommsManagerPtr & comms_manager()
    Returns the communication manager. This allows you to add/remove communication mechanisms from your plugin at any time.

  • pipeline::PublisherPtr< Type > add_publisher(const std::string & channel_name)
    Registers a new publisher of the given type. Returns a reference to that publisher, so you can write messages out to the rest of the stack.

  • void add_subscriber(gui::SubscriberConfiguration< Type > config)
    Registers a new subscriber of the given type. Returns a reference to it. These subscribers will be connected when the GUI is done initializing.

  • void add_subscriber(pipeline::SubscriberConfiguration< Type > config)
    Registers a new subscriber of the given type. Returns a reference to it. These subscribers will be connected when the GUI is done initializing.

    This is deprecated in favor of gui::SubscriberConfiguration, but left for backwards-compatibility.

  • void register_topology_change_callback(gui::TopologyChangeCallback callback)
    Registers a topology-changed callback. This is invoked each time a plugin registers new publishers/subscribers.

  • void add_keyboard_shortcut(const std::string & shortcut, KeyboardCallback callback)
    Registers a new keyboard shortcut with the system. The string corresponds to the Qt “QShortcut” string.