rviz::VisualizationFrame Class Reference

The main rviz window. More...

#include <visualization_frame.h>

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

List of all members.

Classes

struct  PanelRecord

Public Slots

void setDisplayConfigModified ()
 Call this to let the frame know that something that would get saved in the display config has changed.

Public Member Functions

virtual PanelDockWidgetaddPane (const std::string &name, QWidget *panel, Qt::DockWidgetArea area=Qt::LeftDockWidgetArea, bool floating=true)
VisualizationManagergetManager ()
virtual QWidget * getParentWindow ()
void initialize (const std::string &display_config_file="", const std::string &fixed_frame="", const std::string &target_frame="", const std::string &splash_path="", const std::string &help_path="", bool verbose=false, bool show_choose_new_master_option=false)
 VisualizationFrame (QWidget *parent=0)
 ~VisualizationFrame ()

Protected Types

typedef std::deque< std::string > D_string
typedef std::map< std::string,
PanelRecord
M_PanelRecord

Protected Slots

void addTool (Tool *tool)
 Add the given tool to this frame's toolbar.
void changeMaster ()
 Save the current state and quit with exit code 255 to signal the wrapper that we would like to restart with a different ROS master URI.
void indicateToolIsCurrent (Tool *tool)
 Mark the given tool as the current one.
void markLoadingDone ()
 Set loading_ to false.
void onDeletePanel ()
 Delete a panel widget.
void onHelpWiki ()
void onOpen ()
void onRecentConfigSelected ()
void onSaveImage ()
void onToolbarActionTriggered (QAction *action)
 Looks up the Tool for this action and calls VisualizationManager::setCurrentTool().
void onToolbarRemoveTool (QAction *remove_tool_menu_action)
 Remove a the tool whose name is given by remove_tool_menu_action->text().
void openNewPanelDialog ()
void openNewToolDialog ()
void removeTool (Tool *tool)
 Remove the given tool from the frame's toolbar.
void save ()
void saveAs ()
void setImageSaveDirectory (const QString &directory)
 Set the default directory in which to save screenshot images.
void showHelpPanel ()

Protected Member Functions

PanelDockWidgetaddCustomPanel (const std::string &name, const std::string &class_lookup_name, Qt::DockWidgetArea area=Qt::LeftDockWidgetArea, bool floating=true)
virtual void closeEvent (QCloseEvent *event)
bool fileIsWritable (const std::string &path)
 Return true if the give file is writable, false if not.
QRect hackedFrameGeometry ()
void initConfigs (const std::string &display_config_file_override)
 Initialize the default config directory (~/.rviz) and set up the general_config_file_ and display_config_file_ variables.
void initMenus ()
virtual void load (const YAML::Node &yaml_node, const StatusCallback &cb)
 Load the properties of all subsystems from the given yaml node.
void loadDisplayConfig (const std::string &path)
 Load display and other settings from the given file.
void loadGeneralConfig ()
 Load the "general" config file, which has just the few things which should not be saved with a display config.
void markRecentConfig (const std::string &path)
virtual void moveEvent (QMoveEvent *event)
bool prepareToExit ()
 Check for unsaved changes, prompt to save config, etc.
virtual void save (YAML::Emitter &emitter)
 Save the properties of each subsystem and most editable rviz data. Emitter must be in a map context.
void saveDisplayConfig (const std::string &path)
 Save display and other settings to the given file.
void saveGeneralConfig ()
 Save the "general" config file, which has just the few things which should not be saved with a display config.
void setDisplayConfigFile (const std::string &path)
 Set the display config file path.
void setSplashStatus (const std::string &status)
void updateRecentConfigMenu ()

Protected Attributes

std::map< QAction *, Tool * > action_to_tool_map_
QAction * add_tool_action_
std::string config_dir_
M_PanelRecord custom_panels_
std::string default_display_config_file_
QMenu * delete_view_menu_
std::string display_config_file_
DisplaysPaneldisplays_panel_
QMenu * file_menu_
QPoint first_position_
std::string general_config_file_
WidgetGeometryChangeDetectorgeom_change_detector_
HelpPanelhelp_panel_
std::string help_path_
std::string home_dir_
bool initialized_
std::string last_config_dir_
std::string last_image_dir_
bool loading_
 True just when loading a display config file, false all other times.
VisualizationManagermanager_
int num_move_events_
std::string package_path_
pluginlib::ClassLoader< Panel > * panel_class_loader_
QMenu * plugins_menu_
QPoint position_correction_
QTimer * post_load_timer_
 Single-shot timer for calling postLoad() a short time after loadDisplayConfig() finishes.
