Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Attributes
rviz::DisplayGroup Class Reference

A Display object which stores other Displays as children. More...

#include <display_group.h>

Inheritance diagram for rviz::DisplayGroup:
Inheritance graph
[legend]

List of all members.

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 PropertychildAtUnchecked (int index) const
 Return the child with the given index, without checking whether the index is within bounds.
DisplaycreateDisplay (const QString &class_id)
 DisplayGroup ()
virtual DisplaygetDisplayAt (int index) const
 Return the index-th Display in this group, or NULL if the index is invalid.
virtual DisplayGroupgetGroupAt (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 PropertytakeChildAt (int index)
 Take a child out of the child list, but don't destroy it.
virtual DisplaytakeDisplay (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_

Detailed Description

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.


Constructor & Destructor Documentation

Definition at line 44 of file display_group.cpp.

Definition at line 48 of file display_group.cpp.


Member Function Documentation

void rviz::DisplayGroup::addChild ( Property child,
int  index = -1 
) [virtual]

Add a child Property or Display.

Parameters:
childThe 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 274 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.

Note:
This does not remove child from its parent. That must be done first to avoid problems.

Definition at line 260 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 250 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 344 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::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 217 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 203 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 212 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 339 of file display_group.cpp.

int rviz::DisplayGroup::numDisplays ( ) const [virtual]

Return the number of child Displays.

Definition at line 334 of file display_group.cpp.

void rviz::DisplayGroup::onEnableChanged ( ) [virtual, slot]

Reimplemented from rviz::Display.

Definition at line 128 of file display_group.cpp.

Remove and destroy all child Displays, but preserve any non-Display children.

Definition at line 151 of file display_group.cpp.

void rviz::DisplayGroup::reset ( ) [virtual]

Reset this and all child Displays.

Reimplemented from rviz::Display.

Definition at line 239 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 137 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.

Returns:
Returns the child property at the given index, or NULL if the index is out of bounds.

This notifies the model about the removal.

This is overridden from Property to include Display children.

Reimplemented from rviz::Property.

Definition at line 309 of file display_group.cpp.

Remove a child Display from the the list of Displays, but don't destroy it.

Returns:
Returns child if it is found, or NULL if child is not found.

This also tells the model that we are removing a child, so it can update widgets.

Definition at line 174 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 226 of file display_group.cpp.


Member Data Documentation

Definition at line 156 of file display_group.h.


The documentation for this class was generated from the following files:


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Mon Oct 6 2014 07:26:36