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

#include <display.h>

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

List of all members.

Public Slots

virtual void onEnableChanged ()
void queueRender ()
 Convenience function which calls context_->queueRender().
void setEnabled (bool enabled)
 Enable or disable this Display.
virtual void setIcon (const QIcon &icon)
 Set the Display's icon.

Signals

void timeSignal (rviz::Display *display, ros::Time time)

Public Member Functions

virtual void deleteStatus (const QString &name)
 Delete the status entry with the given name. This is thread-safe.
void deleteStatusStd (const std::string &name)
 Delete the status entry with the given std::string name. This is thread-safe.
 Display ()
void emitTimeSignal (ros::Time time)
 Emit a time signal that other Displays can synchronize to.
QWidget * getAssociatedWidget () const
 Return the current associated widget, or NULL if there is none.
PanelDockWidgetgetAssociatedWidgetPanel ()
 Return the panel containing the associated widget, or NULL if there is none.
virtual QString getClassId () const
 Return the class identifier which was used to create this instance. This version just returns whatever was set with setClassId().
Ogre::SceneNode * getSceneNode () const
 Return the Ogre::SceneNode holding all 3D scene elements shown by this Display.
virtual QVariant getViewData (int column, int role) const
 Return data appropriate for the given column (0 or 1) and role for this Display.
virtual Qt::ItemFlags getViewFlags (int column) const
 Return item flags appropriate for the given column (0 or 1) for this Display.
uint32_t getVisibilityBits ()
void initialize (DisplayContext *context)
 Main initialization, called after constructor, before load() or setEnabled().
bool isEnabled () const
 Return true if this Display is enabled, false if not.
virtual void load (const Config &config)
 Load the settings for this display from the given Config node, which must be a map.
virtual void reset ()
 Called to tell the display to clear its state.
virtual void save (Config config) const
 Write this display to the given Config node.
void setAssociatedWidget (QWidget *widget)
 Associate the given widget with this Display.
virtual void setClassId (const QString &class_id)
 Set the class identifier used to create this instance. Typically this will be set by the factory object which created it.
void setFixedFrame (const QString &fixed_frame)
 Set the fixed frame in this display.
void setName (const QString &name)
 Overridden from Property to set associated widget title to the new name.
virtual void setStatus (StatusProperty::Level level, const QString &name, const QString &text)
 Show status level and text. This is thread-safe.
void setStatusStd (StatusProperty::Level level, const std::string &name, const std::string &text)
 Show status level and text, using a std::string. Convenience function which converts std::string to QString and calls setStatus(). This is thread-safe.
void setVisibilityBits (uint32_t bits)
void unsetVisibilityBits (uint32_t bits)
virtual void update (float wall_dt, float ros_dt)
 Called periodically by the visualization manager.
virtual ~Display ()

Protected Member Functions

virtual void clearStatuses ()
 Delete all status children. This is thread-safe.
virtual void fixedFrameChanged ()
 Called by setFixedFrame(). Override to respond to changes to fixed_frame_.
virtual void onDisable ()
 Derived classes override this to do the actual work of disabling themselves.
virtual void onEnable ()
 Derived classes override this to do the actual work of enabling themselves.
virtual void onInitialize ()
 Override this function to do subclass-specific initialization.

Protected Attributes

DisplayContextcontext_
 This DisplayContext pointer is the main connection a Display has into the rest of rviz. This is how the FrameManager is accessed, the SelectionManager, etc. When a Display subclass wants to signal that a new render should be done right away, call context_->queueRender().
QString fixed_frame_
 A convenience variable equal to context_->getFixedFrame().
Ogre::SceneManager * scene_manager_
 A convenience variable equal to context_->getSceneManager().
Ogre::SceneNode * scene_node_
 The Ogre::SceneNode to hold all 3D scene elements shown by this Display.
ros::NodeHandle threaded_nh_
 A NodeHandle whose CallbackQueue is run from a different thread than the GUI.
ros::NodeHandle update_nh_
 A NodeHandle whose CallbackQueue is run from the main GUI thread (the "update" thread).

Private Slots

void associatedPanelVisibilityChange (bool visible)
void clearStatusesInternal ()
void deleteStatusInternal (const QString &name)
void disable ()
void setStatusInternal (int level, const QString &name, const QString &text)

Private Attributes

QWidget * associated_widget_
PanelDockWidgetassociated_widget_panel_
QString class_id_
bool initialized_
StatusListstatus_
uint32_t visibility_bits_

Detailed Description

Definition at line 62 of file display.h.


Constructor & Destructor Documentation

Definition at line 56 of file display.cpp.

rviz::Display::~Display ( ) [virtual]

Definition at line 76 of file display.cpp.


Member Function Documentation