D_string recent_configs_
QMenu * recent_configs_menu_
QMenu * remove_tool_menu_
RenderPanelrender_panel_
SelectionPanelselection_panel_
bool show_choose_new_master_option_
QAction * show_help_action_
QSplashScreen * splash_
TimePaneltime_panel_
ToolPropertiesPaneltool_properties_panel_
std::map< Tool *, QAction * > tool_to_action_map_
QToolBar * toolbar_
QActionGroup * toolbar_actions_
QMenu * view_menu_
QList< QAction * > view_menu_actions_
ViewsPanelviews_panel_

Detailed Description

The main rviz window.

VisualizationFrame is a QMainWindow, which means it has a center area and a bunch of dock areas around it. The central widget here is a RenderPanel, and around it (by default) are a DisplaysPanel, ViewsPanel, TimePanel, SelectionPanel, and ToolPropertiesPanel. At the top is a toolbar with "Move Camera", "Select", etc. There is also a menu bar with file/open, etc.

Definition at line 79 of file visualization_frame.h.


Member Typedef Documentation

typedef std::deque<std::string> rviz::VisualizationFrame::D_string [protected]

Definition at line 276 of file visualization_frame.h.

typedef std::map<std::string, PanelRecord> rviz::VisualizationFrame::M_PanelRecord [protected]

Definition at line 297 of file visualization_frame.h.


Constructor & Destructor Documentation

rviz::VisualizationFrame::VisualizationFrame ( QWidget *  parent = 0  ) 

Definition at line 114 of file visualization_frame.cpp.

rviz::VisualizationFrame::~VisualizationFrame (  ) 

Definition at line 147 of file visualization_frame.cpp.


Member Function Documentation

PanelDockWidget * rviz::VisualizationFrame::addCustomPanel ( const std::string &  name,
const std::string &  class_lookup_name,
Qt::DockWidgetArea  area = Qt::LeftDockWidgetArea,
bool  floating = true 
) [protected]

Definition at line 1069 of file visualization_frame.cpp.

PanelDockWidget * rviz::VisualizationFrame::addPane ( const std::string &  name,
QWidget *  pane,
Qt::DockWidgetArea  area = Qt::LeftDockWidgetArea,
bool  floating = true 
) [virtual]

Add a pane to the visualizer. To remove a pane, just delete it. For example: "delete my_panel_dock_widget;". Other operations can also be done directly to the PanelDockWidget: show(), hide(), close(), etc.

Implements rviz::WindowManagerInterface.

Definition at line 1099 of file visualization_frame.cpp.

void rviz::VisualizationFrame::addTool ( Tool tool  )  [protected, slot]

Add the given tool to this frame's toolbar.

This creates a QAction internally which listens for the Tool's shortcut key. When the action is triggered by the toolbar or by the shortcut key, onToolbarActionTriggered() is called.

Definition at line 945 of file visualization_frame.cpp.

void rviz::VisualizationFrame::changeMaster (  )  [protected, slot]

Save the current state and quit with exit code 255 to signal the wrapper that we would like to restart with a different ROS master URI.

Definition at line 173 of file visualization_frame.cpp.

void rviz::VisualizationFrame::closeEvent ( QCloseEvent *  event  )  [protected, virtual]

Definition at line 161 of file visualization_frame.cpp.

bool rviz::VisualizationFrame::fileIsWritable ( const std::string &  path  )  [protected]

Return true if the give file is writable, false if not.

Definition at line 867 of file visualization_frame.cpp.

VisualizationManager* rviz::VisualizationFrame::getManager (  )  [inline]

Definition at line 94 of file visualization_frame.h.

QWidget * rviz::VisualizationFrame::getParentWindow (  )  [virtual]

Implements rviz::WindowManagerInterface.

Definition at line 1036 of file visualization_frame.cpp.

QRect rviz::VisualizationFrame::hackedFrameGeometry (  )  [protected]

Definition at line 761 of file visualization_frame.cpp.

void rviz::VisualizationFrame::indicateToolIsCurrent ( Tool tool  )  [protected, slot]

Mark the given tool as the current one.

This is purely a visual change in the GUI, it does not call any tool functions.

Definition at line 1003 of file visualization_frame.cpp.

void rviz::VisualizationFrame::initConfigs ( const std::string &  display_config_file_override  )  [protected]

Initialize the default config directory (~/.rviz) and set up the general_config_file_ and display_config_file_ variables.

Parameters:
display_config_file_override The display config file passed in to initialize().

Definition at line 298 of file visualization_frame.cpp.

