|
orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca 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-2008 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 const QString &lastSavedPathFile ); 00038 00039 virtual ~PathFollowerInput() {}; 00040 00041 virtual void paint( QPainter *painter ); 00042 virtual void setUseTransparency( bool useTransparency ); 00043 00044 virtual void processPressEvent( QMouseEvent* e); 00045 virtual void processReleaseEvent( QMouseEvent* e ); 00046 virtual void processDoubleClickEvent( QMouseEvent* e) {}; 00047 virtual void processMoveEvent( QMouseEvent* e) {}; 00048 00049 virtual void updateWpSettings( hydroqguipath::WaypointSettings* wpSettings ); 00050 00051 virtual void savePath( const QString &filename ); 00052 virtual void loadPath( const QString &filename ); 00053 virtual void loadPreviousPath(); 00054 00055 virtual void sendPath(); 00056 virtual void cancelPath(); 00057 00058 virtual void setWaypointFocus( int waypointId ); 00059 00060 virtual bool getPath( orca::PathFollower2dData &pathData ) const; 00061 00062 private: 00063 00064 hydroqguipath::IPathUserInteraction *pathUI_; 00065 std::auto_ptr<hydroqguipath::PathDesignScreen> pathDesignScreen_; 00066 std::auto_ptr<hydroqguipath::PathDesignTableWidget> pathDesignTableWidget_; 00067 std::auto_ptr<hydroqguipath::GuiPath> guiPath_; 00068 std::auto_ptr<PathFileHandler> pathFileHandler_; 00069 00070 }; 00071 00075 class PathFollowerInputFactory : public hydroqguipath::PathInputFactory 00076 { 00077 public: 00078 00079 virtual std::auto_ptr<hydroqguipath::IPathInput> 00080 createPathInput( hydroqguipath::IPathUserInteraction *pathUI, 00081 hydroqguipath::WaypointSettings *wpSettings, 00082 hydroqguielementutil::IHumanManager &humanManager, 00083 const QString &lastSavedPathFile ) const 00084 { 00085 std::auto_ptr<hydroqguipath::IPathInput> input; 00086 input.reset( new PathFollowerInput( pathUI, wpSettings, humanManager, lastSavedPathFile ) ); 00087 return input; 00088 } 00089 00090 virtual ~PathFollowerInputFactory() {} 00091 }; 00092 00093 } 00094 00095 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5