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/ogmappainter.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 ORCAGUI_OGMAP_PAINTER_H
00012 #define ORCAGUI_OGMAP_PAINTER_H
00013 
00014 #include <orca/ogmap.h>
00015 #include <orcaice/context.h>
00016 #include <hydroqguielementutil/definitions2d.h>
00017 #include <orcaqgui2dfactory/pixmappainter.h>
00018 
00019 namespace orcaqgui2d
00020 {
00021 
00022 typedef enum
00023 {
00024     BITMAP,
00025     NOT_SUPPORTED
00026 } ImageFileType;
00027 
00028 class OgMapPainter
00029 {
00030 public:
00031 
00032     void paint( QPainter *p, int z );
00033     bool paintThisLayer( int z ) const { return z==hydroqguielementutil::Z_OG_MAP; }
00034 
00035     // Give the PixmapPainter the data relevant for painting
00036     void setData( const orca::OgMapData& data );
00037 
00038     void clear() {};
00039     void toggleDisplayMap() { pixmapPainter_.toggleDisplayMap(); };
00040 
00041     int saveMap( const orcaice::Context   &context,
00042                  const QString            &fileName,
00043                  hydroqguielementutil::IHumanManager *humanManager );
00044 
00045     // paint on the pixmap
00046     void drawCircle ( const QPoint& center, qreal diameter );
00047 
00048 private:
00049 
00050     orca::OgMapType mapType_;
00051 
00052     // Keep a persistent pixmapData_ store so we only have to allocate it once
00053     // TODO: does pixmapPainter_ has 2 more copies of the same data?
00054     PixmapData    pixmapData_;
00055     PixmapPainter pixmapPainter_;
00056     ImageFileType checkFileExtension( QString &fe, hydroqguielementutil::IHumanManager *humanManager );
00057 };
00058 
00059 } // namespace
00060 
00061 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5