void rviz::VisualizationFrame::initialize ( const std::string &  display_config_file = "",
const std::string &  fixed_frame = "",
const std::string &  target_frame = "",
const std::string &  splash_path = "",
const std::string &  help_path = "",
bool  verbose = false,
bool  show_choose_new_master_option = false 
)

Definition at line 186 of file visualization_frame.cpp.

void rviz::VisualizationFrame::initMenus (  )  [protected]

Definition at line 375 of file visualization_frame.cpp.

void rviz::VisualizationFrame::load ( const YAML::Node &  yaml_node,
const StatusCallback cb 
) [protected, virtual]

Load the properties of all subsystems from the given yaml node.

This is what is called when loading a "*.rviz" file.

Parameters:
yaml_node Must be a YAML map.
cb An optional callback function to call with status updates, such as "loading displays".
See also:
save()

Definition at line 626 of file visualization_frame.cpp.

void rviz::VisualizationFrame::loadDisplayConfig ( const std::string &  path  )  [protected]

Load display and other settings from the given file.

Parameters:
path The full path of the config file to load from.

Definition at line 481 of file visualization_frame.cpp.

void rviz::VisualizationFrame::loadGeneralConfig (  )  [protected]

Load the "general" config file, which has just the few things which should not be saved with a display config.

Loads from the file named in general_config_file_.

Definition at line 335 of file visualization_frame.cpp.

void rviz::VisualizationFrame::markLoadingDone (  )  [protected, slot]

Set loading_ to false.

Definition at line 535 of file visualization_frame.cpp.

void rviz::VisualizationFrame::markRecentConfig ( const std::string &  path  )  [protected]

Definition at line 463 of file visualization_frame.cpp.

void rviz::VisualizationFrame::moveEvent ( QMoveEvent *  event  )  [protected, virtual]

Definition at line 728 of file visualization_frame.cpp.

void rviz::VisualizationFrame::onDeletePanel (  )  [protected, slot]

Delete a panel widget.

The sender() of the signal should be a QAction whose text() is the name of the panel.

Definition at line 1048 of file visualization_frame.cpp.

void rviz::VisualizationFrame::onHelpWiki (  )  [protected, slot]

Definition at line 1031 of file visualization_frame.cpp.

void rviz::VisualizationFrame::onOpen (  )  [protected, slot]

Definition at line 854 of file visualization_frame.cpp.

void rviz::VisualizationFrame::onRecentConfigSelected (  )  [protected, slot]

Definition at line 932 of file visualization_frame.cpp.

void rviz::VisualizationFrame::onSaveImage (  )  [protected, slot]

Definition at line 924 of file visualization_frame.cpp.

void rviz::VisualizationFrame::onToolbarActionTriggered ( QAction *  action  )  [protected, slot]

Looks up the Tool for this action and calls VisualizationManager::setCurrentTool().

Definition at line 957 of file visualization_frame.cpp.

void rviz::VisualizationFrame::onToolbarRemoveTool ( QAction *  remove_tool_menu_action  )  [protected, slot]

Remove a the tool whose name is given by remove_tool_menu_action->text().

Definition at line 966 of file visualization_frame.cpp.

void rviz::VisualizationFrame::openNewPanelDialog (  )  [protected, slot]

Definition at line 402 of file visualization_frame.cpp.

void rviz::VisualizationFrame::openNewToolDialog (  )  [protected, slot]

Definition at line 420 of file visualization_frame.cpp.

bool rviz::VisualizationFrame::prepareToExit (  )  [protected]

Check for unsaved changes, prompt to save config, etc.

Returns:
true if it is OK to exit, false if not.

Definition at line 798 of file visualization_frame.cpp.

void rviz::VisualizationFrame::removeTool ( Tool tool  )  [protected, slot]

Remove the given tool from the frame's toolbar.

Definition at line 980 of file visualization_frame.cpp.

void rviz::VisualizationFrame::save ( YAML::Emitter &  emitter  )  [protected, virtual]

Save the properties of each subsystem and most editable rviz data. Emitter must be in a map context.

Parameters:
emitter The yaml emitter to write to.
See also:
loadDisplayConfig()

Definition at line 590 of file visualization_frame.cpp.

void rviz::VisualizationFrame::save (  )  [protected, slot]

Definition at line 874 of file visualization_frame.cpp.

void rviz::VisualizationFrame::saveAs (  )  [protected, slot]

Definition at line 901 of file visualization_frame.cpp.

void rviz::VisualizationFrame::saveDisplayConfig ( const std::string &  path  )  [protected]

Save display and other settings to the given file.

Parameters:
path The full path of the config file to save into.

Definition at line 569 of file visualization_frame.cpp.