void rviz::Display::associatedPanelVisibilityChange ( bool  visible) [private, slot]

Definition at line 385 of file display.cpp.

void rviz::Display::clearStatuses ( ) [protected, virtual]

Delete all status children. This is thread-safe.

This removes all status children and updates the top-level status.

Definition at line 221 of file display.cpp.

void rviz::Display::clearStatusesInternal ( ) [private, slot]

Definition at line 226 of file display.cpp.

void rviz::Display::deleteStatus ( const QString &  name) [virtual]

Delete the status entry with the given name. This is thread-safe.

Definition at line 210 of file display.cpp.

void rviz::Display::deleteStatusInternal ( const QString &  name) [private, slot]

Definition at line 216 of file display.cpp.

void rviz::Display::deleteStatusStd ( const std::string &  name) [inline]

Delete the status entry with the given std::string name. This is thread-safe.

Definition at line 144 of file display.h.

void rviz::Display::disable ( ) [private, slot]

Definition at line 273 of file display.cpp.

Emit a time signal that other Displays can synchronize to.

Definition at line 292 of file display.cpp.

virtual void rviz::Display::fixedFrameChanged ( ) [inline, protected, virtual]
QWidget* rviz::Display::getAssociatedWidget ( ) const [inline]

Return the current associated widget, or NULL if there is none.

See also:
setAssociatedWidget()

Definition at line 171 of file display.h.

Return the panel containing the associated widget, or NULL if there is none.

See also:
setAssociatedWidget()

Definition at line 175 of file display.h.

virtual QString rviz::Display::getClassId ( ) const [inline, virtual]

Return the class identifier which was used to create this instance. This version just returns whatever was set with setClassId().

Definition at line 84 of file display.h.

Ogre::SceneNode* rviz::Display::getSceneNode ( ) const [inline]

Return the Ogre::SceneNode holding all 3D scene elements shown by this Display.

Definition at line 152 of file display.h.

QVariant rviz::Display::getViewData ( int  column,
int  role 
) const [virtual]

Return data appropriate for the given column (0 or 1) and role for this Display.

Reimplemented from rviz::Property.

Reimplemented in rviz::FailedDisplay.

Definition at line 107 of file display.cpp.

Qt::ItemFlags rviz::Display::getViewFlags ( int  column) const [virtual]

Return item flags appropriate for the given column (0 or 1) for this Display.

Reimplemented from rviz::Property.

Reimplemented in rviz::DisplayGroup.

Definition at line 181 of file display.cpp.

uint32_t rviz::Display::getVisibilityBits ( ) [inline]

Definition at line 149 of file display.h.

Main initialization, called after constructor, before load() or setEnabled().

Definition at line 84 of file display.cpp.

bool rviz::Display::isEnabled ( ) const

Return true if this Display is enabled, false if not.

Definition at line 278 of file display.cpp.

void rviz::Display::load ( const Config config) [virtual]

Load the settings for this display from the given Config node, which must be a map.

Overridden from Property::load() to load the Display's name and enabled state, then call Property::load().

load() is called after initialize().

Reimplemented from rviz::Property.

Reimplemented in rviz::DisplayGroup, and rviz::FailedDisplay.

Definition at line 239 of file display.cpp.

virtual void rviz::Display::onDisable ( ) [inline, protected, virtual]
virtual void rviz::Display::onEnable ( ) [inline, protected, virtual]
void rviz::Display::onEnableChanged ( ) [virtual, slot]

Reimplemented in rviz::DisplayGroup.

Definition at line 302 of file display.cpp.

virtual void rviz::Display::onInitialize ( ) [inline, protected, virtual]
void rviz::Display::queueRender ( ) [slot]

Convenience function which calls context_->queueRender().

Definition at line 99 of file display.cpp.

void rviz::Display::reset ( ) [virtual]
void rviz::Display::save ( Config  config) const [virtual]

Write this display to the given Config node.

Overridden from Property::save().

Reimplemented from rviz::Property.

Reimplemented in rviz::DisplayGroup.

Definition at line 257 of file display.cpp.

void rviz::Display::setAssociatedWidget ( QWidget *  widget)

Associate the given widget with this Display.

Each Display can have one QWidget which is shown when the Display is enabled and hidden when the Display is disabled. If there is a WindowManagerInterface registered with the VisualizationManager, like if you are using a VisualizationFrame, this also adds widget as a pane within it (with WindowManagerInterface::addPane() ).

Since there is only one slot for such a widget, this dis-associates any previously associated widget.

Call this with NULL to disassociate the current associated widget.

Definition at line 354 of file display.cpp.

virtual void rviz::Display::setClassId ( const QString &  class_id) [inline, virtual]

Set the class identifier used to create this instance. Typically this will be set by the factory object which created it.

