Classes | Public Slots | Signals | Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes
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.
virtual void setStatus (const QString &message)

Signals

void fullScreenChange (bool hidden)
 Emitted when the interface enters or leaves full screen mode.
void statusUpdate (const QString &message)
 Emitted during file-loading and initialization to indicate progress.

Public Member Functions

virtual PanelDockWidgetaddPane (const QString &name, QWidget *panel, Qt::DockWidgetArea area=Qt::LeftDockWidgetArea, bool floating=true)
QString getErrorMessage () const
VisualizationManagergetManager ()
virtual QWidget * getParentWindow ()
void initialize (const QString &display_config_file="")
 Initialize the visualizer. Creates the VisualizationManager.
virtual void load (const Config &config)
 Load the properties of all subsystems from the given Config.
void loadDisplayConfig (const QString &path)
 Load display and other settings from the given file.
void loadPersistentSettings ()
 Load the "general" config file, which has just the few things which should not be saved with a display config.
virtual void save (Config config)
 Save the properties of each subsystem and most editable rviz data.
bool saveDisplayConfig (const QString &path)
 Save display and other settings to the given file.
void savePersistentSettings ()
 Save the "general" config file, which has just the few things which should not be saved with a display config.
void setApp (QApplication *app)
void setHelpPath (const QString &help_path)
 Set the path to the help file. Should contain HTML. Default is a file in the RViz package.
void setHideButtonVisibility (bool visible)
 Hide or show the hide-dock buttons.
void setShowChooseNewMaster (bool show)
 Call this before initialize() to have it take effect.
void setSplashPath (const QString &splash_path)
 Set the path to the "splash" image file. This image is shown during initialization and loading of the first config file. Default is a file in the RViz package. To prevent splash image from showing, set this to an empty string.
 VisualizationFrame (QWidget *parent=0)
 ~VisualizationFrame ()

Protected Types

typedef std::deque< std::string > D_string

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 exitFullScreen ()
 Exit full screen mode.
void hideLeftDock (bool hide)
void hideRightDock (bool hide)
void indicateToolIsCurrent (Tool *tool)
 Mark the given tool as the current one.
void markLoadingDone ()
 Set loading_ to false.
void onDeletePanel ()
 Delete a panel widget.
virtual void onDockPanelVisibilityChange (bool visible)
void onHelpAbout ()
void onHelpDestroyed ()
void onHelpWiki ()
void onOpen ()
void onRecentConfigSelected ()
void onSave ()
void onSaveAs ()
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 refreshTool (Tool *tool)
 Refresh the given tool in this frame's' toolbar.
void removeTool (Tool *tool)
 Remove the given tool from the frame's toolbar.
void reset ()
void setFullScreen (bool full_screen)
 Set full screen mode.
void setImageSaveDirectory (const QString &directory)
 Set the default directory in which to save screenshot images.
void showHelpPanel ()
void updateFps ()

Protected Member Functions

QDockWidget * addPanelByName (const QString &name, const QString &class_lookup_name, Qt::DockWidgetArea area=Qt::LeftDockWidgetArea, bool floating=true)
virtual void closeEvent (QCloseEvent *event)
void hideDockImpl (Qt::DockWidgetArea area, bool hide)
void initConfigs ()
 Initialize the default config directory (~/.rviz) and set up the persistent_settings_file_ and display_config_file_ variables.
void initMenus ()
void initToolbars ()
virtual void leaveEvent (QEvent *event)
void loadPanels (const Config &config)
 Loads custom panels from the given config node.
void loadWindowGeometry (const Config &config)
void markRecentConfig (const std::string &path)
bool prepareToExit ()
 Check for unsaved changes, prompt to save config, etc.
void savePanels (Config config)
 Saves custom panels to the given config node.
void saveWindowGeometry (Config config)
void setDisplayConfigFile (const std::string &path)
 Set the display config file path.
void updateRecentConfigMenu ()

Protected Attributes

std::map< QAction *, Tool * > action_to_tool_map_
QAction * add_tool_action_
QApplication * app_
std::string config_dir_
QList< PanelRecordcustom_panels_
std::string default_display_config_file_
QMenu * delete_view_menu_
std::string display_config_file_
QString error_message_
 Error message (if any) from most recent saveDisplayConfig() call.
QMenu * file_menu_
QLabel * fps_label_
int frame_count_
WidgetGeometryChangeDetectorgeom_change_detector_
QString help_path_
QToolButton * hide_left_dock_button_
QToolButton * hide_right_dock_button_
std::string home_dir_
bool initialized_
std::string last_config_dir_
ros::WallTime last_fps_calc_time_
std::string last_image_dir_
bool loading_
 True just when loading a display config file, false all other times.