void rviz::VisualizationFrame::saveGeneralConfig (  )  [protected]

Save the "general" config file, which has just the few things which should not be saved with a display config.

Saves to the file named in general_config_file_.

Definition at line 352 of file visualization_frame.cpp.

void rviz::VisualizationFrame::setDisplayConfigFile ( const std::string &  path  )  [protected]

Set the display config file path.

This does not load the given file, it just sets the member variable and updates the window title.

Definition at line 553 of file visualization_frame.cpp.

void rviz::VisualizationFrame::setDisplayConfigModified (  )  [slot]

Call this to let the frame know that something that would get saved in the display config has changed.

Definition at line 545 of file visualization_frame.cpp.

void rviz::VisualizationFrame::setImageSaveDirectory ( const QString &  directory  )  [protected, slot]

Set the default directory in which to save screenshot images.

Definition at line 540 of file visualization_frame.cpp.

void rviz::VisualizationFrame::setSplashStatus ( const std::string &  status  )  [protected]

Definition at line 181 of file visualization_frame.cpp.

void rviz::VisualizationFrame::showHelpPanel (  )  [protected, slot]

Definition at line 1012 of file visualization_frame.cpp.

void rviz::VisualizationFrame::updateRecentConfigMenu (  )  [protected]

Definition at line 435 of file visualization_frame.cpp.


Member Data Documentation

std::map<QAction*,Tool*> rviz::VisualizationFrame::action_to_tool_map_ [protected]

Definition at line 283 of file visualization_frame.h.

Definition at line 300 of file visualization_frame.h.

std::string rviz::VisualizationFrame::config_dir_ [protected]

Definition at line 252 of file visualization_frame.h.

Definition at line 298 of file visualization_frame.h.

Definition at line 255 of file visualization_frame.h.

Definition at line 263 of file visualization_frame.h.

Definition at line 254 of file visualization_frame.h.

Definition at line 243 of file visualization_frame.h.

Definition at line 260 of file visualization_frame.h.

Definition at line 279 of file visualization_frame.h.

Definition at line 253 of file visualization_frame.h.

Definition at line 304 of file visualization_frame.h.

Definition at line 249 of file visualization_frame.h.

std::string rviz::VisualizationFrame::help_path_ [protected]

Definition at line 272 of file visualization_frame.h.

std::string rviz::VisualizationFrame::home_dir_ [protected]

Definition at line 258 of file visualization_frame.h.

Definition at line 303 of file visualization_frame.h.

Definition at line 256 of file visualization_frame.h.

Definition at line 257 of file visualization_frame.h.

True just when loading a display config file, false all other times.

Definition at line 305 of file visualization_frame.h.

Definition at line 269 of file visualization_frame.h.

Definition at line 281 of file visualization_frame.h.

std::string rviz::VisualizationFrame::package_path_ [protected]

Definition at line 271 of file visualization_frame.h.

pluginlib::ClassLoader<Panel>* rviz::VisualizationFrame::panel_class_loader_ [protected]

Definition at line 287 of file visualization_frame.h.

Definition at line 264 of file visualization_frame.h.

Definition at line 280 of file visualization_frame.h.

Single-shot timer for calling postLoad() a short time after loadDisplayConfig() finishes.

Definition at line 306 of file visualization_frame.h.

Definition at line 277 of file visualization_frame.h.

Definition at line 261 of file visualization_frame.h.

Definition at line 301 of file visualization_frame.h.

Definition at line 242 of file visualization_frame.h.

Definition at line 246 of file visualization_frame.h.

Definition at line 285 of file visualization_frame.h.

Definition at line 250 of file visualization_frame.h.

QSplashScreen* rviz::VisualizationFrame::splash_ [protected]

Definition at line 274 of file visualization_frame.h.

Definition at line 245 of file visualization_frame.h.

Definition at line 247 of file visualization_frame.h.

std::map<Tool*,QAction*> rviz::VisualizationFrame::tool_to_action_map_ [protected]

Definition at line 284 of file visualization_frame.h.

QToolBar* rviz::VisualizationFrame::toolbar_ [protected]

Definition at line 267 of file visualization_frame.h.

QActionGroup* rviz::VisualizationFrame::toolbar_actions_ [protected]

Definition at line 282 of file visualization_frame.h.

Definition at line 262 of file visualization_frame.h.

QList<QAction*> rviz::VisualizationFrame::view_menu_actions_ [protected]

Definition at line 265 of file visualization_frame.h.

Definition at line 244 of file visualization_frame.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


rviz
Author(s): Dave Hershberger, Josh Faust
autogenerated on Wed Jun 6 11:25:48 2012