00001 //###################################################################### 00002 // 00003 // GraspIt! 00004 // Copyright (C) 2002-2009 Columbia University in the City of New York. 00005 // All rights reserved. 00006 // 00007 // GraspIt! is free software: you can redistribute it and/or modify 00008 // it under the terms of the GNU General Public License as published by 00009 // the Free Software Foundation, either version 3 of the License, or 00010 // (at your option) any later version. 00011 // 00012 // GraspIt! is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with GraspIt!. If not, see <http://www.gnu.org/licenses/>. 00019 // 00020 // Author(s): Matei T. Ciocarlie 00021 // 00022 // $Id: egPlannerDlg.h,v 1.5 2009/05/07 19:59:21 cmatei Exp $ 00023 // 00024 //###################################################################### 00025 00026 #ifndef _egplannerdlg_h_ 00027 #define _egplannerdlg_h_ 00028 00029 #include <QDialog> 00030 00031 #include "ui_egPlannerDlg.h" 00032 00033 #include <vector> 00034 00035 class QGridLayout; 00036 class QCheckBox; 00037 class QVBoxLayout; 00038 class QCheckBox; 00039 class QLabel; 00040 class QHBoxLayout; 00041 class QSlider; 00042 class QLabel; 00043 00044 class GraspPlanningState; 00045 class GraspableBody; 00046 class Hand; 00047 class EGPlanner; 00048 00054 class EigenGraspPlannerDlg : public QDialog, public Ui::EigenGraspPlannerDlgUI 00055 { 00056 Q_OBJECT 00057 private: 00058 QGridLayout *varGridLayout; 00059 QVBoxLayout *varMainLayout; 00060 std::vector<QCheckBox*> varInput; 00061 std::vector<QCheckBox*> varCheck; 00062 std::vector<QLabel*> varNames; 00063 std::vector<QHBoxLayout*> varLayouts; 00064 std::vector<QSlider*> varConfidence; 00065 std::vector<QLabel*> varTarget; 00066 00067 GraspPlanningState *mHandObjectState; 00068 GraspableBody *mObject; 00069 Hand *mHand; 00070 int mDisplayState; 00071 EGPlanner *mPlanner; 00072 00073 void init(); 00074 void destroy(); 00075 void setVariableLayout(); 00076 void updateVariableLayout(); 00077 void updateInputLayout(); 00078 void readPlannerSettings(); 00079 void startPlanner(); 00080 void stopPlanner(); 00081 00082 public: 00083 EigenGraspPlannerDlg(QWidget *parent = 0) : QDialog(parent) { 00084 setupUi(this); 00085 init(); 00086 } 00087 ~EigenGraspPlannerDlg(){destroy();} 00088 00089 public slots: 00090 void exitButton_clicked(); 00091 void setMembers( Hand *h, GraspableBody *b ); 00092 void variableInputChanged(); 00093 void variableCheckBoxChanged(); 00094 void spaceSearchBox_activated( const QString &s ); 00095 void prevGraspButton_clicked(); 00096 void bestGraspButton_clicked(); 00097 void nextGraspButton_clicked(); 00098 void plannerUpdate(); 00099 void updateResults(bool render); 00100 void updateStatus(); 00101 void energyBox_activated( const QString & ); 00102 void setContactsBox_toggled( bool checked); 00103 void plannerComplete(); 00104 void plannerInit_clicked(); 00105 void plannerReset_clicked(); 00106 void plannerStart_clicked(); 00107 void plannerTypeBox_activated( const QString & ); 00108 void autoGraspBox_clicked(); 00109 void onlinePlannerUpdate(); 00110 void onlineGraspButton_clicked(); 00111 void onlineReleaseButton_clicked(); 00112 void onlinePlanButton_clicked(); 00113 void instantEnergyButton_clicked(); 00114 void showCloneBox_toggled( bool c); 00115 void showSolutionBox_toggled( bool c); 00116 void useVirtualHandBox_clicked(); 00117 void useRealBarrettBox_toggled( bool s); 00118 void inputGloveBox_toggled( bool on); 00119 void inputLoadButton_clicked(); 00120 }; 00121 00122 #endif