A Display object which stores other Displays as children. More...
#include <display_group.h>
Public Member Functions | |
virtual void | addChild (Property *child, int index=-1) |
Add a child Property or Display. | |
virtual void | addDisplay (Display *child) |
Add a child Display to the end of the list of Displays. | |
virtual Property * | childAtUnchecked (int index) const |
Return the child with the given index, without checking whether the index is within bounds. | |
Display * | createDisplay (const QString &class_id) |
DisplayGroup () | |
virtual Display * | getDisplayAt (int index) const |
Return the index-th Display in this group, or NULL if the index is invalid. | |
virtual QVariant | getViewData (int column, int role) const |
Return data appropriate for the given column (0 or 1) and role for this DisplayGroup. | |
virtual Qt::ItemFlags | getViewFlags (int column) const |
Return item flags appropriate for the given column (0 or 1) for this DisplayGroup. | |
virtual void | loadChildren (const YAML::Node &yaml_node) |
Load subproperties and the list of displays in this group from the given YAML node, which must be a map. | |
virtual int | numChildren () const |
Return the number of child objects (Property and Display). | |
virtual int | numDisplays () const |
Return the number of child Displays. | |
virtual void | removeAllChildren () |
Overridden from Property to remove all Display children as well. | |
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 | saveChildren (YAML::Emitter &emitter) |
Save subproperties and the list of displays in this group to the given YAML emitter, which must be in a map context. | |
virtual Property * | takeChildAt (int index) |
Take a child out of the child list, but don't destroy it. | |
virtual Display * | takeDisplay (Display *child) |
Remove a child Display from the the list of Displays, but don't destroy it. | |
virtual void | update (float wall_dt, float ros_dt) |
Call update() on all child Displays. | |
virtual | ~DisplayGroup () |
Protected Member Functions | |
virtual void | addDisplayWithoutSignallingModel (Display *child) |
Add a child Display to the end of the list of Displays, but without telling the model. | |
virtual void | fixedFrameChanged () |
Update the fixed frame in all contained displays. | |
Private Attributes | |
QList< Display * > | displays_ |
A Display object which stores other Displays as children.
A DisplayGroup can have non-Display child properties as well as Display children, but they are kept separate. Non-display properties come first, and Display children come after. The Property superclass stores the non-Display properties and this class stores the Display objects in a separate list. The separation is enforced in addChild().
Definition at line 47 of file display_group.h.
rviz::DisplayGroup::DisplayGroup | ( | ) |
Definition at line 41 of file display_group.cpp.
rviz::DisplayGroup::~DisplayGroup | ( | ) | [virtual] |
Definition at line 45 of file display_group.cpp.
void rviz::DisplayGroup::addChild | ( | Property * | child, | |
int | index = -1 | |||
) | [virtual] |
Add a child Property or Display.
child | The child to add. | |
index | [optional] The index at which to add the child. If less than 0 or greater than the number of child properties, the child will be added at the end. |
This notifies the model about the addition.
This is overridden from Property to keep non-Display child Properties in Property's list of children and Display children in DisplayGroup's list of child Displays.
Reimplemented from rviz::Property.
Definition at line 252 of file display_group.cpp.
void rviz::DisplayGroup::addDisplay | ( | Display * | child | ) | [virtual] |
Add a child Display to the end of the list of Displays.
This also tells the model that we are adding a child, so it can update widgets.
Definition at line 239 of file display_group.cpp.
void rviz::DisplayGroup::addDisplayWithoutSignallingModel | ( | Display * | child | ) | [protected, virtual] |
Add a child Display to the end of the list of Displays, but without telling the model.
Definition at line 230 of file display_group.cpp.
Property * rviz::DisplayGroup::childAtUnchecked | ( | int | index | ) | const [virtual] |
Return the child with the given index, without checking whether the index is within bounds.
Overridden from Property to include Display children.
Reimplemented from rviz::Property.
Definition at line 318 of file display_group.cpp.
Display * rviz::DisplayGroup::createDisplay | ( | const QString & | class_id | ) |
Definition at line 116 of file display_group.cpp.
void rviz::DisplayGroup::fixedFrameChanged | ( | ) | [protected, virtual] |
Update the fixed frame in all contained displays.
Reimplemented from rviz::Display.
Definition at line 201 of file display_group.cpp.
Display * rviz::DisplayGroup::getDisplayAt | ( | int | index | ) | const [virtual] |
Return the index-th Display in this group, or NULL if the index is invalid.
Definition at line 192 of file display_group.cpp.
QVariant rviz::DisplayGroup::getViewData | ( | int | column, | |
int | role | |||
) | const [virtual] |
Return data appropriate for the given column (0 or 1) and role for this DisplayGroup.
Reimplemented from rviz::Display.
Definition at line 56 of file display_group.cpp.
Qt::ItemFlags rviz::DisplayGroup::getViewFlags | ( | int | column | ) | const [virtual] |
Return item flags appropriate for the given column (0 or 1) for this DisplayGroup.
Reimplemented from rviz::Display.
Definition at line 69 of file display_group.cpp.
void rviz::DisplayGroup::loadChildren | ( | const YAML::Node & | yaml_node | ) | [virtual] |
Load subproperties and the list of displays in this group from the given YAML node, which must be a map.
Reimplemented from rviz::Display.
Definition at line 74 of file display_group.cpp.
int rviz::DisplayGroup::numChildren | ( | ) | const [virtual] |
Return the number of child objects (Property and Display).
Overridden from Property to include the number of child Displays.
Reimplemented from rviz::Property.
Definition at line 313 of file display_group.cpp.
int rviz::DisplayGroup::numDisplays | ( | ) | const [virtual] |
Return the number of child Displays.
Definition at line 308 of file display_group.cpp.
void rviz::DisplayGroup::removeAllChildren | ( | ) | [virtual] |
Overridden from Property to remove all Display children as well.
Reimplemented from rviz::Property.
Definition at line 50 of file display_group.cpp.
void rviz::DisplayGroup::removeAllDisplays | ( | ) | [virtual] |
Remove and destroy all child Displays, but preserve any non-Display children.
Definition at line 144 of file display_group.cpp.
void rviz::DisplayGroup::reset | ( | ) | [virtual] |
Reset this and all child Displays.
Reimplemented from rviz::Display.
Definition at line 219 of file display_group.cpp.
void rviz::DisplayGroup::saveChildren | ( | YAML::Emitter & | emitter | ) | [virtual] |
Save subproperties and the list of displays in this group to the given YAML emitter, which must be in a map context.
Reimplemented from rviz::Display.
Definition at line 128 of file display_group.cpp.
Property * rviz::DisplayGroup::takeChildAt | ( | int | index | ) | [virtual] |
Take a child out of the child list, but don't destroy it.
This notifies the model about the removal.
This is overridden from Property to include Display children.
Reimplemented from rviz::Property.
Definition at line 285 of file display_group.cpp.
Remove a child Display from the the list of Displays, but don't destroy it.
This also tells the model that we are removing a child, so it can update widgets.
Definition at line 165 of file display_group.cpp.
void rviz::DisplayGroup::update | ( | float | wall_dt, | |
float | ros_dt | |||
) | [virtual] |
Call update() on all child Displays.
Reimplemented from rviz::Display.
Definition at line 210 of file display_group.cpp.
QList<Display*> rviz::DisplayGroup::displays_ [private] |
Definition at line 149 of file display_group.h.