#include <tool_manager.h>
Signals | |
void | configChanged () |
Emitted when anything changes which will change the saved config file contents. More... | |
void | toolAdded (Tool *) |
Emitted by addTool() after the tool is added to the list of tools. More... | |
void | toolChanged (Tool *) |
Emitted by setCurrentTool() after the newly chosen tool is activated. More... | |
void | toolRefreshed (Tool *) |
Emitted by refreshTool() to gedraw the tool's icon in the toolbar'. More... | |
void | toolRemoved (Tool *) |
Public Member Functions | |
Tool * | addTool (const QString &tool_class_lookup_name) |
Create a tool by class lookup name, add it to the list, and return it. More... | |
Tool * | getCurrentTool () |
Return the tool currently in use. More... | |
Tool * | getDefaultTool () |
Get the default tool. More... | |
PluginlibFactory< Tool > * | getFactory () |
PropertyTreeModel * | getPropertyModel () const |
Tool * | getTool (int index) |
Return the tool at a given index in the Tool list. If index is less than 0 or greater than the number of tools, this will fail an assertion. More... | |
QStringList | getToolClasses () |
void | handleChar (QKeyEvent *event, RenderPanel *panel) |
void | initialize () |
Initialization for after the DisplayContext is created. Loads standard RViz tools. More... | |
void | load (const Config &config) |
int | numTools () |
void | refreshTool (Tool *tool) |
Triggers redrawing the tool's icon/text in the toolbar. More... | |
void | removeAll () |
void | removeTool (int index) |
void | save (Config config) const |
void | setCurrentTool (Tool *tool) |
Set the current tool. The current tool is given all mouse and keyboard events which VisualizationManager receives via handleMouseEvent() and handleChar(). More... | |
void | setDefaultTool (Tool *tool) |
Set the default tool. More... | |
ToolManager (DisplayContext *context) | |
virtual | ~ToolManager () |
Private Slots | |
void | closeTool () |
Deactivates the current tool and sets the default tool. More... | |
void | updatePropertyVisibility (Property *property) |
If property has children, it is added to the tool property tree, and if it does not, it is removed. More... | |
Private Member Functions | |
bool | toKey (QString const &str, uint &key_out) |
Private Attributes | |
DisplayContext * | context_ |
Tool * | current_tool_ |
Tool * | default_tool_ |
PluginlibFactory< Tool > * | factory_ |
PropertyTreeModel * | property_tree_model_ |
std::map< int, Tool * > | shortkey_to_tool_map_ |
QList< Tool * > | tools_ |
Definition at line 47 of file tool_manager.h.
rviz::ToolManager::ToolManager | ( | DisplayContext * | context | ) |
Definition at line 51 of file tool_manager.cpp.
|
virtual |
Definition at line 61 of file tool_manager.cpp.
Tool * rviz::ToolManager::addTool | ( | const QString & | tool_class_lookup_name | ) |
Create a tool by class lookup name, add it to the list, and return it.
Definition at line 228 of file tool_manager.cpp.
|
privateslot |
Deactivates the current tool and sets the default tool.
Definition at line 223 of file tool_manager.cpp.
|
signal |
Emitted when anything changes which will change the saved config file contents.
|
inline |
Return the tool currently in use.
Definition at line 69 of file tool_manager.h.
|
inline |
|
inline |
Definition at line 118 of file tool_manager.h.
|
inline |
Definition at line 60 of file tool_manager.h.
Tool * rviz::ToolManager::getTool | ( | int | index | ) |
Return the tool at a given index in the Tool list. If index is less than 0 or greater than the number of tools, this will fail an assertion.
Definition at line 199 of file tool_manager.cpp.
QStringList rviz::ToolManager::getToolClasses | ( | ) |
Definition at line 309 of file tool_manager.cpp.
void rviz::ToolManager::handleChar | ( | QKeyEvent * | event, |
RenderPanel * | panel | ||
) |
Definition at line 130 of file tool_manager.cpp.
void rviz::ToolManager::initialize | ( | ) |
Initialization for after the DisplayContext is created. Loads standard RViz tools.
Definition at line 68 of file tool_manager.cpp.
void rviz::ToolManager::load | ( | const Config & | config | ) |
Definition at line 88 of file tool_manager.cpp.
|
inline |
Definition at line 78 of file tool_manager.h.
void rviz::ToolManager::refreshTool | ( | Tool * | tool | ) |
Triggers redrawing the tool's icon/text in the toolbar.
Definition at line 304 of file tool_manager.cpp.
void rviz::ToolManager::removeAll | ( | ) |
Definition at line 80 of file tool_manager.cpp.
void rviz::ToolManager::removeTool | ( | int | index | ) |
Definition at line 277 of file tool_manager.cpp.
void rviz::ToolManager::save | ( | Config | config | ) | const |
Definition at line 106 of file tool_manager.cpp.
void rviz::ToolManager::setCurrentTool | ( | Tool * | tool | ) |
Set the current tool. The current tool is given all mouse and keyboard events which VisualizationManager receives via handleMouseEvent() and handleChar().
Definition at line 177 of file tool_manager.cpp.
void rviz::ToolManager::setDefaultTool | ( | Tool * | tool | ) |
Set the default tool.
The default tool is selected directly by pressing the Escape key. The default tool is indirectly selected when a Tool returns Finished in the bit field result of Tool::processMouseEvent(). This is how control moves from the InitialPoseTool back to MoveCamera when InitialPoseTool receives a left mouse button release event.
Definition at line 194 of file tool_manager.cpp.
|
private |
Definition at line 114 of file tool_manager.cpp.
|
signal |
Emitted by addTool() after the tool is added to the list of tools.
|
signal |
Emitted by setCurrentTool() after the newly chosen tool is activated.
|
signal |
Emitted by refreshTool() to gedraw the tool's icon in the toolbar'.
|
signal |
|
privateslot |
If property has children, it is added to the tool property tree, and if it does not, it is removed.
Definition at line 207 of file tool_manager.cpp.
|
private |
Definition at line 150 of file tool_manager.h.
|
private |
Definition at line 151 of file tool_manager.h.
|
private |
Definition at line 152 of file tool_manager.h.
|
private |
Definition at line 147 of file tool_manager.h.
|
private |
Definition at line 148 of file tool_manager.h.
|
private |
Definition at line 153 of file tool_manager.h.
|
private |
Definition at line 149 of file tool_manager.h.