Salome HOME
The region object has been added for HYDRO data model.
[modules/hydro.git] / src / HYDROPy / HYDROData_Zone.sip
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 %ExportedHeaderCode
24 #include <HYDROData_Zone.h>
25 %End
26
27 class HYDROData_Zone : HYDROData_Object
28 {
29
30 %TypeHeaderCode
31 #include <HYDROData_Zone.h>
32 %End
33
34 %ConvertToSubClassCode
35     if ( !Handle(HYDROData_Zone)::DownCast( sipCpp ).IsNull() )
36       sipClass = sipClass_HYDROData_Zone;
37     else
38       sipClass = NULL;
39 %End
40
41 public:
42
43   const ObjectKind          GetKind() const;
44
45 public:      
46
47   /**
48    * Sets filling color for zone.
49    */
50   void SetFillingColor( const QColor& theColor );
51
52   /**
53    * Returns filling color of zone.
54    */
55   QColor GetFillingColor() const;
56
57   /**
58    * Sets border color for zone.
59    */
60   void SetBorderColor( const QColor& theColor );
61
62   /**
63    * Returns border color of zone.
64    */
65   QColor GetBorderColor() const;
66
67   /**
68    * Sets reference polyline object for zone.
69    */
70   void SetPolyline( HYDROData_Polyline thePolyline ) [void (const Handle_HYDROData_Polyline&)];
71   %MethodCode
72
73     Handle(HYDROData_Polyline) aRefPolyline =
74       Handle(HYDROData_Polyline)::DownCast( createHandle( a0 ) );
75     if ( !aRefPolyline.IsNull() )
76     {
77       Py_BEGIN_ALLOW_THREADS
78       sipSelfWasArg ? sipCpp->HYDROData_Zone::SetPolyline( aRefPolyline ) : 
79                       sipCpp->SetPolyline( aRefPolyline );
80       Py_END_ALLOW_THREADS
81     }
82
83   %End
84
85   /**
86    * Returns reference polyline object of zone.
87    */
88   HYDROData_Polyline GetPolyline() const [Handle_HYDROData_Polyline ()];
89   %MethodCode
90
91     Handle(HYDROData_Polyline) aRefPolyline;
92     
93     Py_BEGIN_ALLOW_THREADS
94     aRefPolyline = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetPolyline() : 
95                                    sipCpp->GetPolyline();
96     Py_END_ALLOW_THREADS
97     
98     sipRes = (HYDROData_Polyline*)createPointer( aRefPolyline );
99   
100   %End
101
102   /**
103    * Remove reference polyline object of zone.
104    */
105   void RemovePolyline();
106
107   /**
108    * Returns number of bathymetry objects for zone.
109    */
110   int NbBathymetries() const;
111
112   /**
113    * Add reference bathymetry object for zone.
114    */
115   void AddBathymetry( HYDROData_Bathymetry theBathymetry ) [void (const Handle_HYDROData_Bathymetry&)];
116   %MethodCode
117
118     Handle(HYDROData_Bathymetry) aRefBath =
119       Handle(HYDROData_Bathymetry)::DownCast( createHandle( a0 ) );
120     if ( !aRefBath.IsNull() )
121     {
122       Py_BEGIN_ALLOW_THREADS
123       sipSelfWasArg ? sipCpp->HYDROData_Zone::AddBathymetry( aRefBath ) : 
124                       sipCpp->AddBathymetry( aRefBath );
125       Py_END_ALLOW_THREADS
126     }
127
128   %End
129
130   /**
131    * Change reference bathymetry object with given index for zone.
132    */
133   void SetBathymetry( const int            theIndex, 
134                       HYDROData_Bathymetry theBathymetry ) [void (const int, const Handle_HYDROData_Bathymetry&)];
135   %MethodCode
136
137     Handle(HYDROData_Bathymetry) aRefBath =
138       Handle(HYDROData_Bathymetry)::DownCast( createHandle( a1 ) );
139     if ( !aRefBath.IsNull() )
140     {
141       Py_BEGIN_ALLOW_THREADS
142       sipSelfWasArg ? sipCpp->HYDROData_Zone::SetBathymetry( a0, aRefBath ) : 
143                       sipCpp->SetBathymetry( a0, aRefBath );
144       Py_END_ALLOW_THREADS
145     }
146
147   %End
148
149   /**
150    * Returns reference bathymetry object of zone by it index.
151    */
152   HYDROData_Bathymetry GetBathymetry( const int theIndex ) const [Handle_HYDROData_Bathymetry (const int)];
153   %MethodCode
154
155     Handle(HYDROData_Bathymetry) aRefBath;
156     
157     Py_BEGIN_ALLOW_THREADS
158     aRefBath = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetBathymetry( a0 ) : 
159                                sipCpp->GetBathymetry( a0 );
160     Py_END_ALLOW_THREADS
161     
162     sipRes = (HYDROData_Bathymetry*)createPointer( aRefBath );
163   
164   %End
165
166   /**
167    * Returns list of all reference bathymetry objects of zone.
168    */
169   //HYDROData_SequenceOfObjects GetBathymetries() const;
170
171   /**
172    * Clear list of bathymetry objects of zone.
173    */
174   void RemoveBathymetries();
175
176   /**
177    * Returns the painter path. The painter path is construct by polyline
178    */
179   QPainterPath GetPainterPath() const;
180
181 protected:
182
183   /**
184    * Creates new object in the internal data structure. Use higher level objects 
185    * to create objects with real content.
186    */
187   HYDROData_Zone();
188
189   /**
190    * Destructs properties of the object and object itself, removes it from the document.
191    */
192   ~HYDROData_Zone();
193 };
194
195