52 , render_panel_(
NULL )
97 if( source_view ==
NULL )
103 if( source_view != previous )
127 new_current->
mimic( previous );
133 disconnect( previous, SIGNAL( destroyed( QObject* )),
this, SLOT(
onCurrentDestroyed( QObject* )));
135 new_current->
setName(
"Current View" );
136 connect( new_current, SIGNAL( destroyed( QObject* )),
this, SLOT(
onCurrentDestroyed( QObject* )));
230 new_current->
load( current_config );
236 int num_saved = saved_views_config.
listLength();
237 for(
int i = 0; i < num_saved; i++ )
244 view->
load( view_config );
264 source->
save( config );
267 copy_of_source->
load( config );
269 return copy_of_source;
ViewController * takeAt(int index)
Remove the ViewController at the given index from the list and return it. If the index is not valid...
virtual void load(const Config &config)
Load the value of this property and/or its children from the given Config reference.
RenderPanel * render_panel_
PluginlibFactory< ViewController > * factory_
ViewController * getCurrent() const
Return the current ViewController in use for the main RenderWindow.
void setCurrent(ViewController *new_current, bool mimic_view)
Set new_current as current.
void setCurrentFrom(ViewController *view_to_copy)
Make a copy of view_to_copy and install that as the new current ViewController.
virtual void transitionFrom(ViewController *previous_view)
Called by ViewManager when this ViewController is being made current.
void currentChanged()
Emitted just after the current view controller changes.
Qt::ItemFlags getViewFlags(int column) const
Return item flags appropriate for the given column (0 or 1) for this Property.
Container property for ViewControllers which gets the drag/drop right for the funky way Current-View ...
int listLength() const
Returns the length of the List in this Node, or 0 if this Node does not have type List...
Config listChildAt(int i) const
Return the i'th child in the list, if the referenced Node has type List. Returns an Invalid Config if...
A single element of a property tree, with a name, value, description, and possibly children...
virtual void setName(const QString &name)
Set the name.
virtual void save(Config config) const
Write the value of this property and/or its children into the given Config reference.
void setViewController(ViewController *controller)
Set the ViewController which should control the camera position for this view.
ViewController * copy(ViewController *source)
Return a copy of source, made by saving source to a Config and instantiating and loading a new one fr...
virtual void addChild(Property *child, int index=-1)
Add a child ViewController.
virtual void update(float dt, float ros_dt)
Called at 30Hz by ViewManager::update() while this view is active. Override with code that needs to r...
void addChildToFront(Property *child)
ViewController * getViewAt(int index) const
virtual void mimic(ViewController *source_view)
Configure the settings of this view controller to give, as much as possible, a similar view as that g...
virtual int numChildren() const
Return the number of child objects (Property or otherwise).
bool mapGetString(const QString &key, QString *value_out) const
Convenience function for looking up a named string.
virtual QString getClassId() const
Return the class identifier which was used to create this instance. This version just returns whateve...
Configuration data storage class.
PropertyTreeModel * property_model_
virtual void removeChildren(int start_index=0, int count=-1)
Remove and delete some or all child Properties. Does not change the value of this Property...
Pure-virtual base class for objects which give Display subclasses context in which to work...
ViewController * current_
Property * childAt(int index) const
Return the child Property with the given index, or NULL if the index is out of bounds or if the child...
ViewManager(DisplayContext *context)
void copyCurrentToList()
Make a copy of the current ViewController and add it to the end of the list of saved views...
void onCurrentDestroyed(QObject *obj)
void setRenderPanel(RenderPanel *render_panel)
Set the 3D view widget whose view will be controlled by ViewController instances from by this ViewMan...
Config mapMakeChild(const QString &key)
Create a child node stored with the given key, and return the child.
void add(ViewController *view, int index=-1)
void update(float wall_dt, float ros_dt)
A FailedViewController instance represents a ViewController class we tried and failed to instantiate...
ViewControllerContainer * root_property_
DisplayContext * context_
ViewController * create(const QString &type)
virtual Property * takeChildAt(int index)
Take a child out of the child list, but don't destroy it.
void setDragDropClass(const QString &drag_drop_class)
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.
Config listAppendNew()
Ensure the referenced Node is of type List, append a new Empty Node to the end of the list...
virtual void addChild(Property *child, int index=-1)
Add a child property.
Config mapGetChild(const QString &key) const
If the referenced Node is a Map and it has a child with the given key, return a reference to the chil...
void initialize(DisplayContext *context)
Do all setup that can't be done in the constructor.
void save(Config config) const
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 curren...
Property * getRoot() const
virtual Qt::ItemFlags getViewFlags(int column) const
Return item flags appropriate for the given column (0 or 1) for this Property.
void load(const Config &config)