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
|
ogmapscombinedelement.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 OGMAPS_COMBINED_ELEMENT_H 00012 #define OGMAPS_COMBINED_ELEMENT_H 00013 00014 #include <vector> 00015 #include <orcaqguielementutil/icestormlistener.h> 00016 #include <hydroqguielementutil/guielement2d.h> 00017 #include <orcaqgui2dfactory/connectutils.h> 00018 #include <orcaqgui2dfactory/ogmapscombinedpainter.h> 00019 00020 namespace orcaqgui2d { 00021 00022 // A GuiElement which can combine several (at the moment two) ogmaps 00023 // Subscribes to several (at the moment two) OgMap interfaces 00024 // Author: Tobias Kaupp 00025 class OgMapsCombinedElement : public hydroqguielementutil::GuiElement2d 00026 { 00027 00028 public: 00029 OgMapsCombinedElement( const orcaice::Context &context, 00030 const QStringList &proxyStrList); 00031 00032 // inherited from guielement 00033 void update(); 00034 bool needToUpdate(); 00035 void paint( QPainter *p, int z ) 00036 { painter_->paint( p, z ); }; 00037 bool paintThisLayer( int z ) const 00038 { return painter_->paintThisLayer(z); } 00039 00040 virtual bool isInGlobalCS() { return true; } 00041 virtual void actionOnConnection(); 00042 virtual QStringList contextMenu(); 00043 virtual void execute( int action ); 00044 00045 private: 00046 orcaice::Context context_; 00047 std::vector<orcaqguielementutil::IceStormListener< 00048 orca::OgMapData, 00049 orca::OgMapPrx, 00050 orca::OgMapConsumer, 00051 orca::OgMapConsumerPrx>* > listeners_; 00052 OgMapsCombinedPainter* painter_; 00053 bool isConnected_; 00054 }; 00055 00056 } 00057 00058 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)