MainWindow Class Reference

Main user interface, includes menus, tools, widget for viewer, etc. More...

#include <mainWindow.h>

List of all members.

Public Slots

void archBuilder ()
void clearContactsList ()
void contactSelected (int newSelection)
void dbaseGUIAction_activated ()
void dbasePlannerAction_activated ()
void dynamicsPopState ()
void dynamicsPushState ()
void eigenGraspActivated ()
void eigenGraspPlannerActivated ()
void elementBodyProperties ()
void elementPrimitives ()
void elementTurnOffCollisions ()
void fileEditSettings ()
void fileExit ()
void fileImportObject ()
void fileImportObstacle ()
void fileImportRobot ()
void fileNew ()
void fileOpen ()
void fileSave ()
void fileSaveAs ()
void fileSaveImage ()
void forcesVisibleCheckBox_toggled (bool vis)
void graspAutoGrasp ()
void graspAutoOpen ()
void graspCapture ()
void graspCompliantPlanner ()
void graspContactExaminer_activated ()
void graspCreateProjection (Grasp *g=NULL)
void graspForceOptimization ()
void graspPlanner ()
void graspQualityMeasures ()
void handleHandSelectionChange ()
void handleTendonDetailsArea ()
void handleTendonSelectionArea ()
void helpAbout ()
void helpAboutQT ()
void helpManual ()
void materialSelected (int whichMat)
void miscArizonaProjectDlg_activated ()
void miscEigengridsAction_activated ()
void miscOptimizer ()
void misStaubliControlDlg ()
int saveAndContinue (const QString &action)
void selectGraspedBody (int sb)
void sensorsBarrettHandAction ()
void sensorsSensor_InputAction_activated ()
void setCurrentHand (int sh)
void setTool (QAction *a)
void showDynamicsError (const char *errMsg)
void stereoFlip ()
void stereoOff ()
void stereoOn ()
void TendonForceInput_valueChanged (int f)
void tendonNamesBoxActivated (int i)
void tendonVisibleCheckBox_toggled (bool vis)
void toggleDynamics ()
void updateCollisionAction (bool state)
void updateContactsList ()
void updateElementMenu ()
void updateGraspBoxes ()
void updateGraspMenu ()
void updateMaterialBox ()
void updateMaterialBoxList ()
void updateQualityList ()
void updateTendonNamesBox ()
void updateTimeReadout ()

Public Member Functions

WorldgetMainWorld ()
 MainWindow (QWidget *parent=0)
void setMainWorld (World *w)
virtual ~MainWindow ()

Public Attributes

Ui::MainWindowUImUI
Q3MainWindow * mWindow

Private Member Functions

void destroy ()
void destroyChildren ()
void init ()

Private Attributes

QString fileName
int selectedContact
Worldworld

Detailed Description

Main user interface, includes menus, tools, widget for viewer, etc.

This class is derived from the QT mainWindow widget. It creates the main application window which includes the menu bar, tool bar, main viewer window, quality measure result box, and the contacts list box.

Definition at line 55 of file mainWindow.h.


Constructor & Destructor Documentation

MainWindow::MainWindow ( QWidget *  parent = 0  ) 

Definition at line 95 of file mainWindow.cpp.

virtual MainWindow::~MainWindow (  )  [inline, virtual]

Definition at line 71 of file mainWindow.h.


Member Function Documentation

void MainWindow::archBuilder (  )  [slot]

Definition at line 942 of file mainWindow.cpp.

void MainWindow::clearContactsList (  )  [slot]

Removes all contacts from the contacts list.

Definition at line 1032 of file mainWindow.cpp.

void MainWindow::contactSelected ( int  newSelection  )  [slot]

When a contact from the list is selected by the user, it will cause the corresponding arrow indicator in the scene to blink. If a currently selected contact is chosen again, it is unselected and the blinking stops.

Definition at line 1014 of file mainWindow.cpp.

void MainWindow::dbaseGUIAction_activated (  )  [slot]

Definition at line 791 of file mainWindow.cpp.

void MainWindow::dbasePlannerAction_activated (  )  [slot]

Definition at line 801 of file mainWindow.cpp.

void MainWindow::destroy (  )  [private]

Stub UI destructor.

Definition at line 200 of file mainWindow.cpp.

void MainWindow::destroyChildren (  )  [private]

Definition at line 204 of file mainWindow.cpp.

