Salome HOME
The region object has been added for HYDRO data model.
[modules/hydro.git] / src / HYDROData / HYDROData_Zone.h
1
2 #ifndef HYDROData_Zone_HeaderFile
3 #define HYDROData_Zone_HeaderFile
4
5 #include <HYDROData_Domain.h>
6
7 #include <QPainterPath>
8 class Handle(HYDROData_Polyline);
9
10 DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Domain)
11
12
13 /**\class HYDROData_Zone
14  * \brief Class that stores/retreives information about the 2d face.
15  */
16 class HYDROData_Zone : public HYDROData_Domain
17 {
18
19 protected:
20   /**
21    * Enumeration of tags corresponding to the persistent object parameters.
22    */
23   enum DataTag
24   {
25     DataTag_First = HYDROData_Domain::DataTag_First + 100, ///< first tag, to reserve
26     DataTag_Polyline,     ///< reference polyline
27   };
28
29 public:
30   DEFINE_STANDARD_RTTI(HYDROData_Zone);
31
32   /**
33    * Returns the kind of this object. Must be redefined in all objects of known type.
34    */
35   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_ZONE; }
36
37   /**
38    * Dump object to Python script representation.
39    */
40   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
41
42
43   /**
44    * Sets reference polyline object for zone.
45    */
46   HYDRODATA_EXPORT virtual void SetPolyline( const Handle(HYDROData_Polyline)& thePolyline );
47
48   /**
49    * Returns reference polyline object of zone.
50    */
51   HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetPolyline() const;
52
53   /**
54    * Remove reference polyline object of zone.
55    */
56   HYDRODATA_EXPORT virtual void RemovePolyline();
57
58
59   /**
60    * Returns data of object wrapped to QVariant.
61    * Reimplemented to wrap and return saved 2d polyline.
62    */
63   //HYDRODATA_EXPORT virtual QVariant GetDataVariant();
64
65   /**
66    * Returns the painter path. The painter path is construct by polyline
67    */
68   HYDRODATA_EXPORT QPainterPath GetPainterPath() const;
69
70
71 protected:
72
73   friend class HYDROData_Iterator;
74
75   /**
76    * Creates new object in the internal data structure. Use higher level objects 
77    * to create objects with real content.
78    */
79   HYDROData_Zone();
80
81   /**
82    * Destructs properties of the object and object itself, removes it from the document.
83    */
84   ~HYDROData_Zone();
85
86   /**
87    * Returns id for creation of object in python scripting.
88    */
89   virtual QString getPythonKindId() const;
90 };
91
92 #endif