1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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, or (at your option) any later version.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 #include "HYDROData_Channel.h"
27 class HYDROData_Channel : public HYDROData_ArtificialObject
30 #include "HYDROData_Channel.h"
33 %ConvertToSubClassCode
34 // HYDROData_Channel sub-classes provide a unique kind ID.
35 switch ( sipCpp->GetKind() )
38 sipClass = sipClass_HYDROData_Digue;
42 sipClass = sipClass_HYDROData_ArtificialObject;
46 // We don't recognise the type.
53 * Returns default filling color for new channel.
55 static QColor DefaultFillingColor();
58 * Returns default border color for new channel.
60 static QColor DefaultBorderColor();
64 // Public methods to work with Channel
67 * Sets reference guide line object for channel.
69 bool SetGuideLine( HYDROData_Polyline3D theGuideLine )
70 [bool ( const Handle_HYDROData_Polyline3D& )];
72 Handle(HYDROData_Polyline3D) aRef =
73 Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
76 Py_BEGIN_ALLOW_THREADS
77 sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetGuideLine( aRef ):
78 sipCpp->SetGuideLine( aRef );
84 * Returns reference guide line object of channel.
86 HYDROData_Polyline3D GetGuideLine() const
87 [Handle_HYDROData_Polyline3D ()];
89 Handle(HYDROData_Polyline3D) aRef;
91 Py_BEGIN_ALLOW_THREADS
92 aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetGuideLine() :
93 sipCpp->GetGuideLine();
96 sipRes = (HYDROData_Polyline3D*)createPointer( aRef );
100 * Remove reference guide line object from channel.
102 void RemoveGuideLine();
106 * Sets reference profile object for channel.
108 bool SetProfile( HYDROData_Profile theProfile )
109 [bool ( const Handle_HYDROData_Profile& )];
111 Handle(HYDROData_Profile) aRef =
112 Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
113 if ( !aRef.IsNull() )
115 Py_BEGIN_ALLOW_THREADS
116 sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetProfile( aRef ):
117 sipCpp->SetProfile( aRef );
123 * Returns reference profile object of channel.
125 HYDROData_Profile GetProfile() const
126 [Handle_HYDROData_Profile ()];
128 Handle(HYDROData_Profile) aRef;
130 Py_BEGIN_ALLOW_THREADS
131 aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetProfile() :
132 sipCpp->GetProfile();
135 sipRes = (HYDROData_Profile*)createPointer( aRef );
139 * Remove reference profile object from channel.
141 void RemoveProfile();
147 * Creates new object in the internal data structure. Use higher level objects
148 * to create objects with real content.
153 * Destructs properties of the object and object itself, removes it from the document.
155 virtual ~HYDROData_Channel();