void MainWindow::dynamicsPopState (  )  [slot]

Pops the top dyanmic state from the world and uses it to set the current world state.

Definition at line 1118 of file mainWindow.cpp.

void MainWindow::dynamicsPushState (  )  [slot]

Pushes the current dynamic state onto a world stack.

Definition at line 1109 of file mainWindow.cpp.

void MainWindow::eigenGraspActivated (  )  [slot]

Definition at line 750 of file mainWindow.cpp.

void MainWindow::eigenGraspPlannerActivated (  )  [slot]

Definition at line 771 of file mainWindow.cpp.

void MainWindow::elementBodyProperties (  )  [slot]

Opens the body properties dialog box, allowing the user to change the properties of the currently selected body(ies). After the dialog box is accepted, all grasps are updated since materials may have been changed.

Definition at line 525 of file mainWindow.cpp.

void MainWindow::elementPrimitives (  )  [slot]

Definition at line 535 of file mainWindow.cpp.

void MainWindow::elementTurnOffCollisions (  )  [slot]

Toggles world collisions. Actuall effect depends on what is currently selected.

Definition at line 515 of file mainWindow.cpp.

void MainWindow::fileEditSettings (  )  [slot]

Opens a dialog box that allows the user to edit application settings. If the dialog box is accepted (ok is pressed), it makes the settings changes to the world. At the end of this routine, friction cones are redrawn in case and of the COF's have changed, and the material selection box is updated in case any of the material names have been changed.

Definition at line 424 of file mainWindow.cpp.

void MainWindow::fileExit (  )  [slot]

First checks if the user wants to save the current world. Then if the quit is not aborted, this exits the main interaction loop, to begin application shutdown.

Definition at line 377 of file mainWindow.cpp.

void MainWindow::fileImportObject (  )  [slot]

A file dialog box is opened with the $GRASPIT/models/objects directory opened, and the user can choose a model file to open. If this is compiled with COIN2 the model type can be in either VRML 2.0 or Inventor format, otherwise it must be in Inventor format. The GraspableBody is imported into the world and positioned at the origin.

Definition at line 363 of file mainWindow.cpp.

void MainWindow::fileImportObstacle (  )  [slot]

A file dialog box is opened with the $GRASPIT/models/obstacles directory opened, and the user can choose a model file to open. If this is compiled with COIN2 the model type can be in either VRML 2.0 or Inventor format, otherwise it must be in Inventor format. The Body is imported into the world and positioned at the origin.

Definition at line 348 of file mainWindow.cpp.

void MainWindow::fileImportRobot (  )  [slot]

A file dialog box is opened with the $GRASPIT/models/robots directory opened, and the user can choose a robot configuration file to open. The Robot is imported into the world and positioned at the origin.

Definition at line 332 of file mainWindow.cpp.

void MainWindow::fileNew (  )  [slot]

First checks if the user wants to save the current world. Then if the new command is not aborted, it empties the world, and resets the name to "Untitled".

Definition at line 262 of file mainWindow.cpp.

void MainWindow::fileOpen (  )  [slot]

First checks if the user wants to save the current world. Then if the open command is not aborted, it brings up a file opened dialog box with the $GRASPIT/worlds directory open. When the user chooses a saved world, this empties the current world and loads the chosen one.

Definition at line 277 of file mainWindow.cpp.

void MainWindow::fileSave (  )  [slot]

If the current world has a filename, this saves the world overwriting that file. If there is no current filename, this opens the saveAs dialog box.

Definition at line 299 of file mainWindow.cpp.

void MainWindow::fileSaveAs (  )  [slot]

A file dialog box is opened with the $GRASPIT/worlds directory opened, and the user is prompted to save the world file. If the user does not add an extension, the ".xml" extension is added.

Definition at line 313 of file mainWindow.cpp.

void MainWindow::fileSaveImage (  )  [slot]

A file dialog box is opened with the $GRASPIT/images directory opened, and the user is asked to choose a name for the image. Currently this only save jpg images, but functionality should be added to save other formats. If the user does not add an extension, ".jpg" is added to the filename. A rendered images of the current scence is then saved.

Definition at line 459 of file mainWindow.cpp.

void MainWindow::forcesVisibleCheckBox_toggled ( bool  vis  )  [slot]

Definition at line 1345 of file mainWindow.cpp.

World* MainWindow::getMainWorld (  )  [inline]

