Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
Public Member Functions | Protected Attributes | List of all members
nav2_rviz_plugins::RouteTool Class Reference

#include <nav2_rviz_plugins/include/nav2_rviz_plugins/route_tool.hpp>

Inheritance diagram for nav2_rviz_plugins::RouteTool:
Inheritance graph
[legend]
Collaboration diagram for nav2_rviz_plugins::RouteTool:
Collaboration graph
[legend]

Public Member Functions

 RouteTool (QWidget *parent=nullptr)
 
void onInitialize () override
 
virtual void save (rviz_common::Config config) const
 
virtual void load (const rviz_common::Config &config)
 

Protected Attributes

std::unique_ptr< Ui::route_tool > ui_
 

Detailed Description

Here we declare our new subclass of rviz::Panel. Every panel which can be added via the Panels/Add_New_Panel menu is a subclass of rviz::Panel.

Definition at line 43 of file route_tool.hpp.

Constructor & Destructor Documentation

◆ RouteTool()

nav2_rviz_plugins::RouteTool::RouteTool ( QWidget *  parent = nullptr)
explicit

This class uses Qt slots and is a subclass of QObject, so it needs the Q_OBJECT macro. QWidget subclass constructors usually take a parent widget parameter (which usually defaults to 0). At the same time, pluginlib::ClassLoader creates instances by calling the default constructor (with no arguments). Taking the parameter and giving a default of 0 let's the default constructor work and also let's someone using the class for something else to pass in a parent widget as they normally would with Qt.

Definition at line 25 of file route_tool.cpp.

References ui_.

Member Function Documentation

◆ save()

void nav2_rviz_plugins::RouteTool::save ( rviz_common::Config  config) const
virtual

Now we declare overrides of rviz_common::Panel functions for saving and loading data from the config file. Here the data is the topic name.

Definition at line 256 of file route_tool.cpp.

Member Data Documentation

◆ ui_

std::unique_ptr<Ui::route_tool> nav2_rviz_plugins::RouteTool::ui_
protected

Finally, we close up with protected member variables

Definition at line 98 of file route_tool.hpp.

Referenced by RouteTool().


The documentation for this class was generated from the following files: