Salome HOME
The data model has been rolled back to previous version.
[modules/hydro.git] / src / HYDROData / HYDROData_Object.cxx
index ee54ec62e3dc52805eb4a832ef155be8b92d0962..4bc6d2354210af352f73574a91b167bf5a593699 100644 (file)
@@ -1,11 +1,15 @@
 
 #include "HYDROData_Object.h"
 
+#include "HYDROData_Bathymetry.h"
+
 #include <TNaming_Builder.hxx>
 #include <TNaming_NamedShape.hxx>
 
 #include <TopoDS_Shape.hxx>
 
+#include <QColor>
+
 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