Definition at line 77 of file mainWindow.h.

void MainWindow::graspAutoGrasp (  )  [slot]

Starts an autograsp for the current hand and updated all grasps when it is complete.

Definition at line 734 of file mainWindow.cpp.

void MainWindow::graspAutoOpen (  )  [slot]

Opens the fingers by performing an autograsp in the opposite directions

Definition at line 744 of file mainWindow.cpp.

void MainWindow::graspCapture (  )  [slot]

Definition at line 861 of file mainWindow.cpp.

void MainWindow::graspCompliantPlanner (  )  [slot]

This fires up a window for grasp planning with compliant hands. In the future this interface might be redesigned, to use the same frameworks as either the regular planner or the eigengrasp planner

Definition at line 717 of file mainWindow.cpp.

void MainWindow::graspContactExaminer_activated (  )  [slot]

Definition at line 763 of file mainWindow.cpp.

void MainWindow::graspCreateProjection ( Grasp g = NULL  )  [slot]

Opens a GWS Projection dialog box. After the user has chosen which coordinates to fix at particular values, this creates a new gws projection using those values. It then adds the projection to the grasp of the currently selected hand.

Definition at line 633 of file mainWindow.cpp.

void MainWindow::graspForceOptimization (  )  [slot]

Definition at line 701 of file mainWindow.cpp.

void MainWindow::graspPlanner (  )  [slot]

First checks the current hand is a Barrett hand (only one the planner works with). Then it opens the grasp planner dialog box. The is not a modeless box (does not prevent user interaction with the main window) so control is returned to the main loop after the dlg box is opened.

Definition at line 686 of file mainWindow.cpp.

void MainWindow::graspQualityMeasures (  )  [slot]

Opens the Quality Measures dialog box, which allows the user to create new qm's, edit current ones, or delete them. After the dialog box is closed it revaluates all grasps.

Definition at line 663 of file mainWindow.cpp.

void MainWindow::handleHandSelectionChange (  )  [slot]

Definition at line 1198 of file mainWindow.cpp.

void MainWindow::handleTendonDetailsArea (  )  [slot]

Definition at line 1296 of file mainWindow.cpp.

void MainWindow::handleTendonSelectionArea (  )  [slot]

Definition at line 1245 of file mainWindow.cpp.

void MainWindow::helpAbout (  )  [slot]

Brings up a dialog box with the graspit logo, the version number, a copyright, and an OK button.

Definition at line 485 of file mainWindow.cpp.

void MainWindow::helpAboutQT (  )  [slot]

Definition at line 495 of file mainWindow.cpp.

void MainWindow::helpManual (  )  [slot]

Brings up a dialog saying where the manual can be found.

Definition at line 474 of file mainWindow.cpp.

void MainWindow::init (  )  [private]

UI constructor. Zeros the time readout, sets the correct states for the dynamics and collision checking buttons.

Definition at line 183 of file mainWindow.cpp.

void MainWindow::materialSelected ( int  whichMat  )  [slot]

Sets the material of any selected bodies, and updates all grasps.

Definition at line 1137 of file mainWindow.cpp.

void MainWindow::miscArizonaProjectDlg_activated (  )  [slot]

Definition at line 830 of file mainWindow.cpp.

void MainWindow::miscEigengridsAction_activated (  )  [slot]

Definition at line 971 of file mainWindow.cpp.

void MainWindow::miscOptimizer (  )  [slot]

Definition at line 963 of file mainWindow.cpp.

void MainWindow::misStaubliControlDlg (  )  [slot]

Definition at line 840 of file mainWindow.cpp.

int MainWindow::saveAndContinue ( const QString &  action  )  [slot]

If the world was modified since the last time it was saved, this function will ask the user if they would like to save the world before completing the requested operation (which is passed in as a string). The three options are: save and continue the operation, don't save but continue the operation, or cancel the operation.

Definition at line 391 of file mainWindow.cpp.

void MainWindow::selectGraspedBody ( int  sb  )  [slot]

When the user selects a graspbable body from the combo box, this sets the object that should be the focus of the current hand's grasp. It then updates the quality list.

Definition at line 1213 of file mainWindow.cpp.

void MainWindow::sensorsBarrettHandAction (  )  [slot]

Definition at line 870 of file mainWindow.cpp.

void MainWindow::sensorsSensor_InputAction_activated (  )  [slot]

