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 PATHPAINTER_H
00012 #define PATHPAINTER_H
00013 
00014 #include <QColor>
00015 #include <hydroqguipath/pathutils.h>
00016 #include <hydroqguielementutil/definitions2d.h>
00017 #include <orca/pathplanner2d.h>
00018 
00019 // forward declarations
00020 class QPainter;
00021 
00022 namespace orcaqgui2d {
00023     
00024 class PathPainter
00025 {
00026 
00027   public:
00028     PathPainter();
00029     void initialize( bool displayWaypoints, 
00030                      bool displayPastWaypoints, 
00031                      bool displayFutureWaypoints, 
00032                      bool displayOlympicMarker, 
00033                      bool useTransparency);
00034     
00035     void setData( const orca::PathFollower2dData& path );
00036     
00037     void setData( const orca::PathPlanner2dData& path );
00038     
00039     void setWpIndex( int index );
00040     
00041     void setRelativeStartTime( double relativeStartTime );
00042     
00043     void paint( QPainter *p, int z );
00044     
00045     bool paintThisLayer(int z) const 
00046         { return z==hydroqguielementutil::Z_PATH; };
00047     
00048     void setUseTransparency( bool useTransparency ) 
00049         { useTransparency_= useTransparency; };
00050 
00051     void clear();
00052     
00053     void togglePastWaypoints()
00054         { displayPastWaypoints_ = !displayPastWaypoints_; }
00055     
00056     void toggleFutureWaypoints()
00057         { displayFutureWaypoints_ = !displayFutureWaypoints_; }    
00058     
00059     void toggleDisplayWaypoints()
00060         { displayWaypoints_ = !displayWaypoints_; }
00061 
00062     void setDisplayPastWaypoints( bool display )   
00063         { displayPastWaypoints_ = display; }
00064     
00065     void setDisplayFutureWaypoints( bool display ) 
00066         { displayFutureWaypoints_ = display; }
00067     
00068     void setDisplayWaypoints( bool display )       
00069         { displayWaypoints_ = display; }
00070     
00071     void toggleOlympicMarker()
00072         { displayOlympicMarker_ = !displayOlympicMarker_; }
00073 
00074     void setColor( QColor color ) 
00075         { color_ = color; };
00076     
00077     void setFocus( bool inFocus ) 
00078         { inFocus_  = inFocus; };
00079     
00080     const hydroqguipath::GuiPath &currentPath() const 
00081         { return guiPath_; }; 
00082     
00083   private:
00084 
00085     hydroqguipath::GuiPath guiPath_;
00086 
00087     // The index of the waypoint we're currently pursuing
00088     int wpIndex_;
00089 
00090     // toggle states
00091     bool displayWaypoints_;
00092     bool displayPastWaypoints_;
00093     bool displayFutureWaypoints_;
00094     bool displayOlympicMarker_;
00095     bool useTransparency_;
00096     
00097     QColor color_;
00098     bool inFocus_;
00099     
00100     double relativeStartTime_;
00101     
00102     gbxiceutilacfr::Timer olympicMarkerTimer_;
00103 
00104 };
00105 
00106 }
00107 
00108 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5