67 int num_displays = display_list_config.
listLength();
69 if( num_displays == 0 )
77 std::map<Display*,Config> display_config_map;
90 for(
int i = 0; i < num_displays; i++ )
93 QString display_class =
"(no class name found)";
99 disp->setObjectName( display_name );
101 display_config_map[ disp ] = display_config;
105 for( std::map<Display*,Config>::iterator it = display_config_map.begin(); it != display_config_map.end(); ++it )
107 Config display_config = it->second;
110 disp->
load( display_config );
134 for(
int i =
displays_.size() - 1; i >= 0; i-- )
148 for(
int i = 0; i < num_displays; i++ )
165 for(
int i =
displays_.size() - 1; i >= 0; i-- )
185 for(
int i = 0; i < num_displays; i++ )
211 if( 0 <= index && index <
displays_.size() )
226 for(
int i = 0; i < num_children; i++ )
235 for(
int i = 0; i < num_children; i++ )
240 display->
update( wall_dt, ros_dt );
250 for(
int i = 0; i < num_children; i++ )
353 if( index < first_child_count )
357 index -= first_child_count;
virtual void save(Config config) const
Save subproperties and the list of displays in this group to the given Config node.
virtual void fixedFrameChanged()
Update the fixed frame in all contained displays.
DisplayContext * context_
This DisplayContext pointer is the main connection a Display has into the rest of rviz...
PropertyTreeModel * model_
Pointer to the PropertyTreeModel managing this property tree.
int listLength() const
Returns the length of the List in this Node, or 0 if this Node does not have type List...
bool child_indexes_valid_
True if row_number_within_parent_ of all children is valid, false if not.
virtual Display * takeDisplay(Display *child)
Remove a child Display from the the list of Displays, but don't destroy it.
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 load(const Config &config)
Load subproperties and the list of displays in this group from the given Config node, which must be a map.
void childListChanged(Property *this_property)
Emitted after insertions and deletions of child Properties.
virtual void onEnableChanged()
virtual int numDisplays() const
Return the number of child Displays.
virtual Property * childAtUnchecked(int index) const
Return the child with the given index, without checking whether the index is within bounds...
void beginRemove(Property *parent_property, int row_within_parent, int count=1)
A FailedDisplay instance represents a Display class we tried and failed to instantiate.
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.
void displayAdded(rviz::Display *display)
Display * createDisplay(const QString &class_id)
bool isEnabled() const
Return true if this Display is enabled, false if not.
Configuration data storage class.
QString fixed_frame_
A convenience variable equal to context_->getFixedFrame().
virtual int numChildren() const
Return the number of child objects (Property and Display).
void setParent(Property *new_parent)
Set parent property, without telling the parent.
A Display object which stores other Displays as children.
virtual void reset()
Called to tell the display to clear its state.
virtual DisplayGroup * getGroupAt(int index) const
Find the index-th child Display in this group. If the child is itself a DisplayGroup, return the pointer to it. If it is not, return NULL.
void setModel(PropertyTreeModel *model)
Set the model managing this Property and all its child properties, recursively.
QList< Display * > displays_
void displayRemoved(rviz::Display *display)
Config mapMakeChild(const QString &key)
Create a child node stored with the given key, and return the child.
virtual void save(Config config) const
Write this display to the given Config node.
virtual void removeAllDisplays()
Remove and destroy all child Displays, but preserve any non-Display children.
virtual void reset()
Reset this and all child Displays.
virtual void update(float wall_dt, float ros_dt)
Call update() on all child Displays.
virtual Display * getDisplayAt(int index) const
Return the index-th Display in this group, or NULL if the index is invalid.
virtual void onEnableChanged()
virtual Property * takeChildAt(int index)
Take a child out of the child list, but don't destroy it.
virtual void load(const Config &config)
Load the settings for this display from the given Config node, which must be a map.
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.
virtual DisplayFactory * getDisplayFactory() const =0
Return a factory for creating Display subclasses based on a class id string.
void beginInsert(Property *parent_property, int row_within_parent, int count=1)
void initialize(DisplayContext *context)
Main initialization, called after constructor, before load() or setEnabled().
virtual void update(float wall_dt, float ros_dt)
Called periodically by the visualization manager.
virtual Type * make(const QString &class_id, QString *error_return=NULL)
Instantiate and return a instance of a subclass of Type using makeRaw().
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...
virtual void addDisplay(Display *child)
Add a child Display to the end of the list of Displays.
virtual void addDisplayWithoutSignallingModel(Display *child)
Add a child Display to the end of the list of Displays, but without telling the model.
virtual Property * takeChildAt(int index)
Take a child out of the child list, but don't destroy it.
virtual Qt::ItemFlags getViewFlags(int column) const
Return item flags appropriate for the given column (0 or 1) for this Display.
virtual void addChild(Property *child, int index=-1)
Add a child Property or Display.
virtual Property * childAtUnchecked(int index) const
Return the child Property with the given index, without checking whether the index is within bounds...
virtual Qt::ItemFlags getViewFlags(int column) const
Return item flags appropriate for the given column (0 or 1) for this DisplayGroup.