display_group.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, Willow Garage, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 #ifndef DISPLAY_GROUP_H
30 #define DISPLAY_GROUP_H
31 
32 #include "display.h"
33 
34 namespace rviz
35 {
36 
37 class DisplayFactory;
38 
47 class DisplayGroup: public Display
48 {
49 Q_OBJECT
50 public:
51  DisplayGroup();
52  virtual ~DisplayGroup();
53 
54  Display* createDisplay( const QString& class_id );
55 
59  virtual int numChildren() const;
60 
65  virtual Property* childAtUnchecked( int index ) const;
66 
73  virtual Property* takeChildAt( int index );
74 
86  virtual void addChild( Property* child, int index = -1 );
87 
90  virtual Qt::ItemFlags getViewFlags( int column ) const;
91 
94  virtual void load( const Config& config );
95 
98  virtual void save( Config config ) const;
99 
107  virtual void addDisplay( Display* child );
108 
115  virtual Display* takeDisplay( Display* child );
116 
119  virtual void removeAllDisplays();
120 
122  virtual int numDisplays() const;
123 
126  virtual Display* getDisplayAt( int index ) const;
127 
131  virtual DisplayGroup* getGroupAt( int index ) const;
132 
134  virtual void update( float wall_dt, float ros_dt );
135 
137  virtual void reset();
138 
139 public Q_SLOTS:
140  virtual void onEnableChanged();
141 
142 protected:
144  virtual void fixedFrameChanged();
145 
148  virtual void addDisplayWithoutSignallingModel( Display* child );
149 
150 Q_SIGNALS:
151 
152  void displayAdded( rviz::Display* display );
153  void displayRemoved( rviz::Display* display );
154 
155 private:
156  QList<Display*> displays_;
157 };
158 
159 } // end namespace rviz
160 
161 #endif // DISPLAY_GROUP_H
virtual void save(Config config) const
Save subproperties and the list of displays in this group to the given Config node.
virtual void fixedFrameChanged()
Update the fixed frame in all contained displays.
virtual Display * takeDisplay(Display *child)
Remove a child Display from the the list of Displays, but don&#39;t destroy it.
A single element of a property tree, with a name, value, description, and possibly children...
Definition: property.h:100
config
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 numDisplays() const
Return the number of child Displays.
virtual Property * childAtUnchecked(int index) const
Return the child with the given index, without checking whether the index is within bounds...
void displayAdded(rviz::Display *display)
Display * createDisplay(const QString &class_id)
Configuration data storage class.
Definition: config.h:125
virtual int numChildren() const
Return the number of child objects (Property and Display).
A Display object which stores other Displays as children.
Definition: display_group.h:47
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.
QList< Display * > displays_
void displayRemoved(rviz::Display *display)
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 update(float wall_dt, float ros_dt)
Call update() on all child Displays.
virtual Display * getDisplayAt(int index) const
Return the index-th Display in this group, or NULL if the index is invalid.
virtual void onEnableChanged()
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.
virtual Property * takeChildAt(int index)
Take a child out of the child list, but don&#39;t destroy it.
virtual void addChild(Property *child, int index=-1)
Add a child Property or Display.
virtual Qt::ItemFlags getViewFlags(int column) const
Return item flags appropriate for the given column (0 or 1) for this DisplayGroup.


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Wed Aug 28 2019 04:01:50