Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
rviz::ViewManager Class Reference

#include <view_manager.h>

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

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)
 
ViewControllercopy (ViewController *source)
 Return a copy of source, made by saving source to a Config and instantiating and loading a new one from that. More...
 
ViewControllercreate (const QString &type)
 
ViewControllergetCurrent () const
 Return the current ViewController in use for the main RenderWindow. More...
 
PluginlibFactory< ViewController > * getFactory () const
 
int getNumViews () const
 
PropertyTreeModelgetPropertyModel ()
 
RenderPanelgetRenderPanel () const
 Return the 3D view widget managed by this ViewManager. More...
 
ViewControllergetViewAt (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...
 
ViewControllertake (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...
 
ViewControllertakeAt (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

DisplayContextcontext_
 
ViewControllercurrent_
 
PluginlibFactory< ViewController > * factory_
 
PropertyTreeModelproperty_model_
 
RenderPanelrender_panel_
 
ViewControllerContainerroot_property_
 

Detailed Description

Definition at line 53 of file view_manager.h.

Constructor & Destructor Documentation

◆ ViewManager()

rviz::ViewManager::ViewManager ( DisplayContext context)

Definition at line 45 of file view_manager.cpp.

◆ ~ViewManager()

rviz::ViewManager::~ViewManager ( )
override

Definition at line 58 of file view_manager.cpp.

Member Function Documentation

◆ add()

void rviz::ViewManager::add ( ViewController view,
int  index = -1 
)

Definition at line 190 of file view_manager.cpp.

◆ configChanged

void rviz::ViewManager::configChanged ( )
signal

◆ copy()

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.

◆ copyCurrentToList

void rviz::ViewManager::copyCurrentToList ( )
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.

◆ create()

ViewController * rviz::ViewManager::create ( const QString &  type)

Definition at line 77 of file view_manager.cpp.

◆ currentChanged

void rviz::ViewManager::currentChanged ( )
signal

Emitted just after the current view controller changes.

◆ getCurrent()

ViewController * rviz::ViewManager::getCurrent ( ) const

Return the current ViewController in use for the main RenderWindow.

Definition at line 90 of file view_manager.cpp.

◆ getFactory()

PluginlibFactory<ViewController>* rviz::ViewManager::getFactory ( ) const
inline

Definition at line 101 of file view_manager.h.

◆ getNumViews()

int rviz::ViewManager::getNumViews ( ) const

Definition at line 177 of file view_manager.cpp.

◆ getPropertyModel()

PropertyTreeModel* rviz::ViewManager::getPropertyModel ( )
inline

Definition at line 86 of file view_manager.h.

◆ getRenderPanel()

RenderPanel* rviz::ViewManager::getRenderPanel ( ) const
inline

Return the 3D view widget managed by this ViewManager.

Definition at line 111 of file view_manager.h.

◆ getViewAt()

ViewController * rviz::ViewManager::getViewAt ( int  index) const

Definition at line 168 of file view_manager.cpp.

◆ initialize()

void rviz::ViewManager::initialize ( )

Definition at line 64 of file view_manager.cpp.

◆ load()

void rviz::ViewManager::load ( const Config config)

Definition at line 224 of file view_manager.cpp.

◆ onCurrentDestroyed

void rviz::ViewManager::onCurrentDestroyed ( QObject *  obj)
privateslot

Definition at line 112 of file view_manager.cpp.

◆ save()

void rviz::ViewManager::save ( Config  config) const

Definition at line 251 of file view_manager.cpp.

◆ setCurrent()

void rviz::ViewManager::setCurrent ( ViewController new_current,
bool  mimic_view 
)
private

Set new_current as current.

Parameters
mimic_viewIf 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.

◆ setCurrentFrom()

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.

◆ setCurrentViewControllerType

void rviz::ViewManager::setCurrentViewControllerType ( const QString &  new_class_id)
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.

◆ setRenderPanel()

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.

◆ take()

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.

◆ takeAt()

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.

◆ update()

void rviz::ViewManager::update ( float  wall_dt,
float  ros_dt 
)

Definition at line 69 of file view_manager.cpp.

Member Data Documentation

◆ context_

DisplayContext* rviz::ViewManager::context_
private

Definition at line 145 of file view_manager.h.

◆ current_

ViewController* rviz::ViewManager::current_
private

Definition at line 149 of file view_manager.h.

◆ factory_

PluginlibFactory<ViewController>* rviz::ViewManager::factory_
private

Definition at line 148 of file view_manager.h.

◆ property_model_

PropertyTreeModel* rviz::ViewManager::property_model_
private

Definition at line 147 of file view_manager.h.

◆ render_panel_

RenderPanel* rviz::ViewManager::render_panel_
private

Definition at line 150 of file view_manager.h.

◆ root_property_

ViewControllerContainer* rviz::ViewManager::root_property_
private

Definition at line 146 of file view_manager.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:11