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 Project Download Mailing lists
|
ogmappainter.h00001 /* 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 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 ICE_STREAM, 00026 NOT_SUPPORTED 00027 } ImageFileType; 00028 00029 class OgMapPainter 00030 { 00031 00032 public: 00033 OgMapPainter(); 00034 ~OgMapPainter(); 00035 00036 void paint( QPainter *p, int z ); 00037 bool paintThisLayer( int z ) const { return z==hydroqguielementutil::Z_OG_MAP; } 00038 00039 // Give the PixmapPainter the data relevant for painting 00040 void setData( const orca::OgMapData& data ); 00041 00042 void clear() {}; 00043 void toggleDisplayMap() { pixmapPainter_->toggleDisplayMap(); }; 00044 00045 int saveMap( const orcaice::Context &context, 00046 const QString &fileName, 00047 hydroqguielementutil::IHumanManager *humanManager ); 00048 00049 private: 00050 00051 orca::OgMapData data_; 00052 PixmapPainter *pixmapPainter_; 00053 ImageFileType checkFileExtension( QString &fe, hydroqguielementutil::IHumanManager *humanManager ); 00054 }; 00055 00056 } // namespace 00057 00058 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)