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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

pathpainter.h

00001 /*
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 QORC_PATHPAINTER_H
00012 #define QORC_PATHPAINTER_H
00013 
00014 
00015 #include <QPolygon>
00016 #include <QColor>
00017 
00018 #include <orcaqgui2dfactory/pathinput.h>
00019 #include <hydroqguielementutil/definitions2d.h>
00020 
00021 // forward declarations
00022 class QPainter;
00023 
00024 namespace orcaqgui2d {
00025     
00026 class PathPainter
00027 {
00028 
00029   public:
00030     PathPainter();
00031     ~PathPainter();
00032     void initialize( bool displayWaypoints, bool displayPastWaypoints, bool displayFutureWaypoints, bool displayOlympicMarker, bool useTransparency);
00033     void setData( const orca::PathFollower2dData& path );
00034     void setData( const orca::PathPlanner2dData& path );
00035     void setWpIndex( int index );
00036     void setRelativeStartTime( double relativeStartTime );
00037     void paint( QPainter *p, int z );
00038     bool paintThisLayer(int z) const { return z==hydroqguielementutil::Z_PATH; };
00039     void setUseTransparency( bool useTransparency ) { useTransparency_= useTransparency; };
00040 
00041     void clear();
00042     void togglePastWaypoints()
00043         { displayPastWaypoints_ = !displayPastWaypoints_; }
00044     void toggleFutureWaypoints()
00045         { displayFutureWaypoints_ = !displayFutureWaypoints_; }    
00046     void toggleDisplayWaypoints()
00047         { displayWaypoints_ = !displayWaypoints_; }
00048 
00049     void setDisplayPastWaypoints( bool display )   { displayPastWaypoints_ = display; }
00050     void setDisplayFutureWaypoints( bool display ) { displayFutureWaypoints_ = display; }
00051     void setDisplayWaypoints( bool display )       { displayWaypoints_ = display; }
00052     
00053     void toggleOlympicMarker()
00054         { displayOlympicMarker_ = !displayOlympicMarker_; }
00055     
00056     void savePath( const QString fileName, hydroqguielementutil::IHumanManager *humanManager ) const;
00057     void setColor( QColor color ) { color_ = color; };
00058     void setFocus( bool inFocus ) { inFocus_  = inFocus; };
00059     
00060   private:
00061 
00062     GuiPath guiPath_;
00063 
00064     // The index of the waypoint we're currently pursuing
00065     int wpIndex_;
00066 
00067     // toggle states
00068     bool displayWaypoints_;
00069     bool displayPastWaypoints_;
00070     bool displayFutureWaypoints_;
00071     bool displayOlympicMarker_;
00072     bool useTransparency_;
00073     
00074     QColor color_;
00075     bool inFocus_;
00076     
00077     double relativeStartTime_;
00078 
00079 };
00080 
00081 }
00082 
00083 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5