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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

orcaqgui2dfactory/featuremap2dpainter.h

00001 /*
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 QORC_FEATUREMAP2D_PAINTER_H
00012 #define QORC_FEATUREMAP2D_PAINTER_H
00013 
00014 
00015 #include <qcolor.h>
00016 #include <orca/featuremap2d.h>
00017 #include <hydroqguielementutil/definitions2d.h>
00018 
00019 // forward declarations
00020 class QPainter;
00021 
00022 namespace hydroqguielementutil {
00023     class IHumanManager;
00024 };
00025 
00026 namespace orcaqgui2d {
00027     
00028     
00029 class FeatureMap2dPainter
00030 {
00031   public:
00032     FeatureMap2dPainter();
00033 
00034     void setData( const orca::FeatureMap2dData &featureData );
00035     void paint( QPainter *p, int z );
00036     bool paintThisLayer(int z) const {return z==hydroqguielementutil::Z_SLAM_MAP;}
00037     void setUseTransparency( bool useTransparency ) { useTransparency_= useTransparency; };
00038 
00039     void clear() {}
00040     
00041     void toggleFeatureNumbers() { displayFeatureNumbers_ = !displayFeatureNumbers_; }
00042     void toggleUncertainty() { displayUncertainty_ = !displayUncertainty_; }
00043     void toggleDisplay() { isDisplay_ = !isDisplay_; }
00044     void toggleFlashing() { isFlashing_ = !isFlashing_; }
00045     
00046     int saveMap( const QString fileName, hydroqguielementutil::IHumanManager *humanManager ) const;
00047 
00048   private:
00049 
00050     void 
00051     paintPointFeature( QPainter *painter, 
00052                        int featureType,
00053                        int featureNum,
00054                        double probExists,
00055                        double centreX,
00056                        double centreY,
00057                        double covXX,
00058                        double covXY,
00059                        double covYY );
00060 
00061     void paintPointFeature( QPainter *painter,
00062                             const orca::CartesianPointFeature2d &f,
00063                             int featureNum );
00064     void  paintPoseFeature( QPainter *painter, 
00065                             const orca::CartesianPoseFeature2d &f,
00066                             int featureNum );
00067     void paintLineFeature(  QPainter *painter,
00068                             const orca::CartesianLineFeature2d  &f,
00069                             int featureNum );
00070 
00071     orca::FeatureMap2dData data_;
00072     bool useTransparency_;
00073     bool displayFeatureNumbers_;
00074     bool displayUncertainty_;
00075     bool isDisplay_;
00076     bool isFlashing_;
00077     bool isFlashOn_;
00078 };
00079 
00080 }
00081 
00082 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5