00001 /*************************************************************************** 00002 * Copyright (c) 2009 Jürgen Riegel <juergen.riegel@web.de> * 00003 * * 00004 * This file is part of the FreeCAD CAx development system. * 00005 * * 00006 * This library is free software; you can redistribute it and/or * 00007 * modify it under the terms of the GNU Library General Public * 00008 * License as published by the Free Software Foundation; either * 00009 * version 2 of the License, or (at your option) any later version. * 00010 * * 00011 * This library is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU Library General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU Library General Public * 00017 * License along with this library; see the file COPYING.LIB. If not, * 00018 * write to the Free Software Foundation, Inc., 59 Temple Place, * 00019 * Suite 330, Boston, MA 02111-1307, USA * 00020 * * 00021 ***************************************************************************/ 00022 00023 00024 #ifndef GUI_TASKVIEW_TrajectorySimulate_H 00025 #define GUI_TASKVIEW_TrajectorySimulate_H 00026 00027 00028 #include <QDialog> 00029 #include "ui_TrajectorySimulate.h" 00030 00031 #include <Mod/Robot/App/RobotObject.h> 00032 #include <Mod/Robot/App/Robot6Axis.h> 00033 #include <Mod/Robot/App/TrajectoryObject.h> 00034 #include <Mod/Robot/App/Trajectory.h> 00035 #include <Mod/Robot/App/Simulation.h> 00036 00037 #include "ViewProviderRobotObject.h" 00038 00039 00040 namespace RobotGui { 00041 00042 00043 00044 class TrajectorySimulate : public QDialog, public Ui_DlgTrajectorySimulate 00045 { 00046 Q_OBJECT 00047 00048 public: 00049 TrajectorySimulate(Robot::RobotObject *pcRobotObject,Robot::TrajectoryObject *pcTrajectoryObject,QWidget *parent = 0); 00050 ~TrajectorySimulate(); 00051 00052 private Q_SLOTS: 00053 void start(void); 00054 void stop(void); 00055 void run(void); 00056 void back(void); 00057 void forward(void); 00058 void end(void); 00059 00060 void timerDone(void); 00061 void valueChanged ( int value ); 00062 void valueChanged ( double d ); 00063 00064 protected: 00065 void setTo(void); 00066 00067 QTimer *timer; 00068 00069 Robot::Simulation sim; 00070 00071 ViewProviderRobotObject *ViewProv; 00072 00073 bool Run; 00074 bool block; 00075 00076 float timePos; 00077 float duration; 00078 private: 00079 00080 }; 00081 00082 } //namespace PartDesignGui 00083 00084 #endif // GUI_TASKVIEW_TrajectorySimulate_H