A Display object which stores other Displays as children. More...
#include <display_group.h>
Public Slots | |
virtual void | onEnableChanged () |
Signals | |
void | displayAdded (rviz::Display *display) |
void | displayRemoved (rviz::Display *display) |
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 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. | |
virtual Qt::ItemFlags | getViewFlags (int column) const |
Return item flags appropriate for the given column (0 or 1) for this DisplayGroup. | |
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. | |
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 | removeAllDisplays () |
Remove and destroy all child Displays, but preserve any non-Display children. | |
virtual void | reset () |
Reset this and all child Displays. | |
virtual void | save (Config config) const |
Save subproperties and the list of displays in this group to the given Config node. | |
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.
Definition at line 44 of file display_group.cpp.
rviz::DisplayGroup::~DisplayGroup | ( | ) | [virtual] |
Definition at line 48 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 280 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 266 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 256 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 350 of file display_group.cpp.
Display * rviz::DisplayGroup::createDisplay | ( | const QString & | class_id | ) |
Definition at line 119 of file display_group.cpp.
void rviz::DisplayGroup::displayAdded | ( | rviz::Display * | display | ) | [signal] |
void rviz::DisplayGroup::displayRemoved | ( | rviz::Display * | display | ) | [signal] |
void rviz::DisplayGroup::fixedFrameChanged | ( | ) | [protected, virtual] |
Update the fixed frame in all contained displays.
Reimplemented from rviz::Display.
Definition at line 223 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 209 of file display_group.cpp.
DisplayGroup * rviz::DisplayGroup::getGroupAt | ( | int | index | ) | const [virtual] |
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.
Definition at line 218 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 53 of file display_group.cpp.
void rviz::DisplayGroup::load | ( | const Config & | config | ) | [virtual] |
Load subproperties and the list of displays in this group from the given Config node, which must be a map.
Reimplemented from rviz::Display.
Definition at line 58 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 345 of file display_group.cpp.
int rviz::DisplayGroup::numDisplays | ( | ) | const [virtual] |
Return the number of child Displays.
Definition at line 340 of file display_group.cpp.
void rviz::DisplayGroup::onEnableChanged | ( | ) | [virtual, slot] |
Reimplemented from rviz::Display.
Definition at line 131 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 154 of file display_group.cpp.
void rviz::DisplayGroup::reset | ( | ) | [virtual] |
Reset this and all child Displays.
Reimplemented from rviz::Display.
Definition at line 245 of file display_group.cpp.
void rviz::DisplayGroup::save | ( | Config | config | ) | const [virtual] |
Save subproperties and the list of displays in this group to the given Config node.
Reimplemented from rviz::Display.
Definition at line 140 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 315 of file display_group.cpp.
Display * rviz::DisplayGroup::takeDisplay | ( | Display * | child | ) | [virtual] |
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 181 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 232 of file display_group.cpp.
QList<Display*> rviz::DisplayGroup::displays_ [private] |
Definition at line 156 of file display_group.h.