Salome HOME
Sorting alphabetically.
[modules/hydro.git] / src / HYDROData / HYDROData_Domain.h
1
2 #ifndef HYDROData_Domain_HeaderFile
3 #define HYDROData_Domain_HeaderFile
4
5 #include <HYDROData_Object.h>
6
7 #include <TopoDS_Face.hxx>
8
9 #include <QPointF>
10 #include <QList>
11
12 class Handle(HYDROData_Bathymetry);
13
14 DEFINE_STANDARD_HANDLE(HYDROData_Domain, HYDROData_Object)
15
16
17 /**\class HYDROData_Domain
18  * \brief Class that stores/retreives information about the 2d surface.
19  */
20 class HYDROData_Domain : public HYDROData_Object
21 {
22
23 protected:
24   /**
25    * Enumeration of tags corresponding to the persistent object parameters.
26    */
27   enum DataTag
28   {
29     DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
30     DataTag_Bathymetry,   ///< reference bathymetries
31     DataTag_FillingColor, ///< filling color of zone
32     DataTag_BorderColor,  ///< border color of zone
33   };
34
35 public:
36   DEFINE_STANDARD_RTTI(HYDROData_Domain);
37
38   /**
39    * Returns the kind of this object. Must be redefined in all objects of known type.
40    */
41   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const = 0;
42
43   /**
44    * Dump object to Python script representation.
45    */
46   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
47
48
49   /**
50    * Returns default filling color for new zone.
51    */
52   HYDRODATA_EXPORT static QColor DefaultFillingColor();
53
54   /**
55    * Sets filling color for zone.
56    */
57   HYDRODATA_EXPORT virtual void SetFillingColor( const QColor& theColor );
58
59   /**
60    * Returns filling color of zone.
61    */
62   HYDRODATA_EXPORT virtual QColor GetFillingColor() const;
63
64
65   /**
66    * Returns default border color for new zone.
67    */
68   HYDRODATA_EXPORT static QColor DefaultBorderColor();
69
70   /**
71    * Sets border color for zone.
72    */
73   HYDRODATA_EXPORT virtual void SetBorderColor( const QColor& theColor );
74
75   /**
76    * Returns border color of zone.
77    */
78   HYDRODATA_EXPORT virtual QColor GetBorderColor() const;
79
80
81   /**
82    * Returns number of bathymetry objects for zone.
83    */
84   HYDRODATA_EXPORT virtual int NbBathymetries() const;
85
86   /**
87    * Add reference bathymetry object for zone.
88    */
89   HYDRODATA_EXPORT virtual void AddBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
90
91   /**
92    * Change reference bathymetry object with given index for zone.
93    */
94   HYDRODATA_EXPORT virtual void SetBathymetry( const int                           theIndex,
95                                                const Handle(HYDROData_Bathymetry)& theBathymetry );
96
97   /**
98    * Returns reference bathymetry object of zone by it index.
99    */
100   HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetBathymetry( const int theIndex ) const;
101
102   /**
103    * Returns list of all reference bathymetry objects of zone.
104    */
105   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects  GetBathymetries() const;
106
107   /**
108    * Clear list of bathymetry objects of zone.
109    */
110   HYDRODATA_EXPORT virtual void RemoveBathymetries();
111
112   /**
113    * Returns data of object wrapped to QVariant.
114    * Reimplemented to wrap and return saved 2d polyline.
115    */
116   //HYDRODATA_EXPORT virtual QVariant GetDataVariant();
117
118   /**
119    * Returns the shape of the the object.
120    */
121   HYDRODATA_EXPORT virtual TopoDS_Face Face() const = 0;
122
123 protected:
124
125   friend class HYDROData_Iterator;
126
127   /**
128    * Creates new object in the internal data structure. Use higher level objects 
129    * to create objects with real content.
130    */
131   HYDROData_Domain();
132
133   /**
134    * Destructs properties of the object and object itself, removes it from the document.
135    */
136   ~HYDROData_Domain();
137
138   /**
139    * Returns id for creation of object in python scripting.
140    */
141   virtual QString getPythonKindId() const = 0;
142 };
143
144 #endif