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
|
pathfollowerinput.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 PATHFOLLOWER_INPUT_H 00012 #define PATHFOLLOWER_INPUT_H 00013 00014 #include <hydroqguipath/pathdesignscreen.h> 00015 #include <hydroqguipath/pathdesigntablewidget.h> 00016 #include <hydroqguipath/ipathinput.h> 00017 #include <hydroqguipath/pathutils.h> 00018 #include <orcaqgui2dfactory/pathfilehandler.h> 00019 00020 namespace orcaqgui2d { 00021 00022 class PathFollowerUserInteraction; 00023 00030 class PathFollowerInput : public hydroqguipath::IPathInput 00031 { 00032 00033 public: 00034 PathFollowerInput( hydroqguipath::IPathUserInteraction *pathUI, 00035 hydroqguipath::WaypointSettings *wpSettings, 00036 hydroqguielementutil::IHumanManager &humanManager ); 00037 00038 virtual ~PathFollowerInput(); 00039 00040 virtual void paint( QPainter *painter ); 00041 virtual void setUseTransparency( bool useTransparency ); 00042 00043 virtual void processPressEvent( QMouseEvent* e); 00044 virtual void processReleaseEvent( QMouseEvent* e ); 00045 virtual void processDoubleClickEvent( QMouseEvent* e) {}; 00046 virtual void processMoveEvent( QMouseEvent* e) {}; 00047 00048 virtual void updateWpSettings( hydroqguipath::WaypointSettings* wpSettings ); 00049 00050 virtual void savePath(); 00051 virtual void loadPath(); 00052 virtual void loadPreviousPath(); 00053 00054 virtual void sendPath(); 00055 virtual void cancelPath(); 00056 00057 virtual void setWaypointFocus( int waypointId ); 00058 00059 virtual void getPath( hydroqguipath::GuiPath &guiPath, int &numLoops, float &timeOffset ) const; 00060 00061 private: 00062 00063 hydroqguipath::IPathUserInteraction *pathUI_; 00064 std::auto_ptr<hydroqguipath::PathDesignScreen> pathDesignScreen_; 00065 std::auto_ptr<hydroqguipath::PathDesignTableWidget> pathDesignTableWidget_; 00066 std::auto_ptr<hydroqguipath::GuiPath> guiPath_; 00067 00068 }; 00069 00073 class PathFollowerInputFactory : public hydroqguipath::PathInputFactory 00074 { 00075 public: 00076 00077 virtual std::auto_ptr<hydroqguipath::IPathInput> 00078 createPathInput( hydroqguipath::IPathUserInteraction *pathUI, 00079 hydroqguipath::WaypointSettings *wpSettings, 00080 hydroqguielementutil::IHumanManager &humanManager ) const 00081 { 00082 std::auto_ptr<hydroqguipath::IPathInput> input; 00083 input.reset( new PathFollowerInput( pathUI, wpSettings, humanManager ) ); 00084 return input; 00085 } 00086 00087 virtual ~PathFollowerInputFactory() {} 00088 }; 00089 00090 } 00091 00092 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)