DBaseDlg Class Reference

#include <dbaseDlg.h>

Inheritance diagram for DBaseDlg:
Inheritance graph
[legend]

List of all members.

Public Slots

void classChanged ()
void connectButton_clicked ()
 Button events.
void createGWSButton_clicked ()
void exitButton_clicked ()
void graspTypeChanged ()
void loadGraspButton_clicked ()
void loadModelButton_clicked ()
void modelChanged ()
 Trigger events.
void nextGraspButton_clicked ()
void plannerButton_clicked ()
void previousGraspButton_clicked ()
void showMarkers ()
void sortButton_clicked ()

Public Member Functions

 DBaseDlg (QWidget *parent=0)
 ~DBaseDlg ()

Private Member Functions

template<class vectorType , class treatAsType >
void deleteVectorElements (std::vector< vectorType > &)
 Helper function that deletes the previously loaded grasps/models.
void destroy ()
 Also destroys the model scene.
void displayGraspTypeList (std::vector< std::string >)
 Populates the drop-down box with types of grasps in CGDB.
void displayModelList ()
 Populates the drop-down box with names of objects retrieved from DBMgr.
void getModelList ()
 Gets the model list and other data from the database and displays it.
void init ()
 Gets the current manager from the GraspitGUI. If one exists, it also queries for models.
void initializeGraspInfo ()
 Helper function that sets grasp's information texts to default.
void nextGrasp ()
 Shows the next grasp.
void previousGrasp ()
 Shows the previous grasp.
void showGrasp (int i)
 Shows the i-th grasp.
void updateGraspInfo ()
 Updates the related labels in the UI.

Private Attributes

bool inModelConstruction
 Helper variable to disable the modelChanged trigger.
int mCurrentFrame
 An index for the current grasp shown on the screen.
GraspitDBModelmCurrentLoadedModel
 The last model from the dbase that has been added to the Graspit world.
db_planner::DatabaseManagermDBMgr
 The mgr that all connections to the dbase have to go through.
std::vector< db_planner::Grasp * > mGraspList
 A list of grasps for a dbase model, retrieved from the DBMgr.
std::vector< db_planner::Model * > mModelList
 The list of models available in the dbase, as retrieved by the DBMgr.
std::map< std::string, int > mModelMap
 The map from model name to model index in mModelList.
QGraphicsScene * mModelScene
 Widget for displaying thumbnails.

Detailed Description

The DBaseDlg serves three purposes: first, it initializes the connection to the dbase by creating a DBMgr. Second, it serves a DBase browser, allowing the user to load dbase models into the GraspIt world and see grasps on them. Third, it will be used to start the DBase planner and pass it the DBMgr.

Definition at line 52 of file dbaseDlg.h.


Constructor & Destructor Documentation

DBaseDlg::DBaseDlg ( QWidget *  parent = 0  )  [inline]

Definition at line 98 of file dbaseDlg.h.

DBaseDlg::~DBaseDlg (  )  [inline]

Definition at line 120 of file dbaseDlg.h.


Member Function Documentation

void DBaseDlg::classChanged (  )  [slot]

Definition at line 450 of file dbaseDlg.cpp.

void DBaseDlg::connectButton_clicked (  )  [slot]

Button events.

Deletes the old connection to the database and creates a new one based on the current settings in the dialog box. The new connection is then set as the one an only Database Manager that the rest of GraspIt had acces to.

After connecting, it also reads the model list form the database and displays it.

Definition at line 146 of file dbaseDlg.cpp.

void DBaseDlg::createGWSButton_clicked (  )  [slot]

Definition at line 378 of file dbaseDlg.cpp.

template<class vectorType , class treatAsType >
void DBaseDlg::deleteVectorElements ( std::vector< vectorType > &  v  )  [inline, private]

Helper function that deletes the previously loaded grasps/models.

Definition at line 571 of file dbaseDlg.cpp.

void DBaseDlg::destroy (  )  [private]

Also destroys the model scene.

Definition at line 85 of file dbaseDlg.cpp.

