2 #ifndef HYDROData_Zone_HeaderFile
3 #define HYDROData_Zone_HeaderFile
5 #include <HYDROData_Object.h>
8 #include <QPainterPath>
11 class Handle(HYDROData_Bathymetry);
12 class Handle(HYDROData_Polyline);
14 DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Object)
17 /**\class HYDROData_Zone
18 * \brief Class that stores/retreives information about the 2d face.
20 class HYDROData_Zone : public HYDROData_Object
25 * Enumeration of tags corresponding to the persistent object parameters.
29 DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
30 DataTag_Bathymetry, ///< reference bathymetries
31 DataTag_Polyline, ///< reference polyline
32 DataTag_Color ///< color of zone
36 DEFINE_STANDARD_RTTI(HYDROData_Zone);
39 * Returns the kind of this object. Must be redefined in all objects of known type.
41 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_ZONE;}
44 * Dump object to Python script representation.
46 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
50 * Sets color for zone.
52 HYDRODATA_EXPORT virtual void SetColor( const QColor& theColor );
55 * Returns color of zone.
57 HYDRODATA_EXPORT virtual QColor GetColor() const;
61 * Sets reference polyline object for zone.
63 HYDRODATA_EXPORT virtual void SetPolyline( const Handle(HYDROData_Polyline)& thePolyline );
66 * Returns reference polyline object of zone.
68 HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetPolyline() const;
71 * Remove reference polyline object of zone.
73 HYDRODATA_EXPORT virtual void RemovePolyline();
77 * Returns number of bathymetry objects for zone.
79 HYDRODATA_EXPORT virtual int NbBathymetries() const;
82 * Add reference bathymetry object for zone.
84 HYDRODATA_EXPORT virtual void AddBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
87 * Change reference bathymetry object with given index for zone.
89 HYDRODATA_EXPORT virtual void SetBathymetry( const int theIndex,
90 const Handle(HYDROData_Bathymetry)& theBathymetry );
93 * Returns reference bathymetry object of zone by it index.
95 HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetBathymetry( const int theIndex ) const;
98 * Returns list of all reference bathymetry objects of zone.
100 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetBathymetries() const;
103 * Clear list of bathymetry objects of zone.
105 HYDRODATA_EXPORT virtual void RemoveBathymetries();
108 * Returns data of object wrapped to QVariant.
109 * Reimplemented to wrap and return saved 2d polyline.
111 //HYDRODATA_EXPORT virtual QVariant GetDataVariant();
114 * Returns the painter path. The painter path is construct by polyline
116 HYDRODATA_EXPORT QPainterPath GetPainterPath() const;
121 friend class HYDROData_Iterator;
124 * Creates new object in the internal data structure. Use higher level objects
125 * to create objects with real content.
130 * Destructs properties of the object and object itself, removes it from the document.