Salome HOME
Minor change.
[modules/hydro.git] / src / HYDROData / HYDROData_Channel.h
1
2 #ifndef HYDROData_Channel_HeaderFile
3 #define HYDROData_Channel_HeaderFile
4
5 #include "HYDROData_ArtificialObject.h"
6
7 class Handle(HYDROData_Polyline3D);
8 class Handle(HYDROData_Profile);
9
10 DEFINE_STANDARD_HANDLE(HYDROData_Channel, HYDROData_ArtificialObject)
11
12 /**\class HYDROData_Channel
13  * \brief 
14  *
15  */
16 class HYDROData_Channel : public HYDROData_ArtificialObject
17 {
18 protected:
19   /**
20    * Enumeration of tags corresponding to the persistent object parameters.
21    */
22   enum DataTag
23   {
24     DataTag_First = HYDROData_ArtificialObject::DataTag_First + 100, ///< first tag, to reserve
25     DataTag_GuideLine, 
26     DataTag_Profile,
27   };
28
29 public:
30   DEFINE_STANDARD_RTTI(HYDROData_Channel);
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_CHANNEL;}
36
37   /**
38    * Dump object to Python script representation.
39    */
40   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
41
42   /**
43    * Returns the list of all reference objects of this object.
44    */
45   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
46
47   /**
48    * Returns the top shape of the object.
49    */
50   HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
51
52   /**
53    * Returns the 3d shape of the object.
54    */
55   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
56
57   /**
58    * Update the shape presentations of stream.
59    * Call this method whenever you made changes for channel data.
60    */
61   HYDRODATA_EXPORT virtual void Update();
62
63   /**
64    * Returns default filling color for new channel.
65    */
66   HYDRODATA_EXPORT static QColor DefaultFillingColor();
67
68   /**
69    * Returns default border color for new channel.
70    */
71   HYDRODATA_EXPORT static QColor DefaultBorderColor();
72
73
74 public:      
75   // Public methods to work with Channel
76   
77   /**
78    * Sets reference guide line object for channel.
79    */
80   HYDRODATA_EXPORT virtual bool SetGuideLine( const Handle(HYDROData_Polyline3D)& theGuideLine );
81
82   /**
83    * Returns reference guide line object of channel.
84    */
85   HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline3D) GetGuideLine() const;
86
87   /**
88    * Remove reference guide line object from channel.
89    */
90   HYDRODATA_EXPORT virtual void RemoveGuideLine();
91
92
93   /**
94    * Sets reference profile object for channel.
95    */
96   HYDRODATA_EXPORT virtual bool SetProfile( const Handle(HYDROData_Profile)& theProfile );
97
98   /**
99    * Returns reference profile object of channel.
100    */
101   HYDRODATA_EXPORT virtual Handle(HYDROData_Profile) GetProfile() const;
102
103   /**
104    * Remove reference profile object from channel.
105    */
106   HYDRODATA_EXPORT virtual void RemoveProfile();
107
108
109 protected:
110
111   /**
112    * Returns default filling color for new object.
113    */
114   HYDRODATA_EXPORT virtual QColor getDefaultFillingColor() const;
115
116   /**
117    * Returns default border color for new object.
118    */
119   HYDRODATA_EXPORT virtual QColor getDefaultBorderColor() const;
120
121 protected:
122
123   friend class HYDROData_Iterator;
124
125   /**
126    * Creates new object in the internal data structure. Use higher level objects 
127    * to create objects with real content.
128    */
129   HYDRODATA_EXPORT HYDROData_Channel();
130
131   /**
132    * Destructs properties of the object and object itself, removes it from the document.
133    */
134   virtual HYDRODATA_EXPORT ~HYDROData_Channel();
135 };
136
137 #endif