Go to the documentation of this file.
65 Config display_list_config =
config.mapGetChild(
"Displays");
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--)
145 Config display_list_config =
config.mapMakeChild(
"Displays");
148 for (
int i = 0; i < num_displays; i++)
167 for (
int i =
displays_.size() - 1; i >= 0; i--)
187 for (
int i = 0; i < num_displays; i++)
213 if (0 <= index && index <
displays_.size())
222 return qobject_cast<DisplayGroup*>(
getDisplayAt(index));
228 for (
int i = 0; i < num_children; i++)
237 for (
int i = 0; i < num_children; i++)
242 display->
update(wall_dt, ros_dt);
252 for (
int i = 0; i < num_children; i++)
284 Display* display = qobject_cast<Display*>(child);
355 if (index < first_child_count)
359 index -= first_child_count;
void displayAdded(rviz::Display *display)
void reset() override
Reset this and all child Displays.
bool isEnabled() const
Return true if this Display is enabled, false if not.
virtual void removeAllDisplays()
Remove and destroy all child Displays, but preserve any non-Display children.
void save(Config config) const override
Save subproperties and the list of displays in this group to the given Config node.
void initialize(DisplayContext *context)
Main initialization, called after constructor, before load() or setEnabled().
virtual DisplayGroup * getGroupAt(int index) const
Find the index-th child Display in this group. If the child is itself a DisplayGroup,...
A FailedDisplay instance represents a Display class we tried and failed to instantiate.
QList< Display * > displays_
virtual Display * getDisplayAt(int index) const
Return the index-th Display in this group, or NULL if the index is invalid.
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 save(Config config) const override
Write this display to the given Config node.
int listLength() const
Returns the length of the List in this Node, or 0 if this Node does not have type List.
bool shouldBeSaved() const
Returns true if the property has data worth saving.
virtual int numChildren() const
Return the number of child objects (Property or otherwise).
QString fixed_frame_
A convenience variable equal to context_->getFixedFrame().
void addChild(Property *child, int index=-1) override
Add a child Property or Display.
Display * createDisplay(const QString &class_id)
void update(float wall_dt, float ros_dt) override
Call update() on all child Displays.
A single element of a property tree, with a name, value, description, and possibly children.
Property * childAtUnchecked(int index) const override
Return the child with the given index, without checking whether the index is within bounds.
void displayRemoved(rviz::Display *display)
void load(const Config &config) override
Load subproperties and the list of displays in this group from the given Config node,...
virtual Property * takeChildAt(int index)
Take a child out of the child list, but don't destroy it.
PropertyTreeModel * model_
Pointer to the PropertyTreeModel managing this property tree.
virtual Display * takeDisplay(Display *child)
Remove a child Display from the the list of Displays, but don't destroy it.
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.
virtual Type * make(const QString &class_id, QString *error_return=nullptr)
Instantiate and return a instance of a subclass of Type using makeRaw().
void childListChanged(Property *this_property)
Emitted after insertions and deletions of child Properties.
Qt::ItemFlags getViewFlags(int column) const override
Return item flags appropriate for the given column (0 or 1) for this DisplayGroup.
Config listAppendNew()
Ensure the referenced Node is of type List, append a new Empty Node to the end of the list,...
void beginInsert(Property *parent_property, int row_within_parent, int count=1)
bool child_indexes_valid_
True if row_number_within_parent_ of all children is valid, false if not.
virtual void addDisplay(Display *child)
Add a child Display to the end of the list of Displays.
void beginRemove(Property *parent_property, int row_within_parent, int count=1)
void onEnableChanged() override
virtual void onEnableChanged()
Qt::ItemFlags getViewFlags(int column) const override
Return item flags appropriate for the given column (0 or 1) for this Display.
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...
DisplayContext * context_
This DisplayContext pointer is the main connection a Display has into the rest of rviz....
virtual void addDisplayWithoutSignallingModel(Display *child)
Add a child Display to the end of the list of Displays, but without telling the model.
void setParent(Property *new_parent)
Set parent property, without telling the parent.
bool mapGetString(const QString &key, QString *value_out) const
Convenience function for looking up a named string.
Property * takeChildAt(int index) override
Take a child out of the child list, but don't destroy it.
virtual void reset()
Called to tell the display to clear its state.
virtual Property * childAtUnchecked(int index) const
Return the child Property with the given index, without checking whether the index is within bounds.
void fixedFrameChanged() override
Update the fixed frame in all contained displays.
Configuration data storage class.
A Display object which stores other Displays as children.
virtual void update(float wall_dt, float ros_dt)
Called periodically by the visualization manager.
void setModel(PropertyTreeModel *model)
Set the model managing this Property and all its child properties, recursively.
int numChildren() const override
Return the number of child objects (Property and Display).
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:02