Public Member Functions | Private Attributes | List of all members
rviz::FailedTool Class Reference

A FailedTool instance represents a Tool class we tried and failed to instantiate. More...

#include <failed_tool.h>

Inheritance diagram for rviz::FailedTool:
Inheritance graph
[legend]

Public Member Functions

void activate () override
 
void deactivate () override
 
 FailedTool (const QString &desired_class_id, const QString &error_message)
 
virtual QString getDescription () const
 
void load (const Config &config) override
 Store the given config data for later, so we can return it with save() when someone writes this back to a file. More...
 
int processMouseEvent (ViewportMouseEvent &) override
 
void save (Config config) const override
 Copy saved config data from last call to load() into config. More...
 
- Public Member Functions inherited from rviz::Tool
bool accessAllKeys ()
 
virtual QString getClassId () const
 Return the class identifier which was used to create this instance. This version just returns whatever was set with setClassId(). More...
 
const QCursor & getCursor ()
 Get current cursor of this tool. More...
 
QString getDescription () const
 Set the description of the tool. This is called by ToolManager during tool initialization. More...
 
const QIcon & getIcon ()
 Get the icon of this tool. More...
 
QString getName () const
 
virtual PropertygetPropertyContainer () const
 Return the container for properties of this Tool. More...
 
char getShortcutKey ()
 
void initialize (DisplayContext *context)
 
virtual int processKeyEvent (QKeyEvent *event, RenderPanel *panel)
 
virtual void setClassId (const QString &class_id)
 Set the class identifier used to create this instance. Typically this will be set by the factory object which created it. More...
 
void setCursor (const QCursor &cursor)
 Set the cursor for this tool. More...
 
void setDescription (const QString &description)
 
void setIcon (const QIcon &icon)
 Set the toolbar icon for this tool (will also set its cursor). More...
 
void setName (const QString &name)
 Set the name of the tool. More...
 
void setStatus (const QString &message)
 
 Tool ()
 
virtual void update (float wall_dt, float ros_dt)
 
 ~Tool () override
 

Private Attributes

QString error_message_
 
Config saved_config_
 

Additional Inherited Members

- Public Types inherited from rviz::Tool
enum  { Render = 1, Finished = 2 }
 
- Signals inherited from rviz::Tool
void close ()
 
void nameChanged (const QString &name)
 
- Protected Member Functions inherited from rviz::Tool
virtual void onInitialize ()
 
- Protected Attributes inherited from rviz::Tool
bool access_all_keys_
 
DisplayContextcontext_
 
QCursor cursor_
 
QIcon icon_
 
Ogre::SceneManager * scene_manager_
 
char shortcut_key_
 

Detailed Description

A FailedTool instance represents a Tool class we tried and failed to instantiate.

FailedTool stores the class id which it was supposed to be, and an error message describing the failure.

The load() and save() functions work together to ensure that loaded configuration data is saved out again without modification. This ensures that running rviz with a missing plugin library won't damage config files which refer to it.

Definition at line 46 of file failed_tool.h.

Constructor & Destructor Documentation

◆ FailedTool()

rviz::FailedTool::FailedTool ( const QString &  desired_class_id,
const QString &  error_message 
)

Definition at line 39 of file failed_tool.cpp.

Member Function Documentation

◆ activate()

void rviz::FailedTool::activate ( )
overridevirtual

Implements rviz::Tool.

Definition at line 64 of file failed_tool.cpp.

◆ deactivate()

void rviz::FailedTool::deactivate ( )
inlineoverridevirtual

Implements rviz::Tool.

Definition at line 54 of file failed_tool.h.

◆ getDescription()

QString rviz::FailedTool::getDescription ( ) const
virtual

Definition at line 45 of file failed_tool.cpp.

◆ load()

void rviz::FailedTool::load ( const Config config)
overridevirtual

Store the given config data for later, so we can return it with save() when someone writes this back to a file.

Reimplemented from rviz::Tool.

Definition at line 51 of file failed_tool.cpp.

◆ processMouseEvent()

int rviz::FailedTool::processMouseEvent ( ViewportMouseEvent event)
inlineoverridevirtual

Process a mouse event. This is the central function of all the tools, as it defines how the mouse is used.

Reimplemented from rviz::Tool.

Definition at line 58 of file failed_tool.h.

◆ save()

void rviz::FailedTool::save ( Config  config) const
overridevirtual

Copy saved config data from last call to load() into config.

Reimplemented from rviz::Tool.

Definition at line 56 of file failed_tool.cpp.

Member Data Documentation

◆ error_message_

QString rviz::FailedTool::error_message_
private

Definition at line 72 of file failed_tool.h.

◆ saved_config_

Config rviz::FailedTool::saved_config_
private

Definition at line 71 of file failed_tool.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat May 27 2023 02:06:25