1 // Copyright (C) 2014-2015 EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "HYDROData_Channel.h"
23 class HYDROData_Channel : public HYDROData_ArtificialObject
26 #include "HYDROData_Channel.h"
29 %ConvertToSubClassCode
30 // HYDROData_Channel sub-classes provide a unique kind ID.
31 switch ( sipCpp->GetKind() )
34 sipClass = sipClass_HYDROData_Digue;
38 sipClass = sipClass_HYDROData_ArtificialObject;
42 // We don't recognise the type.
49 * Returns default filling color for new channel.
51 virtual QColor DefaultFillingColor() const;
54 * Returns default border color for new channel.
56 virtual QColor DefaultBorderColor() const;
60 // Public methods to work with Channel
63 * Sets reference guide line object for channel.
65 bool SetGuideLine( HYDROData_Polyline3D theGuideLine )
66 [bool ( const opencascade::handle<HYDROData_Polyline3D>& )];
68 Handle(HYDROData_Polyline3D) aRef =
69 Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
72 Py_BEGIN_ALLOW_THREADS
73 sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetGuideLine( aRef ):
74 sipCpp->SetGuideLine( aRef );
80 * Returns reference guide line object of channel.
82 HYDROData_Polyline3D GetGuideLine() const
83 [opencascade::handle<HYDROData_Polyline3D> ()];
85 Handle(HYDROData_Polyline3D) aRef;
87 Py_BEGIN_ALLOW_THREADS
88 aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetGuideLine() :
89 sipCpp->GetGuideLine();
92 sipRes = (HYDROData_Polyline3D*)createPointer( aRef );
96 * Remove reference guide line object from channel.
98 void RemoveGuideLine();
102 * Sets reference profile object for channel.
104 bool SetProfile( HYDROData_Profile theProfile )
105 [bool ( const opencascade::handle<HYDROData_Profile>& )];
107 Handle(HYDROData_Profile) aRef =
108 Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
109 if ( !aRef.IsNull() )
111 Py_BEGIN_ALLOW_THREADS
112 sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetProfile( aRef ):
113 sipCpp->SetProfile( aRef );
119 * Returns reference profile object of channel.
121 HYDROData_Profile GetProfile() const
122 [opencascade::handle<HYDROData_Profile> ()];
124 Handle(HYDROData_Profile) aRef;
126 Py_BEGIN_ALLOW_THREADS
127 aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetProfile() :
128 sipCpp->GetProfile();
131 sipRes = (HYDROData_Profile*)createPointer( aRef );
135 * Remove reference profile object from channel.
137 void RemoveProfile();
139 void SetEquiDistance( double );
140 double GetEquiDistance() const;
145 * Creates new object in the internal data structure. Use higher level objects
146 * to create objects with real content.
151 * Destructs properties of the object and object itself, removes it from the document.
153 virtual ~HYDROData_Channel();