Grip-Reloaded
Grip version visualizaiton interface for DART (DynamicAnimationandRoboticsToolkits)
Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
MainWindow Class Reference

Main window for robot simulation interface. A virtual base class that subclasses QMainWindow. More...

#include <MainWindow.h>

Inheritance diagram for MainWindow:
GripMainWindow

List of all members.

Public Slots

void slotSetStatusBarMessage (QString msg)
 Sets the status bar message.
virtual void slotSetWorldFromPlayback (int sliderTick)=0
 Slot for setting the state and time of the world based on the playback widget's slider position and the contents of the timeline.
virtual void slotPlaybackStart ()=0
 Slot for starting the playback.
virtual void slotPlaybackPause ()=0
 Slot for pausing the playback.
virtual void slotPlaybackReverse ()=0
 Slot for reversing the playback.
virtual void slotPlaybackTimeStep (bool playForward)=0
 Slot for going to the beginning of the playback timeline.
virtual void slotPlaybackBeginning ()=0
 Slot that recursively calls it self to run the playback loop. The recursive call allows the event loop to process other events, (eg. Stop Playback)

Public Member Functions

 MainWindow ()
 Meta object macro to use signals and slots.
 ~MainWindow ()
 Destructs a MainWindow object.
void Toolbar ()
 Creates a toolbar.

Protected Slots

void loadScene ()
 Loads a scene with a dialog box.
void quickLoad ()
 Loads the last loaded scene.
void saveScene ()
 Saves the loaded scene to file for quick load functionality.
void loadPluginFileWithDialog ()
 Loads a plugin file using a file dialog for the user to manually find the plugin file.
void loadPluginDirWithDialog ()
 Loads all plugin files inside a directory with a dialog for the user to manually find the plugin directory.
virtual void loadPluginDirectory (QDir pluginsDirName)=0
 Reads a QDir directory and loads all the plugins inside it.
virtual void loadPluginFile (QString pluginFilename)=0
 Loads a plugin file (.so) by name. When loaded, the plugin will be added to the bottom tabs area.
virtual void close ()
 Closes the Window.
void exit ()
 Exits the program.
virtual void front ()=0
 Sets the view to front view.
virtual void top ()=0
 Sets the view to top view.
virtual void side ()=0
 Sets the view to side view.
virtual void startSimulation ()=0
 Starts the simulation.
virtual void stopSimulation ()=0
 Stops the simulation.
virtual void simulateSingleStep ()=0
 Simulates a single time step of the simulation.
virtual void renderDuringSimulation ()=0
 Turns on rendering during simulation, which will simulation slower than if rendering is turned off.
virtual void white ()=0
 Sets the background color of the window to white.
virtual void gray ()=0
 Sets the background color of the window to gray.
virtual void black ()=0
 Sets the background color of the window to black.
virtual void resetCamera ()=0
 Puts the camera back to its home position.
virtual void xga1024x768 ()=0
virtual void vga640x480 ()=0
virtual void hd1280x720 ()=0
virtual void simulationStopped ()=0
 Notifies thread that simulation has stopped.
virtual void setSimulationRelativeTime (double time)=0
 Sets the time box for simulation time relative to real time.
void about ()
 Displays information about the application.
void saveWorkspace ()
 Saves the workspace configuration to an existing configuration file.
void saveNewWorkspace ()
 Saves the workspace configuration to a new configuration file.
void loadWorkspace (std::string workspaceFile="")
 Loads workspace configuration from a configuration file.

Protected Member Functions

virtual QDomDocument * generateWorkspaceXML ()=0
 Create an XML file for the workspace contains the list of plugins, status of DockWidgets and the loaded scene.
virtual void parseConfig (QDomDocument config)=0
 Parses the configuration file and manipulates the workspace to match the settings in the configuration file.
QToolBar * _getToolBar ()
 QToolBar object for showing/hiding buttons.

Protected Attributes

const QString LAST_LOAD_FILE
 Path of the last loaded scene file.
QString * configFilePath
 Stores the path to the workspace configuration file.

Detailed Description

Main window for robot simulation interface. A virtual base class that subclasses QMainWindow.


Constructor & Destructor Documentation

Meta object macro to use signals and slots.

including the icons for the toolbar

Constructs a MainWindow object


Member Function Documentation

void MainWindow::about ( ) [protected, slot]

Displays information about the application.

Returns:
void
virtual void MainWindow::black ( ) [protected, pure virtual, slot]

Sets the background color of the window to black.

Returns:
void

Implemented in GripMainWindow.

void MainWindow::close ( ) [protected, virtual, slot]

Closes the Window.

Returns:
void

