2 #ifndef HYDROData_Object_HeaderFile
3 #define HYDROData_Object_HeaderFile
5 #include <HYDROData_Entity.h>
9 DEFINE_STANDARD_HANDLE(HYDROData_Object, HYDROData_Entity)
11 class Handle(HYDROData_Bathymetry);
13 /**\class HYDROData_Object
14 * \brief The base class for all geometrical objects in the HYDRO module.
17 class HYDROData_Object : public HYDROData_Entity
21 * Enumeration of tags corresponding to the persistent object parameters.
25 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
28 DataTag_Bathymetry, ///< reference bathymetry
29 DataTag_FillingColor, ///< filling color of geometrical object
30 DataTag_BorderColor ///< border color of geometrical object
34 DEFINE_STANDARD_RTTI(HYDROData_Object);
37 * Sets the top(2d projection) shape of the object.
39 HYDRODATA_EXPORT virtual void SetTopShape( const TopoDS_Shape& theShape );
42 * Returns the top shape of the object.
44 HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const = 0;
47 * Sets the 3d shape of the object.
49 HYDRODATA_EXPORT virtual void SetShape3D( const TopoDS_Shape& theShape );
52 * Returns the 3d shape of the object.
54 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const = 0;
58 * Set reference bathymetry object for geometry object.
60 HYDRODATA_EXPORT virtual void SetBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
63 * Returns reference bathymetry object of geometry object.
65 HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetBathymetry() const;
68 * Clear the reference bathymetry object for geometry object.
70 HYDRODATA_EXPORT virtual void RemoveBathymetry();
73 * Sets filling color for object.
75 HYDRODATA_EXPORT virtual void SetFillingColor( const QColor& theColor );
78 * Returns filling color of object.
80 HYDRODATA_EXPORT virtual QColor GetFillingColor() const;
83 * Sets border color for object.
85 HYDRODATA_EXPORT virtual void SetBorderColor( const QColor& theColor );
88 * Returns border color of object.
90 HYDRODATA_EXPORT virtual QColor GetBorderColor() const;
93 * Returns default filling color for new object.
95 HYDRODATA_EXPORT static QColor DefaultFillingColor();
98 * Returns default border color for new object.
100 HYDRODATA_EXPORT static QColor DefaultBorderColor();
105 * Creates new object in the internal data structure. Use higher level objects
106 * to create objects with real content.
108 HYDRODATA_EXPORT HYDROData_Object();
111 * Destructs properties of the object and object itself, removes it from the document.
113 virtual HYDRODATA_EXPORT ~HYDROData_Object();
118 * Retrieve the top shape of the object from data label.
120 HYDRODATA_EXPORT TopoDS_Shape getTopShape() const;
123 * Removes the top shape from data label of the object.
125 HYDRODATA_EXPORT void removeTopShape();
129 * Retrieve the 3d shape of the object from data label.
131 HYDRODATA_EXPORT TopoDS_Shape getShape3D() const;
134 * Removes the 3d shape from data label of the object.
136 HYDRODATA_EXPORT void removeShape3D();