INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
pathdesignscreen.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp 00005 * 00006 * This copy of Orca is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef ORCA_PATH_INPUT_H 00012 #define ORCA_PATH_INPUT_H 00013 00014 #include <QMatrix> 00015 #include <hydroqguipath/pathutils.h> 00016 00017 class QPainter; 00018 class QMouseEvent; 00019 00020 namespace hydroqguielementutil { 00021 class IHumanManager; 00022 } 00023 00024 namespace hydroqguipath { 00025 00031 class PathDesignScreen 00032 { 00033 public: 00034 00035 PathDesignScreen( GuiPath &guiPath, 00036 WaypointSettings *wpSettings, 00037 hydroqguielementutil::IHumanManager &humanManager ); 00038 00039 void paint( QPainter *painter ); 00040 00041 void setUseTransparency( bool useTransparency ) 00042 { useTransparency_=useTransparency; }; 00043 00044 void processPressEvent( QMouseEvent* e); 00045 void processReleaseEvent( QMouseEvent* e ); 00046 00047 void updateWpSettings( WaypointSettings* wpSettings ); 00048 void setWaypointFocus( int waypointId ); 00049 00050 void updateMaxApproachSpeedSetting( double maxApproachSpeed ) { wpSettings_->maxApproachSpeed = maxApproachSpeed; }; 00051 void updateDistToleranceSettingSetting( double distTolerance ) { wpSettings_->distanceTolerance = distTolerance; }; 00052 00053 // Return the time it takes to complete a loop given the current path 00054 // (last waypoint to first waypoint of path) 00055 float secondsToCompleteLoop() const; 00056 00057 00058 private: 00059 00060 GuiPath &guiPath_; 00061 WaypointSettings *wpSettings_; 00062 hydroqguielementutil::IHumanManager &humanManager_; 00063 00064 QMatrix wmInv_; // win2mm matrix 00065 00066 bool useTransparency_; 00067 00068 void addWaypoint( QPointF ); 00069 void removeWaypoint( QPointF ); 00070 void changeWpParameters( QPointF ); 00071 void resizeData( int index ); 00072 00073 QPointF mouseDownPnt_; 00074 QPointF mouseUpPnt_; 00075 00076 int waypointInFocus_; 00077 00078 }; 00079 00080 } // namespace 00081 00082 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)