Reimplemented in GripMainWindow.

void MainWindow::exit ( ) [protected, slot]

Exits the program.

Returns:
void
virtual void MainWindow::front ( ) [protected, pure virtual, slot]

Sets the view to front view.

Returns:
void

Implemented in GripMainWindow.

virtual QDomDocument* MainWindow::generateWorkspaceXML ( ) [protected, pure virtual]

Create an XML file for the workspace contains the list of plugins, status of DockWidgets and the loaded scene.

Returns:
QDomDocument

Implemented in GripMainWindow.

virtual void MainWindow::gray ( ) [protected, pure virtual, slot]

Sets the background color of the window to gray.

Returns:
void

Implemented in GripMainWindow.

virtual void MainWindow::loadPluginDirectory ( QDir  pluginsDirName) [protected, pure virtual, slot]

Reads a QDir directory and loads all the plugins inside it.

Parameters:
pluginsDirNameName of the QDir containing the plugins

Implemented in GripMainWindow.

virtual void MainWindow::loadPluginFile ( QString  pluginFilename) [protected, pure virtual, slot]

Loads a plugin file (.so) by name. When loaded, the plugin will be added to the bottom tabs area.

Parameters:
pluginFileNameString representing the path of the plugin

Implemented in GripMainWindow.

void MainWindow::loadScene ( ) [protected, slot]

Loads a scene with a dialog box.

Returns:
void
void MainWindow::loadWorkspace ( std::string  workspaceFile = "") [protected, slot]

Loads workspace configuration from a configuration file.

Returns:
void
virtual void MainWindow::parseConfig ( QDomDocument  config) [protected, pure virtual]

Parses the configuration file and manipulates the workspace to match the settings in the configuration file.

Returns:
void

Implemented in GripMainWindow.

void MainWindow::quickLoad ( ) [protected, slot]

Loads the last loaded scene.

Returns:
void
virtual void MainWindow::resetCamera ( ) [protected, pure virtual, slot]

Puts the camera back to its home position.

Returns:
void

Implemented in GripMainWindow.

void MainWindow::saveNewWorkspace ( ) [protected, slot]

Saves the workspace configuration to a new configuration file.

Returns:
void
void MainWindow::saveScene ( ) [protected, slot]

Saves the loaded scene to file for quick load functionality.

Returns:
void
void MainWindow::saveWorkspace ( ) [protected, slot]

Saves the workspace configuration to an existing configuration file.

Returns:
void
virtual void MainWindow::setSimulationRelativeTime ( double  time) [protected, pure virtual, slot]

Sets the time box for simulation time relative to real time.

Parameters:
timeThe simulation time relative to real time
Returns:
void

Implemented in GripMainWindow.

virtual void MainWindow::side ( ) [protected, pure virtual, slot]

Sets the view to side view.

Returns:
void

Implemented in GripMainWindow.

virtual void MainWindow::simulateSingleStep ( ) [protected, pure virtual, slot]

Simulates a single time step of the simulation.

Returns:
void

Implemented in GripMainWindow.

virtual void MainWindow::simulationStopped ( ) [protected, pure virtual, slot]

Notifies thread that simulation has stopped.

Returns:
void

Implemented in GripMainWindow.

virtual void MainWindow::slotPlaybackBeginning ( ) [pure virtual, slot]

Slot that recursively calls it self to run the playback loop. The recursive call allows the event loop to process other events, (eg. Stop Playback)

Parameters:
playForwardWhether or not to play back in forward or reverse

Implemented in GripMainWindow.

void MainWindow::slotSetStatusBarMessage ( QString  msg) [slot]

Sets the status bar message.

Parameters:
msgMessage to display on the status bar
Returns:
void
virtual void MainWindow::slotSetWorldFromPlayback ( int  sliderTick) [pure virtual, slot]

Slot for setting the state and time of the world based on the playback widget's slider position and the contents of the timeline.

Parameters:
sliderTickPosition of the playback widget's slider

Implemented in GripMainWindow.

virtual void MainWindow::startSimulation ( ) [protected, pure virtual, slot]

Starts the simulation.

Returns:
void

Implemented in GripMainWindow.

virtual void MainWindow::stopSimulation ( ) [protected, pure virtual, slot]

Stops the simulation.

Returns:
void

Implemented in GripMainWindow.

Creates a toolbar.

Returns:
void
virtual void MainWindow::top ( ) [protected, pure virtual, slot]

Sets the view to top view.

Returns:
void

Implemented in GripMainWindow.

virtual void MainWindow::white ( ) [protected, pure virtual, slot]

Sets the background color of the window to white.

Returns:
void

Implemented in GripMainWindow.


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