66 int num_displays = display_list_config.
listLength();
68 if (num_displays == 0)
76 std::map<Display*, Config> display_config_map;
89 for (
int i = 0; i < num_displays; i++)
92 QString display_class =
"(no class name found)";
98 disp->setObjectName(display_name);
100 display_config_map[disp] = display_config;
104 for (std::map<Display*, Config>::iterator it = display_config_map.begin();
105 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;
void fixedFrameChanged() override
Update the fixed frame in all contained displays.
int numChildren() const override
Return the number of child objects (Property and Display).
void load(const Config &config) override
Load subproperties and the list of displays in this group from the given Config node, which must be a map.
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.
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.
A single element of a property tree, with a name, value, description, and possibly children...
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 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.
void load(const Config &config) override
Load the settings for this display from the given Config node, which must be a map.
int listLength() const
Returns the length of the List in this Node, or 0 if this Node does not have type List...
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 update(float wall_dt, float ros_dt) override
Call update() on all child Displays.
bool mapGetString(const QString &key, QString *value_out) const
Convenience function for looking up a named string.
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.
void displayAdded(rviz::Display *display)
Display * createDisplay(const QString &class_id)
Configuration data storage class.
QString fixed_frame_
A convenience variable equal to context_->getFixedFrame().
Property * takeChildAt(int index) override
Take a child out of the child list, but don't destroy it.
Property * childAtUnchecked(int index) const override
Return the child with the given index, without checking whether the index is within bounds...
void setParent(Property *new_parent)
Set parent property, without telling the parent.
void addChild(Property *child, int index=-1) override
Add a child Property or Display.
A Display object which stores other Displays as children.
virtual void reset()
Called to tell the display to clear its state.
void setModel(PropertyTreeModel *model)
Set the model managing this Property and all its child properties, recursively.
QList< Display * > displays_
void displayRemoved(rviz::Display *display)
virtual Display * getDisplayAt(int index) const
Return the index-th Display in this group, or NULL if the index is invalid.
Config mapMakeChild(const QString &key)
Create a child node stored with the given key, and return the child.
Qt::ItemFlags getViewFlags(int column) const override
Return item flags appropriate for the given column (0 or 1) for this Display.
virtual void removeAllDisplays()
Remove and destroy all child Displays, but preserve any non-Display children.
virtual Property * takeChildAt(int index)
Take a child out of the child list, but don't destroy it.
virtual int numChildren() const
Return the number of child objects (Property or otherwise).
void reset() override
Reset this and all child Displays.
bool isEnabled() const
Return true if this Display is enabled, false if not.
virtual Type * make(const QString &class_id, QString *error_return=nullptr)
Instantiate and return a instance of a subclass of Type using makeRaw().
virtual Property * childAtUnchecked(int index) const
Return the child Property with the given index, without checking whether the index is within bounds...
Config listAppendNew()
Ensure the referenced Node is of type List, append a new Empty Node to the end of the 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...
void onEnableChanged() override
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.
Qt::ItemFlags getViewFlags(int column) const override
Return item flags appropriate for the given column (0 or 1) for this DisplayGroup.
void save(Config config) const override
Write this display to the given Config node.
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 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.
void save(Config config) const override
Save subproperties and the list of displays in this group to the given Config node.