X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_Object.sip;h=abe2d98498078952d577b4dfb8499ee902d4017e;hb=3a1dd3f29ff9b985b0aa2366a2afd5724286cb6e;hp=10119b102747edd0f7c7e3865debf2490bc66a6b;hpb=8543e637cbb4ae48998c596241fce567a729eb67;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_Object.sip b/src/HYDROPy/HYDROData_Object.sip index 10119b10..abe2d984 100644 --- a/src/HYDROPy/HYDROData_Object.sip +++ b/src/HYDROPy/HYDROData_Object.sip @@ -1,12 +1,8 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2014-2015 EDF-R&D // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,31 +20,56 @@ #include %End -class HYDROData_Object : HYDROData_Entity /Abstract/ +class HYDROData_Object : public HYDROData_Entity /Abstract/ { %TypeHeaderCode #include %End %ConvertToSubClassCode - if ( !Handle(HYDROData_ArtificialObject)::DownCast( sipCpp ).IsNull() ) - sipClass = sipClass_HYDROData_ArtificialObject; - else if ( !Handle(HYDROData_NaturalObject)::DownCast( sipCpp ).IsNull() ) - sipClass = sipClass_HYDROData_NaturalObject; - else - { - // HYDROData_Object sub-classes provide a unique kind ID. - switch ( sipCpp->GetKind() ) - { - case KIND_UNKNOWN: - sipClass = sipClass_HYDROData_Object; - break; - - default: - // We don't recognise the type. - sipClass = NULL; - } - } + // HYDROData_Object sub-classes provide a unique kind ID. + switch ( sipCpp->GetKind() ) + { + case KIND_OBSTACLE: + sipClass = sipClass_HYDROData_Obstacle; + break; + + case KIND_CONFLUENCE: + sipClass = sipClass_HYDROData_Confluence; + break; + + case KIND_IMMERSIBLE_ZONE: + sipClass = sipClass_HYDROData_ImmersibleZone; + break; + + case KIND_DIGUE: + sipClass = sipClass_HYDROData_Digue; + break; + + case KIND_CHANNEL: + sipClass = sipClass_HYDROData_Channel; + break; + + case KIND_POLYLINE: + sipClass = sipClass_HYDROData_Polyline3D; + break; + + case KIND_PROFILE: + sipClass = sipClass_HYDROData_Profile; + break; + + case KIND_STREAM: + sipClass = sipClass_HYDROData_Stream; + break; + + case KIND_UNKNOWN: + sipClass = sipClass_HYDROData_Entity; + break; + + default: + // We don't recognise the type. + sipClass = NULL; + } %End public: @@ -93,6 +114,68 @@ public: */ void RemoveAltitudeObject(); + /** + * Sets filling color for zone. + */ + virtual void SetFillingColor( const QColor& theColor ); + + /** + * Returns filling color of zone. + */ + virtual QColor GetFillingColor() const; + + /** + * Sets border color for zone. + */ + virtual void SetBorderColor( const QColor& theColor ); + + /** + * Returns border color of zone. + */ + virtual QColor GetBorderColor() const; + + + /** + * Returns sequence of object groups. + */ + HYDROData_SequenceOfObjects GetGroups() const; + + /** + * Returns group data model object by it id. + */ + HYDROData_ShapesGroup GetGroup( const int theGroupId ) const [Handle_HYDROData_ShapesGroup ()]; + %MethodCode + + Handle(HYDROData_ShapesGroup) aRefGroup; + + Py_BEGIN_ALLOW_THREADS + aRefGroup = sipSelfWasArg ? sipCpp->HYDROData_Object::GetGroup( a0 ) : + sipCpp->GetGroup( a0 ); + Py_END_ALLOW_THREADS + + sipRes = (HYDROData_ShapesGroup*)createPointer( aRefGroup ); + + %End + + /** + * Returns group id by data model object. + */ + int GetGroupId( HYDROData_ShapesGroup theGroup ) const [int (const Handle_HYDROData_ShapesGroup&)]; + %MethodCode + + Handle(HYDROData_ShapesGroup) aRefGroup = + Handle(HYDROData_ShapesGroup)::DownCast( createHandle( a0 ) ); + if ( !aRefGroup.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipRes = sipSelfWasArg ? sipCpp->HYDROData_Object::GetGroupId( aRefGroup ) : + sipCpp->GetGroupId( aRefGroup ); + Py_END_ALLOW_THREADS + } + + %End + + protected: /**