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: eigenGraspDlg.h,v 1.4 2009/03/30 20:42:12 cmatei Exp $ 00023 // 00024 //###################################################################### 00025 00026 #ifndef _eigengraspdlg_h_ 00027 #define _eigengraspdlg_h_ 00028 00029 #include "ui_eigenGraspDlg.h" 00030 00031 #include <QHBoxLayout> 00032 #include <QLabel> 00033 #include <QVBoxLayout> 00034 #include <QDialog> 00035 #include <vector> 00036 00037 class Hand; 00038 class EigenGraspInterface; 00039 class World; 00040 class QLabel; 00041 class QScrollBar; 00042 class QCheckBox; 00043 class QVBoxLayout; 00044 00046 00074 class EigenGraspDlg : public QDialog, public Ui::EigenGraspDlgUI 00075 { 00076 Q_OBJECT 00077 private: 00079 int SLIDER_STEPS; 00081 double mSliderConversion; 00083 int mNumberGrasps; 00084 00085 double *mLegalAmplitudes; 00087 Hand* mHand; 00089 EigenGraspInterface* mEigenGrasps; 00091 World *mWorld; 00092 00094 QDialog *mSlave; 00095 std::vector<QLabel*> mValueList; 00096 std::vector<QScrollBar*> mBarList; 00097 std::vector<QCheckBox*> mCheckList; 00098 QVBoxLayout *mainLayout; 00099 00100 void init(); 00101 void destroy(); 00103 void resetSlave(); 00105 void setSlaveLayout( int nGrasps ); 00106 00108 void adjustSliders(); 00110 void setAmplitudes(double *amp); 00111 00113 void goToOrigin(); 00114 public: 00115 EigenGraspDlg(QWidget *parent = 0) : QDialog(parent) { 00116 setupUi(this); 00117 init(); 00118 } 00119 ~EigenGraspDlg(){destroy();} 00120 int setWorld( World *w ); 00121 00122 public slots: 00123 void eigenGraspChanged(); 00124 void fixBoxChanged(); 00125 void saveButton_clicked(); 00126 void loadButton_clicked(); 00127 void identityButton_clicked(); 00128 void exitButton_clicked(); 00129 void show(); 00131 void handConfigurationChanged(); 00133 void setOriginButton_clicked(); 00135 void rigidCheckBox_clicked(); 00137 void closeHandButton_clicked(); 00138 void goToOriginButton_clicked(); 00139 }; 00140 00141 #endif