![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2010 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 ********************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: .h,v $ $Revision: 1.2 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef RegionData_H_ 00010 #define RegionData_H_ 00011 00012 #include <map> 00013 #include <string> 00014 class QGraphicsRectItem; 00015 00016 // Class with all information on a single region 00017 class DdmRegion 00018 { 00019 public: 00020 00021 DdmRegion(); 00022 virtual ~DdmRegion(); 00023 00024 // Get and set range bounds 00025 int xLowerBound() const; 00026 void setXLowerBound(int newXLowerBound); 00027 int xUpperBound() const; 00028 void setXUpperBound(int newXUpperBound); 00029 int yLowerBound() const; 00030 void setYLowerBound(int newYLowerBound); 00031 int yUpperBound() const; 00032 void setYUpperBound(int newYUpperBound); 00033 void setRangeBounds(int newXLowerBound, int newYLowerBound, 00034 int newXUpperBound, int newYUpperBound); 00035 00036 // If true, region will be deleted by the GUI at the next update 00037 bool isMarkedForDeletion() const; 00038 void markForDeletion(bool mark); 00039 00040 // Unique region ID (based on HLA region handle) 00041 // Implemented by protocol specific derived classes 00042 virtual const std::wstring& id() const = 0; 00043 00044 // Pointer to the Qt item for this ball 00045 QGraphicsRectItem* graphicsItem(); 00046 void setGraphicsItem(QGraphicsRectItem* item); 00047 00048 protected: 00049 00050 QGraphicsRectItem* myGraphicsItem; 00051 int myXLowerBound; 00052 int myXUpperBound; 00053 int myYLowerBound; 00054 int myYUpperBound; 00055 bool myMarkedForDeletion; 00056 }; 00057 00058 // Map of IDs to regions 00059 typedef std::map<std::wstring, DdmRegion*> DdmRegionMap; 00060 00061 #endif