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
|
ipathinput.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 IPATH_INPUT_H 00012 #define IPATH_INPUT_H 00013 00014 #include <memory> 00015 #include "pathutils.h" 00016 00017 class QMouseEvent; 00018 class QPainter; 00019 00020 namespace hydroqguielementutil { 00021 class IHumanManager; 00022 } 00023 00024 namespace orca { 00025 class PathFollower2dData; 00026 } 00027 00028 namespace hydroqguipath { 00029 00030 class WaypointSettings; 00031 class PathFollowerUserInteraction; 00032 00038 class IPathInput 00039 { 00040 00041 public: 00042 virtual ~IPathInput() {}; 00043 00044 // painting 00045 virtual void paint( QPainter *painter ) = 0; 00046 virtual void setUseTransparency( bool useTransparency ) = 0; 00047 00048 // mouse events 00049 virtual void processPressEvent( QMouseEvent* e) = 0; 00050 virtual void processReleaseEvent( QMouseEvent* e ) = 0; 00051 virtual void processDoubleClickEvent( QMouseEvent* e) = 0; 00052 virtual void processMoveEvent( QMouseEvent* e) = 0; 00053 00054 virtual void updateWpSettings( WaypointSettings* wpSettings ) = 0; 00055 00056 // save and load paths 00057 virtual void savePath() = 0; 00058 virtual void loadPath() = 0; 00059 virtual void loadPreviousPath() = 0; 00060 00061 // send and cancel path 00062 virtual void sendPath() = 0; 00063 virtual void cancelPath() = 0; 00064 virtual void setWaypointFocus( int waypointId ) = 0; 00065 00066 // get the gui path 00067 virtual void getPath( hydroqguipath::GuiPath &guiPath, int &numLoops, float &timeOffset ) const = 0; 00068 00069 }; 00070 00071 class IPathUserInteraction 00072 { 00073 public: 00074 virtual ~IPathUserInteraction() {}; 00075 virtual void send() = 0; 00076 virtual void cancel() = 0; 00077 virtual void saveUserPath( const hydroqguipath::GuiPath &guiPath, 00078 int numLoops = 1, 00079 float timeOffset = 0.0 ) = 0; 00080 virtual void loadUserPath(hydroqguipath::GuiPath &guiPath) = 0; 00081 virtual void loadPreviousUserPath(hydroqguipath::GuiPath &guiPath) = 0; 00082 }; 00083 00089 class PathInputFactory 00090 { 00091 00092 public: 00093 00094 virtual std::auto_ptr<IPathInput> 00095 createPathInput( IPathUserInteraction *pathUI, 00096 WaypointSettings *wpSettings, 00097 hydroqguielementutil::IHumanManager &humanManager 00098 ) const = 0; 00099 00100 virtual ~PathInputFactory() {} 00101 }; 00102 00103 00104 00105 } 00106 00107 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)