X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Object.cxx;h=4bc6d2354210af352f73574a91b167bf5a593699;hb=deed826b2d6c39ba2ed410108cdf54d64cded321;hp=ee54ec62e3dc52805eb4a832ef155be8b92d0962;hpb=84f8b4a57d3cdad820bc1333a5066699cd1c8ae3;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Object.cxx b/src/HYDROData/HYDROData_Object.cxx index ee54ec62..4bc6d235 100644 --- a/src/HYDROData/HYDROData_Object.cxx +++ b/src/HYDROData/HYDROData_Object.cxx @@ -1,11 +1,15 @@ #include "HYDROData_Object.h" +#include "HYDROData_Bathymetry.h" + #include #include #include +#include + IMPLEMENT_STANDARD_HANDLE(HYDROData_Object,HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Object,HYDROData_Entity) @@ -30,6 +34,22 @@ void HYDROData_Object::SetShape3D( const TopoDS_Shape& theShape ) aBuilder.Generated( theShape ); } +void HYDROData_Object::SetBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry ) +{ + SetReferenceObject( theBathymetry, DataTag_Bathymetry ); +} + +Handle(HYDROData_Bathymetry) HYDROData_Object::GetBathymetry() const +{ + return Handle(HYDROData_Bathymetry)::DownCast( + GetReferenceObject( DataTag_Bathymetry ) ); +} + +void HYDROData_Object::RemoveBathymetry() +{ + ClearReferenceObjects( DataTag_Bathymetry ); +} + TopoDS_Shape HYDROData_Object::getTopShape() const { Handle(TNaming_NamedShape) aNamedShape; @@ -46,3 +66,32 @@ TopoDS_Shape HYDROData_Object::getShape3D() const return TopoDS_Shape(); } +void HYDROData_Object::SetFillingColor( const QColor& theColor ) +{ + return SetColor( theColor, DataTag_FillingColor ); +} + +QColor HYDROData_Object::GetFillingColor() const +{ + return GetColor( DefaultFillingColor(), DataTag_FillingColor ); +} + +void HYDROData_Object::SetBorderColor( const QColor& theColor ) +{ + return SetColor( theColor, DataTag_BorderColor ); +} + +QColor HYDROData_Object::GetBorderColor() const +{ + return GetColor( DefaultBorderColor(), DataTag_BorderColor ); +} + +QColor HYDROData_Object::DefaultFillingColor() +{ + return QColor( Qt::yellow ); +} + +QColor HYDROData_Object::DefaultBorderColor() +{ + return QColor( Qt::transparent ); +} \ No newline at end of file