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 Project Download Mailing lists
|
orcaqgui2dfactory/ogmapelement.h00001 /* 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 OGMAPELEMENT_H 00012 #define OGMAPELEMENT_H 00013 00014 #include <orcaqgui2dfactory/ogmappainter.h> 00015 #include <orcaqguielementutil/icestormguielement2d.h> 00016 00017 namespace hydroqguielementutil { 00018 class MouseEventManager; 00019 class IHumanManager; 00020 } 00021 00022 namespace orcaqgui2d { 00023 00024 class OgMapElement 00025 : public orcaqguielementutil::IceStormGuiElement2d<OgMapPainter, 00026 orca::OgMapData, 00027 orca::OgMapPrx, 00028 orca::OgMapConsumer, 00029 orca::OgMapConsumerPrx> 00030 { 00031 00032 public: 00033 OgMapElement( const hydroqguielementutil::GuiElementInfo &guiElementInfo, 00034 const orcaice::Context &context ); 00035 00036 // from GuiElement 00037 virtual bool isInGlobalCS() { return true; } 00038 virtual QStringList contextMenu(); 00039 virtual void execute( int action ); 00040 00041 virtual void noLongerMouseEventReceiver(); 00042 virtual void mousePressEvent(QMouseEvent *e); 00043 virtual void mouseMoveEvent(QMouseEvent *e); 00044 virtual void mouseReleaseEvent(QMouseEvent *e); 00045 virtual void mouseDoubleClickEvent(QMouseEvent *e); 00046 00047 // context menu implementations 00048 void startPainting(); 00049 void stopPainting(); 00050 void saveMapAs(); 00051 void saveMap(); 00052 00053 private: 00054 OgMapPainter painter_; 00055 QString mapFileName_; 00056 bool mapFileNameSet_; 00057 bool ownMouseEvents_; 00058 }; 00059 00060 } 00061 00062 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)