Definition at line 88 of file display.h.

void rviz::Display::setEnabled ( bool  enabled) [slot]

Enable or disable this Display.

SetEnabled is called after initialize() and at the end of load(), if the Display settings are being loaded from a file.

Definition at line 267 of file display.cpp.

void rviz::Display::setFixedFrame ( const QString &  fixed_frame)

Set the fixed frame in this display.

Definition at line 283 of file display.cpp.

void rviz::Display::setIcon ( const QIcon &  icon) [virtual, slot]

Set the Display's icon.

Reimplemented from rviz::Property.

Definition at line 394 of file display.cpp.

void rviz::Display::setName ( const QString &  name) [virtual]

Overridden from Property to set associated widget title to the new name.

Reimplemented from rviz::Property.

Definition at line 403 of file display.cpp.

void rviz::Display::setStatus ( StatusProperty::Level  level,
const QString &  name,
const QString &  text 
) [virtual]

Show status level and text. This is thread-safe.

Parameters:
levelOne of StatusProperty::Ok, StatusProperty::Warn, or StatusProperty::Error.
nameThe name of the child entry to set.
textDescription of the child's state.

Every Display has a StatusList to indicate how it is doing. The StatusList has StatusPropertychildren indicating the status of various subcomponents of the Display. Each child of the status has a level, a name, and descriptive text. The top-level StatusList has a level which is set to the worst of all the children's levels.

Definition at line 186 of file display.cpp.

void rviz::Display::setStatusInternal ( int  level,
const QString &  name,
const QString &  text 
) [private, slot]

Definition at line 194 of file display.cpp.

void rviz::Display::setStatusStd ( StatusProperty::Level  level,
const std::string &  name,
const std::string &  text 
) [inline]

Show status level and text, using a std::string. Convenience function which converts std::string to QString and calls setStatus(). This is thread-safe.

Definition at line 135 of file display.h.

void rviz::Display::setVisibilityBits ( uint32_t  bits)

Default is all bits ON.

Definition at line 342 of file display.cpp.

void rviz::Display::timeSignal ( rviz::Display display,
ros::Time  time 
) [signal]
void rviz::Display::unsetVisibilityBits ( uint32_t  bits)

Definition at line 348 of file display.cpp.

virtual void rviz::Display::update ( float  wall_dt,
float  ros_dt 
) [inline, virtual]

Called periodically by the visualization manager.

Parameters:
wall_dtWall-clock time, in seconds, since the last time the update list was run through.
ros_dtROS time, in seconds, since the last time the update list was run through.

Reimplemented in rviz::DisplayGroup, rviz::DepthCloudDisplay, rviz::CameraDisplay, rviz::MarkerDisplay, rviz::MapDisplay, rviz::InteractiveMarkerDisplay, rviz::ImageDisplay, rviz::OdometryDisplay, rviz::RobotModelDisplay, rviz::TFDisplay, rviz::GridDisplay, rviz::PointCloudDisplay, rviz::AxesDisplay, rviz::PointCloud2Display, and rviz::LaserScanDisplay.

Definition at line 113 of file display.h.


Member Data Documentation

Definition at line 273 of file display.h.

Definition at line 274 of file display.h.

QString rviz::Display::class_id_ [private]

Definition at line 270 of file display.h.

This DisplayContext pointer is the main connection a Display has into the rest of rviz. This is how the FrameManager is accessed, the SelectionManager, etc. When a Display subclass wants to signal that a new render should be done right away, call context_->queueRender().

This is set after the constructor and before onInitialize() is called.

Definition at line 231 of file display.h.

QString rviz::Display::fixed_frame_ [protected]

A convenience variable equal to context_->getFixedFrame().

This is set after the constructor and before onInitialize() is called. Every time it is updated (via setFixedFrame()), fixedFrameChanged() is called.

Definition at line 256 of file display.h.

Definition at line 271 of file display.h.

Ogre::SceneManager* rviz::Display::scene_manager_ [protected]

A convenience variable equal to context_->getSceneManager().

This is set after the constructor and before onInitialize() is called.

Definition at line 236 of file display.h.

Ogre::SceneNode* rviz::Display::scene_node_ [protected]

The Ogre::SceneNode to hold all 3D scene elements shown by this Display.

Definition at line 239 of file display.h.

Definition at line 269 of file display.h.

A NodeHandle whose CallbackQueue is run from a different thread than the GUI.

This is configured after the constructor and before onInitialize() is called.

Definition at line 249 of file display.h.

A NodeHandle whose CallbackQueue is run from the main GUI thread (the "update" thread).

This is configured after the constructor and before onInitialize() is called.

Definition at line 244 of file display.h.

uint32_t rviz::Display::visibility_bits_ [private]

Definition at line 272 of file display.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