void DBaseDlg::displayGraspTypeList ( std::vector< std::string >  list  )  [private]

Populates the drop-down box with types of grasps in CGDB.

Definition at line 478 of file dbaseDlg.cpp.

void DBaseDlg::displayModelList (  )  [private]

Populates the drop-down box with names of objects retrieved from DBMgr.

Definition at line 463 of file dbaseDlg.cpp.

void DBaseDlg::exitButton_clicked (  )  [slot]

Definition at line 92 of file dbaseDlg.cpp.

void DBaseDlg::getModelList (  )  [private]

Gets the model list and other data from the database and displays it.

Definition at line 110 of file dbaseDlg.cpp.

void DBaseDlg::graspTypeChanged (  )  [slot]

Definition at line 444 of file dbaseDlg.cpp.

void DBaseDlg::init (  )  [private]

Gets the current manager from the GraspitGUI. If one exists, it also queries for models.

Initializes the dialog and also gets the one and only manager from the GraspitGUI. If this manager is already set, it also loads the model list from the database and initializes it.

Definition at line 69 of file dbaseDlg.cpp.

void DBaseDlg::initializeGraspInfo (  )  [private]

Helper function that sets grasp's information texts to default.

Definition at line 563 of file dbaseDlg.cpp.

void DBaseDlg::loadGraspButton_clicked (  )  [slot]

Definition at line 185 of file dbaseDlg.cpp.

void DBaseDlg::loadModelButton_clicked (  )  [slot]

Definition at line 236 of file dbaseDlg.cpp.

void DBaseDlg::modelChanged (  )  [slot]

Trigger events.

Definition at line 383 of file dbaseDlg.cpp.

void DBaseDlg::nextGrasp (  )  [private]

Shows the next grasp.

Definition at line 525 of file dbaseDlg.cpp.

void DBaseDlg::nextGraspButton_clicked (  )  [slot]

Definition at line 282 of file dbaseDlg.cpp.

void DBaseDlg::plannerButton_clicked (  )  [slot]

Definition at line 292 of file dbaseDlg.cpp.

void DBaseDlg::previousGrasp (  )  [private]

Shows the previous grasp.

Definition at line 533 of file dbaseDlg.cpp.

void DBaseDlg::previousGraspButton_clicked (  )  [slot]

Definition at line 287 of file dbaseDlg.cpp.

void DBaseDlg::showGrasp ( int  i  )  [private]

Shows the i-th grasp.

Definition at line 487 of file dbaseDlg.cpp.

void DBaseDlg::showMarkers (  )  [slot]

Definition at line 404 of file dbaseDlg.cpp.

void DBaseDlg::sortButton_clicked (  )  [slot]

Definition at line 339 of file dbaseDlg.cpp.

void DBaseDlg::updateGraspInfo (  )  [private]

Updates the related labels in the UI.

Definition at line 541 of file dbaseDlg.cpp.


Member Data Documentation

Helper variable to disable the modelChanged trigger.

Definition at line 71 of file dbaseDlg.h.

int DBaseDlg::mCurrentFrame [private]

An index for the current grasp shown on the screen.

Definition at line 69 of file dbaseDlg.h.

The last model from the dbase that has been added to the Graspit world.

Definition at line 57 of file dbaseDlg.h.

The mgr that all connections to the dbase have to go through.

Definition at line 61 of file dbaseDlg.h.

std::vector<db_planner::Grasp*> DBaseDlg::mGraspList [private]

A list of grasps for a dbase model, retrieved from the DBMgr.

Definition at line 67 of file dbaseDlg.h.

std::vector<db_planner::Model*> DBaseDlg::mModelList [private]

The list of models available in the dbase, as retrieved by the DBMgr.

Definition at line 63 of file dbaseDlg.h.

std::map<std::string, int> DBaseDlg::mModelMap [private]

The map from model name to model index in mModelList.

Definition at line 65 of file dbaseDlg.h.

QGraphicsScene* DBaseDlg::mModelScene [private]

Widget for displaying thumbnails.

Definition at line 59 of file dbaseDlg.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:20 2012