TaskTrajectory.h

Go to the documentation of this file.
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_TaskTrajectory_H
00025 #define GUI_TASKVIEW_TaskTrajectory_H
00026 
00027 #include <Base/UnitsApi.h>
00028 
00029 
00030 #include <Gui/TaskView/TaskView.h>
00031 #include <Gui/Selection.h>
00032 
00033 #include <Mod/Robot/App/RobotObject.h>
00034 #include <Mod/Robot/App/Robot6Axis.h>
00035 #include <Mod/Robot/App/TrajectoryObject.h>
00036 #include <Mod/Robot/App/Trajectory.h>
00037 #include <Mod/Robot/App/Simulation.h>
00038 
00039 #include "ViewProviderRobotObject.h"
00040 
00041 
00042 class Ui_TaskTrajectory;
00043 
00044 namespace App {
00045 class Property;
00046 }
00047 
00048 namespace Gui {
00049 class ViewProvider;
00050 }
00051 
00052 namespace RobotGui { 
00053 
00054 
00055 
00056 class TaskTrajectory : public Gui::TaskView::TaskBox
00057 {
00058     Q_OBJECT
00059 
00060 public:
00061     TaskTrajectory(Robot::RobotObject *pcRobotObject,Robot::TrajectoryObject *pcTrajectoryObject,QWidget *parent = 0);
00062     ~TaskTrajectory();
00064     void OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
00065                   Gui::SelectionSingleton::MessageType Reason);
00066 
00067 private Q_SLOTS:
00068     void start(void);
00069     void stop(void);
00070     void run(void);
00071     void back(void);
00072     void forward(void);
00073     void end(void);
00074 
00075     void timerDone(void);
00076     void valueChanged ( int value );
00077     void valueChanged ( double d );
00078 
00079 Q_SIGNALS:
00080     void axisChanged(float A1,float A2,float A3,float A4,float A5,float A6,const Base::Placement &Tcp);
00081 
00082 protected:
00083     void setTo(void);
00084     void viewTool(const Base::Placement pos);
00085 
00086     QTimer *timer;
00087 
00088     Robot::Simulation sim;
00089     Robot::RobotObject *pcRobot;
00090     ViewProviderRobotObject *ViewProv;
00091 
00092     bool Run;
00093     bool block;
00094 
00095     float timePos;
00096     float duration;
00097 
00098 private:
00099     QWidget* proxy;
00100     Ui_TaskTrajectory* ui;
00101 };
00102 
00103 } //namespace PartDesignGui
00104 
00105 #endif // GUI_TASKVIEW_TASKAPPERANCE_H

Generated on Wed Nov 23 19:00:44 2011 for FreeCAD by  doxygen 1.6.1