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): Andrew T. Miller 00021 // 00022 // $Id: settingsDlg.h,v 1.3 2009/04/21 14:53:09 cmatei Exp $ 00023 // 00024 //###################################################################### 00025 00026 #ifndef _settingsdlg_h_ 00027 #define _settingsdlg_h_ 00028 00033 #include "ui_settingsDlg.h" 00034 #include <QObject> 00035 #include <QDialog> 00036 00050 class SettingsDlg : public QObject 00051 { 00052 Q_OBJECT 00053 private: 00054 double currCOFVal, currKCOFVal; 00055 QDialog *dlgImpl; 00056 void init(); 00057 00058 private slots: 00059 void checkCOFEntry( int row, int col ); 00060 void saveCurrentCOF( int row, int col ); 00061 void saveCurrentKCOF( int row, int col ); 00062 void checkKCOFEntry( int row, int col ); 00063 void validateDlg(); 00064 00065 public: 00066 Ui::SettingsDlgUI *dlgUI; 00067 SettingsDlg(QWidget * parent = 0, Qt::WFlags f = 0){ 00068 dlgImpl = new QDialog(parent, f); 00069 dlgUI = new Ui::SettingsDlgUI; 00070 dlgUI->setupUi(dlgImpl); 00071 init(); 00072 } 00073 ~SettingsDlg(); 00074 int exec(){return dlgImpl->exec();} 00075 void setAttribute(Qt::WidgetAttribute attribute, bool on = true) { 00076 dlgImpl->setAttribute(attribute,on); 00077 }; 00078 00079 }; 00080 00081 #endif