Salome HOME
LCM // Import/Export of SHP p.1
[modules/hydro.git] / src / HYDROData / HYDROData_Profile.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 2649e2b..217c49c
@@ -56,7 +56,7 @@ IMPLEMENT_STANDARD_HANDLE(HYDROData_Profile, HYDROData_Object)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Profile, HYDROData_Object)
 
 HYDROData_Profile::HYDROData_Profile()
-: HYDROData_Object()
+: HYDROData_Object( Geom_3d )
 {
 }
 
@@ -163,7 +163,7 @@ TopoDS_Shape HYDROData_Profile::GetTopShape() const
 
 TopoDS_Shape HYDROData_Profile::GetShape3D() const
 {
-  TopoDS_Shape aShape = getShape3D();
+  TopoDS_Shape aShape = HYDROData_Object::GetShape3D();
   if( aShape.IsNull() )
     aShape = CreateProfileWire( true );
   return aShape;
@@ -191,26 +191,16 @@ void HYDROData_Profile::Update()
   SetShape3D( aShape );
 }
 
-QColor HYDROData_Profile::DefaultFillingColor()
+QColor HYDROData_Profile::DefaultFillingColor() const
 {
   return QColor( Qt::transparent );
 }
 
-QColor HYDROData_Profile::DefaultBorderColor()
+QColor HYDROData_Profile::DefaultBorderColor() const
 {
   return QColor( Qt::black );
 }
 
-QColor HYDROData_Profile::getDefaultFillingColor() const
-{
-  return DefaultFillingColor();
-}
-
-QColor HYDROData_Profile::getDefaultBorderColor() const
-{
-  return DefaultBorderColor();
-}
-
 bool HYDROData_Profile::IsValid() const
 {
   gp_XY aFirstPoint, aLastPoint;
@@ -239,7 +229,7 @@ void HYDROData_Profile::SetLeftPoint( const gp_XY& theGPoint, bool IsConvertFrom
   anArray->SetValue( 0, aLPoint.X() );
   anArray->SetValue( 1, aLPoint.Y() );
 
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 bool HYDROData_Profile::GetLeftPoint( gp_XY& thePoint, bool IsConvertToGlobal,
@@ -291,7 +281,7 @@ void HYDROData_Profile::SetRightPoint( const gp_XY& theGPoint, bool IsConvertFro
   anArray->SetValue( 0, aLPoint.X() );
   anArray->SetValue( 1, aLPoint.Y() );
 
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 bool HYDROData_Profile::GetRightPoint( gp_XY& thePoint, bool IsConvertToGlobal,
@@ -336,7 +326,7 @@ void HYDROData_Profile::Invalidate()
   if ( !aLastLabel.IsNull() )
     aLastLabel.ForgetAllAttributes();
 
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 Handle(HYDROData_ProfileUZ) HYDROData_Profile::GetProfileUZ( const bool theIsCreate ) const
@@ -369,7 +359,7 @@ void HYDROData_Profile::RemovePoints()
   if ( !aProfileUZ.IsNull() )
   {
     aProfileUZ->RemoveSections();
-    SetToUpdate( true );
+    Changed( Geom_3d );
   }
 }
 
@@ -384,7 +374,7 @@ void HYDROData_Profile::SetParametricPoints( const HYDROData_ProfileUZ::PointsLi
     aProfileUZ->AddPoint( 0, aPoint );
   }
 
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 HYDROData_ProfileUZ::PointsList HYDROData_Profile::GetParametricPoints() const
@@ -537,7 +527,7 @@ int HYDROData_Profile::ImportFromFile( const Handle(HYDROData_Document)& theDoc,
 
     aProfile->SetFilePath( theFileName );
 
-    aProfile->SetBorderColor( HYDROData_Profile::DefaultBorderColor() );
+    aProfile->SetBorderColor( aProfile->DefaultBorderColor() );
   }
 
   return aCreatedProfiles.Length();