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_FillingColor, ///< filling color of zone
33 DataTag_BorderColor, ///< border color of zone
37 DEFINE_STANDARD_RTTI(HYDROData_Zone);
40 * Returns the kind of this object. Must be redefined in all objects of known type.
42 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_ZONE;}
45 * Dump object to Python script representation.
47 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
51 * Returns default filling color for new zone.
53 HYDRODATA_EXPORT static QColor DefaultFillingColor();
56 * Sets filling color for zone.
58 HYDRODATA_EXPORT virtual void SetFillingColor( const QColor& theColor );
61 * Returns filling color of zone.
63 HYDRODATA_EXPORT virtual QColor GetFillingColor() const;
67 * Returns default border color for new zone.
69 HYDRODATA_EXPORT static QColor DefaultBorderColor();
72 * Sets border color for zone.
74 HYDRODATA_EXPORT virtual void SetBorderColor( const QColor& theColor );
77 * Returns border color of zone.
79 HYDRODATA_EXPORT virtual QColor GetBorderColor() const;
83 * Sets reference polyline object for zone.
85 HYDRODATA_EXPORT virtual void SetPolyline( const Handle(HYDROData_Polyline)& thePolyline );
88 * Returns reference polyline object of zone.
90 HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetPolyline() const;
93 * Remove reference polyline object of zone.
95 HYDRODATA_EXPORT virtual void RemovePolyline();
99 * Returns number of bathymetry objects for zone.
101 HYDRODATA_EXPORT virtual int NbBathymetries() const;
104 * Add reference bathymetry object for zone.
106 HYDRODATA_EXPORT virtual void AddBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
109 * Change reference bathymetry object with given index for zone.
111 HYDRODATA_EXPORT virtual void SetBathymetry( const int theIndex,
112 const Handle(HYDROData_Bathymetry)& theBathymetry );
115 * Returns reference bathymetry object of zone by it index.
117 HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetBathymetry( const int theIndex ) const;
120 * Returns list of all reference bathymetry objects of zone.
122 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetBathymetries() const;
125 * Clear list of bathymetry objects of zone.
127 HYDRODATA_EXPORT virtual void RemoveBathymetries();
130 * Returns data of object wrapped to QVariant.
131 * Reimplemented to wrap and return saved 2d polyline.
133 //HYDRODATA_EXPORT virtual QVariant GetDataVariant();
136 * Returns the painter path. The painter path is construct by polyline
138 HYDRODATA_EXPORT QPainterPath GetPainterPath() const;
143 friend class HYDROData_Iterator;
146 * Creates new object in the internal data structure. Use higher level objects
147 * to create objects with real content.
152 * Destructs properties of the object and object itself, removes it from the document.