VisualizationManagermanager_
QStatusBar * original_status_bar_
std::string package_path_
PanelFactorypanel_factory_
std::string persistent_settings_file_
QMenu * plugins_menu_
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_
bool show_choose_new_master_option_
QAction * show_help_action_
QSplashScreen * splash_
QString splash_path_
QLabel * status_label_
std::map< Tool *, QAction * > tool_to_action_map_
QToolBar * toolbar_
QActionGroup * toolbar_actions_
bool toolbar_visible_
 Indicates if the toolbar should be visible outside of fullscreen mode.
QMenu * view_menu_

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 71 of file visualization_frame.h.


Member Typedef Documentation

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

Definition at line 322 of file visualization_frame.h.


Constructor & Destructor Documentation

Definition at line 109 of file visualization_frame.cpp.

Definition at line 160 of file visualization_frame.cpp.


Member Function Documentation

PanelDockWidget * rviz::VisualizationFrame::addPane ( const QString &  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 1273 of file visualization_frame.cpp.

QDockWidget * rviz::VisualizationFrame::addPanelByName ( const QString &  name,
const QString &  class_lookup_name,
Qt::DockWidgetArea  area = Qt::LeftDockWidgetArea,
bool  floating = true 
) [protected]

Definition at line 1244 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 1063 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 223 of file visualization_frame.cpp.

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

Definition at line 200 of file visualization_frame.cpp.

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

Exit full screen mode.

Definition at line 1239 of file visualization_frame.cpp.

void rviz::VisualizationFrame::fullScreenChange ( bool  hidden) [signal]

Emitted when the interface enters or leaves full screen mode.

QString rviz::VisualizationFrame::getErrorMessage ( ) const [inline]

Definition at line 137 of file visualization_frame.h.

Definition at line 104 of file visualization_frame.h.

Implements rviz::WindowManagerInterface.

Definition at line 1188 of file visualization_frame.cpp.

void rviz::VisualizationFrame::hideDockImpl ( Qt::DockWidgetArea  area,
bool  hide 
) [protected]

Definition at line 515 of file visualization_frame.cpp.

void rviz::VisualizationFrame::hideLeftDock ( bool  hide) [protected, slot]

Definition at line 544 of file visualization_frame.cpp.

void rviz::VisualizationFrame::hideRightDock ( bool  hide) [protected, slot]

Definition at line 550 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 1130 of file visualization_frame.cpp.

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

Definition at line 376 of file visualization_frame.cpp.

void rviz::VisualizationFrame::initialize ( const QString &  display_config_file = "")

Initialize the visualizer. Creates the VisualizationManager.

This function must be called before load(), save(), getManager(), or addPanelByName(), since it creates the VisualizationManager instance which those calls depend on.

This function also calls VisualizationManager::initialize(), which means it will start the update timer and generally get things rolling.

Definition at line 247 of file visualization_frame.cpp.

Definition at line 447 of file visualization_frame.cpp.

Definition at line 482 of file visualization_frame.cpp.

void rviz::VisualizationFrame::leaveEvent ( QEvent *  event) [protected, virtual]

Definition at line 212 of file visualization_frame.cpp.

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

Load the properties of all subsystems from the given Config.

This is called by loadDisplayConfig().

Parameters:
configMust have type Config::Map.
See also:
save()

Definition at line 780 of file visualization_frame.cpp.

void rviz::VisualizationFrame::loadDisplayConfig ( const QString &  path)

Load display and other settings from the given file.

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

Definition at line 666 of file visualization_frame.cpp.

void rviz::VisualizationFrame::loadPanels ( const Config config) [protected]

Loads custom panels from the given config node.

Definition at line 853 of file visualization_frame.cpp.

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 persistent_settings_file_.

Definition at line 398 of file visualization_frame.cpp.

void rviz::VisualizationFrame::loadWindowGeometry ( const Config config) [protected]

Definition at line 787 of file visualization_frame.cpp.

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

Set loading_ to false.

Definition at line 717 of file visualization_frame.cpp.

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

Definition at line 648 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 1193 of file visualization_frame.cpp.

void rviz::VisualizationFrame::onDockPanelVisibilityChange ( bool  visible) [protected, virtual, slot]

Definition at line 556 of file visualization_frame.cpp.

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

Definition at line 1167 of file visualization_frame.cpp.

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

Definition at line 1157 of file visualization_frame.cpp.

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

Definition at line 1162 of file visualization_frame.cpp.

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

Definition at line 958 of file visualization_frame.cpp.

Definition at line 1043 of file visualization_frame.cpp.

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

Definition at line 981 of file visualization_frame.cpp.

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

Definition at line 1007 of file visualization_frame.cpp.

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

Definition at line 1035 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 1076 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 1086 of file visualization_frame.cpp.

Definition at line 579 of file visualization_frame.cpp.

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

Definition at line 600 of file visualization_frame.cpp.

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

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

Definition at line 899 of file visualization_frame.cpp.

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

Refresh the given tool in this frame's' toolbar.

This will update the icon and the text of the corresponding QAction.

Definition at line 1123 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 1100 of file visualization_frame.cpp.

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

Definition at line 217 of file visualization_frame.cpp.

void rviz::VisualizationFrame::save ( Config  config) [virtual]

Save the properties of each subsystem and most editable rviz data.

This is called by saveDisplayConfig().

Parameters:
configThe Config node to write into.
See also:
load()

Definition at line 773 of file visualization_frame.cpp.

bool rviz::VisualizationFrame::saveDisplayConfig ( const QString &  path)

Save display and other settings to the given file.

Parameters:
pathThe full path of the config file to save into.
Returns:
True on success, False on failure.

On failure, also sets error_message_ with information about the problem. Can be retrieved with getErrorMessage().

Definition at line 751 of file visualization_frame.cpp.

void rviz::VisualizationFrame::savePanels ( Config  config) [protected]

Saves custom panels to the given config node.

Definition at line 889 of file visualization_frame.cpp.

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 persistent_settings_file_.

Definition at line 427 of file visualization_frame.cpp.

Definition at line 831 of file visualization_frame.cpp.

void rviz::VisualizationFrame::setApp ( QApplication *  app)

Definition at line 173 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 735 of file visualization_frame.cpp.

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

Definition at line 727 of file visualization_frame.cpp.

void rviz::VisualizationFrame::setFullScreen ( bool  full_screen) [protected, slot]

Set full screen mode.

Definition at line 1221 of file visualization_frame.cpp.

void rviz::VisualizationFrame::setHelpPath ( const QString &  help_path)

Set the path to the help file. Should contain HTML. Default is a file in the RViz package.

Definition at line 236 of file visualization_frame.cpp.

Hide or show the hide-dock buttons.

Definition at line 538 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 722 of file visualization_frame.cpp.

Call this before initialize() to have it take effect.

Definition at line 231 of file visualization_frame.cpp.

void rviz::VisualizationFrame::setSplashPath ( const QString &  splash_path)

Set the path to the "splash" image file. This image is shown during initialization and loading of the first config file. Default is a file in the RViz package. To prevent splash image from showing, set this to an empty string.

Definition at line 242 of file visualization_frame.cpp.

void rviz::VisualizationFrame::setStatus ( const QString &  message) [virtual, slot]

Set the message displayed in the status bar

Implements rviz::WindowManagerInterface.

Definition at line 178 of file visualization_frame.cpp.

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

Definition at line 1139 of file visualization_frame.cpp.

void rviz::VisualizationFrame::statusUpdate ( const QString &  message) [signal]

Emitted during file-loading and initialization to indicate progress.

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

Definition at line 183 of file visualization_frame.cpp.

Definition at line 620 of file visualization_frame.cpp.


Member Data Documentation

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

Definition at line 326 of file visualization_frame.h.

Definition at line 345 of file visualization_frame.h.

QApplication* rviz::VisualizationFrame::app_ [protected]

Definition at line 292 of file visualization_frame.h.

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

Definition at line 298 of file visualization_frame.h.

Definition at line 343 of file visualization_frame.h.

Definition at line 301 of file visualization_frame.h.

Definition at line 309 of file visualization_frame.h.

Definition at line 300 of file visualization_frame.h.

Error message (if any) from most recent saveDisplayConfig() call.

Definition at line 360 of file visualization_frame.h.

Definition at line 306 of file visualization_frame.h.

Definition at line 354 of file visualization_frame.h.

Definition at line 357 of file visualization_frame.h.

Definition at line 349 of file visualization_frame.h.

Definition at line 317 of file visualization_frame.h.

Definition at line 330 of file visualization_frame.h.

Definition at line 331 of file visualization_frame.h.

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

Definition at line 304 of file visualization_frame.h.

Definition at line 348 of file visualization_frame.h.

Definition at line 302 of file visualization_frame.h.

Definition at line 358 of file visualization_frame.h.

Definition at line 303 of file visualization_frame.h.

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

Definition at line 350 of file visualization_frame.h.

Definition at line 314 of file visualization_frame.h.

Definition at line 355 of file visualization_frame.h.

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

Definition at line 316 of file visualization_frame.h.

Definition at line 333 of file visualization_frame.h.

Definition at line 299 of file visualization_frame.h.

Definition at line 310 of file visualization_frame.h.

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

Definition at line 351 of file visualization_frame.h.

Definition at line 323 of file visualization_frame.h.

Definition at line 307 of file visualization_frame.h.

Definition at line 346 of file visualization_frame.h.

Definition at line 294 of file visualization_frame.h.

Definition at line 328 of file visualization_frame.h.

Definition at line 296 of file visualization_frame.h.

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

Definition at line 320 of file visualization_frame.h.

Definition at line 318 of file visualization_frame.h.

Definition at line 353 of file visualization_frame.h.

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

Definition at line 327 of file visualization_frame.h.

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

Definition at line 312 of file visualization_frame.h.

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

Definition at line 325 of file visualization_frame.h.

Indicates if the toolbar should be visible outside of fullscreen mode.

Definition at line 363 of file visualization_frame.h.

Definition at line 308 of file visualization_frame.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Tue Oct 3 2017 03:19:32