Definition at line 851 of file mainWindow.cpp.

void MainWindow::setCurrentHand ( int  sh  )  [slot]

When the user chooses a new hand from the combo box, this sets the current hand for the world.

Definition at line 1224 of file mainWindow.cpp.

void MainWindow::setMainWorld ( World w  ) 

Sets the world that the main window interface will deal with. Sets up all signal/slot connections with this world.

Definition at line 214 of file mainWindow.cpp.

void MainWindow::setTool ( QAction *  a  )  [slot]

Based on what tool button was chosen this sets the current tool in the IVMgr.

Definition at line 505 of file mainWindow.cpp.

void MainWindow::showDynamicsError ( const char *  errMsg  )  [slot]

Changes the state of the dynamics button back to its off state and puts up an alert message box warning of a error occurring in the dynamics.

Definition at line 1100 of file mainWindow.cpp.

void MainWindow::stereoFlip (  )  [slot]

Definition at line 934 of file mainWindow.cpp.

void MainWindow::stereoOff (  )  [slot]

Definition at line 916 of file mainWindow.cpp.

void MainWindow::stereoOn (  )  [slot]

Definition at line 889 of file mainWindow.cpp.

void MainWindow::TendonForceInput_valueChanged ( int  f  )  [slot]

Definition at line 1315 of file mainWindow.cpp.

void MainWindow::tendonNamesBoxActivated ( int  i  )  [slot]

Definition at line 1321 of file mainWindow.cpp.

void MainWindow::tendonVisibleCheckBox_toggled ( bool  vis  )  [slot]

Definition at line 1333 of file mainWindow.cpp.

void MainWindow::toggleDynamics (  )  [slot]

Toggles the state of the dynamics. If dynamics are now paused it redraws and lists the last dynamic contact forces. If dynamics have just been started or resumed, it clears the contact forces list.

Definition at line 1055 of file mainWindow.cpp.

void MainWindow::updateCollisionAction ( bool  state  )  [slot]

Updates the state of the collisions button.

Definition at line 1237 of file mainWindow.cpp.

void MainWindow::updateContactsList (  )  [slot]

Gets the current contacts from each of the graspable bodies in the worlds, and adds the dynamic contact force acting at each one to the contact force list. The force is listed as 3 values specifying the local x and y tangential forces (relative to the contact frame) and the z normal force.

Definition at line 987 of file mainWindow.cpp.

void MainWindow::updateElementMenu (  )  [slot]

Enables items in the element menu based on how many world elements are selected. Also sets the state of the toggleCollisions action based on which elements are selected.

Definition at line 553 of file mainWindow.cpp.

void MainWindow::updateGraspBoxes (  )  [slot]

This repopulates the current hand and grasped object combo boxes and sets the correct selection for each.

Definition at line 1175 of file mainWindow.cpp.

void MainWindow::updateGraspMenu (  )  [slot]

Enables items in the grasp menu based on whether a current hand can be found or not.

Definition at line 595 of file mainWindow.cpp.

void MainWindow::updateMaterialBox (  )  [slot]

Whenever a new body is selected, this show that body's material as the currently selected material in the combo box. If more that one body is selected and they have different materials, a blank material is shown.

Definition at line 1151 of file mainWindow.cpp.

void MainWindow::updateMaterialBoxList (  )  [slot]

Clears the combo box of materials and repopulates it with the current material names defined for this world.

Definition at line 1127 of file mainWindow.cpp.

void MainWindow::updateQualityList (  )  [slot]

Clears the current list of quality mesure results and goes through the qm's of each grasp and writes out the latest results.

Definition at line 1073 of file mainWindow.cpp.

void MainWindow::updateTendonNamesBox (  )  [slot]

Definition at line 1351 of file mainWindow.cpp.

void MainWindow::updateTimeReadout (  )  [slot]

Gets the simulation time from the world and displays it in the main window.

Definition at line 1041 of file mainWindow.cpp.


Member Data Documentation

QString MainWindow::fileName [private]

Definition at line 60 of file mainWindow.h.

Definition at line 67 of file mainWindow.h.

Q3MainWindow* MainWindow::mWindow

Definition at line 68 of file mainWindow.h.

Definition at line 61 of file mainWindow.h.

Definition at line 59 of file mainWindow.h.


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


graspit
Author(s):
autogenerated on Wed Jan 25 11:00:22 2012