#include <view_manager.h>
Public Slots | |
void | copyCurrentToList () |
Make a copy of the current ViewController and add it to the end of the list of saved views. More... | |
void | setCurrentViewControllerType (const QString &new_class_id) |
Create a new view controller of the given type and set it up to mimic and replace the previous current view. More... | |
Signals | |
void | configChanged () |
void | currentChanged () |
Emitted just after the current view controller changes. More... | |
Public Member Functions | |
void | add (ViewController *view, int index=-1) |
ViewController * | copy (ViewController *source) |
Return a copy of source, made by saving source to a Config and instantiating and loading a new one from that. More... | |
ViewController * | create (const QString &type) |
ViewController * | getCurrent () const |
Return the current ViewController in use for the main RenderWindow. More... | |
PluginlibFactory< ViewController > * | getFactory () const |
int | getNumViews () const |
PropertyTreeModel * | getPropertyModel () |
RenderPanel * | getRenderPanel () const |
Return the 3D view widget managed by this ViewManager. More... | |
ViewController * | getViewAt (int index) const |
void | initialize () |
void | load (const Config &config) |
void | save (Config config) const |
void | setCurrentFrom (ViewController *view_to_copy) |
Make a copy of view_to_copy and install that as the new current ViewController. More... | |
void | setRenderPanel (RenderPanel *render_panel) |
Set the 3D view widget whose view will be controlled by ViewController instances from by this ViewManager. More... | |
ViewController * | take (ViewController *view) |
Remove the given ViewController from the list and return it. If it is not in the list, NULL is returned and nothing changes. More... | |
ViewController * | takeAt (int index) |
Remove the ViewController at the given index from the list and return it. If the index is not valid, NULL is returned and nothing changes. More... | |
void | update (float wall_dt, float ros_dt) |
ViewManager (DisplayContext *context) | |
~ViewManager () override | |
Private Slots | |
void | onCurrentDestroyed (QObject *obj) |
Private Member Functions | |
void | setCurrent (ViewController *new_current, bool mimic_view) |
Set new_current as current. More... | |
Private Attributes | |
DisplayContext * | context_ |
ViewController * | current_ |
PluginlibFactory< ViewController > * | factory_ |
PropertyTreeModel * | property_model_ |
RenderPanel * | render_panel_ |
ViewControllerContainer * | root_property_ |
Definition at line 53 of file view_manager.h.
rviz::ViewManager::ViewManager | ( | DisplayContext * | context | ) |
Definition at line 45 of file view_manager.cpp.
|
override |
Definition at line 58 of file view_manager.cpp.
void rviz::ViewManager::add | ( | ViewController * | view, |
int | index = -1 |
||
) |
Definition at line 190 of file view_manager.cpp.
|
signal |
ViewController * rviz::ViewManager::copy | ( | ViewController * | source | ) |
Return a copy of source, made by saving source to a Config and instantiating and loading a new one from that.
Definition at line 262 of file view_manager.cpp.
|
slot |
Make a copy of the current ViewController and add it to the end of the list of saved views.
Definition at line 157 of file view_manager.cpp.
ViewController * rviz::ViewManager::create | ( | const QString & | type | ) |
Definition at line 77 of file view_manager.cpp.
|
signal |
Emitted just after the current view controller changes.
ViewController * rviz::ViewManager::getCurrent | ( | ) | const |
Return the current ViewController in use for the main RenderWindow.
Definition at line 90 of file view_manager.cpp.
|
inline |
Definition at line 101 of file view_manager.h.
int rviz::ViewManager::getNumViews | ( | ) | const |
Definition at line 177 of file view_manager.cpp.
|
inline |
Definition at line 86 of file view_manager.h.
|
inline |
Return the 3D view widget managed by this ViewManager.
Definition at line 111 of file view_manager.h.
ViewController * rviz::ViewManager::getViewAt | ( | int | index | ) | const |
Definition at line 168 of file view_manager.cpp.
void rviz::ViewManager::initialize | ( | ) |
Definition at line 64 of file view_manager.cpp.
void rviz::ViewManager::load | ( | const Config & | config | ) |
Definition at line 224 of file view_manager.cpp.
|
privateslot |
Definition at line 112 of file view_manager.cpp.
void rviz::ViewManager::save | ( | Config | config | ) | const |
Definition at line 251 of file view_manager.cpp.
|
private |
Set new_current as current.
mimic_view | If true, call new_current->mimic( previous ), if false call new_current->transitionFrom( previous ). |
This calls mimic() or transitionFrom() on the new controller, deletes the previous controller (if one existed), and tells the RenderPanel about the new controller.
Definition at line 120 of file view_manager.cpp.
void rviz::ViewManager::setCurrentFrom | ( | ViewController * | view_to_copy | ) |
Make a copy of view_to_copy and install that as the new current ViewController.
Definition at line 95 of file view_manager.cpp.
|
slot |
Create a new view controller of the given type and set it up to mimic and replace the previous current view.
Definition at line 152 of file view_manager.cpp.
void rviz::ViewManager::setRenderPanel | ( | RenderPanel * | render_panel | ) |
Set the 3D view widget whose view will be controlled by ViewController instances from by this ViewManager.
Definition at line 273 of file view_manager.cpp.
ViewController * rviz::ViewManager::take | ( | ViewController * | view | ) |
Remove the given ViewController from the list and return it. If it is not in the list, NULL is returned and nothing changes.
Definition at line 203 of file view_manager.cpp.
ViewController * rviz::ViewManager::takeAt | ( | int | index | ) |
Remove the ViewController at the given index from the list and return it. If the index is not valid, NULL is returned and nothing changes.
Definition at line 215 of file view_manager.cpp.
void rviz::ViewManager::update | ( | float | wall_dt, |
float | ros_dt | ||
) |
Definition at line 69 of file view_manager.cpp.
|
private |
Definition at line 145 of file view_manager.h.
|
private |
Definition at line 149 of file view_manager.h.
|
private |
Definition at line 148 of file view_manager.h.
|
private |
Definition at line 147 of file view_manager.h.
|
private |
Definition at line 150 of file view_manager.h.
|
private |
Definition at line 146 of file view_manager.h.