00001 #ifndef MAINWINDOW_H 00002 #define MAINWINDOW_H 00003 00004 #include <QMainWindow> 00005 #include "GLWindow.h" 00006 00007 namespace Ui { 00008 class MainWindow; 00009 } 00010 00011 class MainWindow : public QMainWindow 00012 { 00013 Q_OBJECT 00014 00015 public: 00016 //---------------------------------------------------------------------------------------------------------------------- 00019 //---------------------------------------------------------------------------------------------------------------------- 00020 explicit MainWindow(QWidget *parent = 0); 00021 //---------------------------------------------------------------------------------------------------------------------- 00023 //---------------------------------------------------------------------------------------------------------------------- 00024 ~MainWindow(); 00025 00026 //---------------------------------------------------------------------------------------------------------------------- 00028 //---------------------------------------------------------------------------------------------------------------------- 00029 void setActiveMass(); 00030 00031 private: 00032 //---------------------------------------------------------------------------------------------------------------------- 00034 //---------------------------------------------------------------------------------------------------------------------- 00035 Ui::MainWindow *m_ui; 00036 //---------------------------------------------------------------------------------------------------------------------- 00038 //---------------------------------------------------------------------------------------------------------------------- 00039 GLWindow *m_gl; 00040 //---------------------------------------------------------------------------------------------------------------------- 00042 //---------------------------------------------------------------------------------------------------------------------- 00043 void SetDefaultGUIValues(); 00044 00045 void UpdateAllConstraints(); 00046 00047 private slots : 00048 //---------------------------------------------------------------------------------------------------------------------- 00050 //---------------------------------------------------------------------------------------------------------------------- 00051 void toggleSim(bool _s); 00052 public slots: 00053 //---------------------------------------------------------------------------------------------------------------------- 00055 //---------------------------------------------------------------------------------------------------------------------- 00056 void resetCloth(); 00057 00058 //---------------------------------------------------------------------------------------------------------------------- 00060 //---------------------------------------------------------------------------------------------------------------------- 00061 void setConstraintPoint1(bool checked); 00062 00063 //---------------------------------------------------------------------------------------------------------------------- 00065 //---------------------------------------------------------------------------------------------------------------------- 00066 void setConstraintPoint3(bool checked); 00067 00068 //---------------------------------------------------------------------------------------------------------------------- 00070 //---------------------------------------------------------------------------------------------------------------------- 00071 void setConstraintPoint4(bool checked); 00072 //---------------------------------------------------------------------------------------------------------------------- 00074 //---------------------------------------------------------------------------------------------------------------------- 00075 void setConstraintPoint2(bool checked); 00076 00077 //---------------------------------------------------------------------------------------------------------------------- 00079 //---------------------------------------------------------------------------------------------------------------------- 00080 void setConstraintPoint1(int _value); 00081 00082 //---------------------------------------------------------------------------------------------------------------------- 00084 //---------------------------------------------------------------------------------------------------------------------- 00085 void setConstraintPoint3(int _value); 00086 00087 //---------------------------------------------------------------------------------------------------------------------- 00089 //---------------------------------------------------------------------------------------------------------------------- 00090 void setConstraintPoint4(int _value); 00091 //---------------------------------------------------------------------------------------------------------------------- 00093 //---------------------------------------------------------------------------------------------------------------------- 00094 void setConstraintPoint2(int _value); 00095 00098 void CurrentObjectChanged(QString _currentObject); 00099 00102 void CurrentClothChanged(QString _currentCloth); 00103 00105 void deleteSelection( ); 00106 00108 void clearAll(); 00109 00111 void convertToCloth(); 00112 00113 00114 //---------------------------------------------------------------------------------------------------------------------- 00116 //---------------------------------------------------------------------------------------------------------------------- 00117 void loadFile(); 00118 00119 00120 //---------------------------------------------------------------------------------------------------------------------- 00122 //---------------------------------------------------------------------------------------------------------------------- 00123 void loadAnimation(); 00124 00125 //---------------------------------------------------------------------------------------------------------------------- 00127 //---------------------------------------------------------------------------------------------------------------------- 00128 void reset(); 00129 00130 00131 }; 00132 00133 #endif // MAINWINDOW_H