X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Stream.cxx;h=5f6f828fe406ee267227e23f3c4a181da8f6b201;hb=976cf1e8bd38b1d0833a607803ae3ba242a37742;hp=242310905264fab10a71851065867906ac382c1d;hpb=b7cfe34e526dd0643ab16f913fcf8bd06f4ff198;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Stream.cxx b/src/HYDROData/HYDROData_Stream.cxx index 24231090..5f6f828f 100644 --- a/src/HYDROData/HYDROData_Stream.cxx +++ b/src/HYDROData/HYDROData_Stream.cxx @@ -95,7 +95,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Stream,HYDROData_NaturalObject) HYDROData_Stream::HYDROData_Stream() -: HYDROData_NaturalObject() +: HYDROData_NaturalObject( Geom_3d ) { } @@ -103,25 +103,26 @@ HYDROData_Stream::~HYDROData_Stream() { } -QStringList HYDROData_Stream::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const +QStringList HYDROData_Stream::DumpToPython( const QString& thePyScriptPath, + MapOfTreatedObjects& theTreatedObjects ) const { QStringList aResList = dumpObjectCreation( theTreatedObjects ); QString aName = GetObjPyName(); Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis(); - setPythonReferenceObject( theTreatedObjects, aResList, aHydAxis, "SetHydraulicAxis" ); + setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aHydAxis, "SetHydraulicAxis" ); HYDROData_SequenceOfObjects aSeqOfProfiles = GetProfiles(); for ( int i = 1, aNb = aSeqOfProfiles.Size(); i <= aNb; ++i ) { const Handle(HYDROData_Entity) aProfile = aSeqOfProfiles.Value( i ); - setPythonReferenceObject( theTreatedObjects, aResList, aProfile, "AddProfile" ); + setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aProfile, "AddProfile" ); } // Set bottom polyline if exists const Handle(HYDROData_Polyline3D) aBottomPolyline = GetBottomPolyline(); if ( !aBottomPolyline.IsNull() ) { - setPythonReferenceObject( theTreatedObjects, aResList, aBottomPolyline, "SetBottomPolyline" ); + setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aBottomPolyline, "SetBottomPolyline" ); } aResList << QString( "" ); @@ -145,16 +146,6 @@ HYDROData_SequenceOfObjects HYDROData_Stream::GetAllReferenceObjects() const return aResSeq; } -TopoDS_Shape HYDROData_Stream::GetTopShape() const -{ - return getTopShape(); -} - -TopoDS_Shape HYDROData_Stream::GetShape3D() const -{ - return getShape3D(); -} - Handle(Geom_BSplineCurve) HYDROData_Stream::buildInterpolationCurve( const Handle(TColgp_HArray1OfPnt)& theArrayOfPnt ) { @@ -279,12 +270,12 @@ void HYDROData_Stream::UpdatePrs() anOutGroup->AddShape( aResultPrs.myOutlet ); } -QColor HYDROData_Stream::DefaultFillingColor() +QColor HYDROData_Stream::DefaultFillingColor() const { return QColor( Qt::green ); } -QColor HYDROData_Stream::DefaultBorderColor() +QColor HYDROData_Stream::DefaultBorderColor() const { return QColor( Qt::transparent ); } @@ -327,16 +318,6 @@ TopoDS_Shape HYDROData_Stream::GetOutletShape() const return HYDROData_Tool::getFirstShapeFromGroup( aGroups, 4); } -QColor HYDROData_Stream::getDefaultFillingColor() const -{ - return DefaultFillingColor(); -} - -QColor HYDROData_Stream::getDefaultBorderColor() const -{ - return DefaultBorderColor(); -} - bool HYDROData_Stream::SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& theAxis ) { if ( !IsValidAsAxis( theAxis ) ) @@ -352,7 +333,7 @@ bool HYDROData_Stream::SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& the updateProfilesOrder(); // Indicate model of the need to update the stream presentation - SetToUpdate( true ); + Changed( Geom_3d ); return true; } @@ -375,7 +356,7 @@ void HYDROData_Stream::RemoveHydraulicAxis() RemoveProfiles(); // Indicate model of the need to update the stream presentation - SetToUpdate( true ); + Changed( Geom_3d ); } bool HYDROData_Stream::HasIntersection( const Handle(HYDROData_Profile)& theProfile, @@ -509,7 +490,7 @@ bool HYDROData_Stream::AddProfile( const Handle(HYDROData_Profile)& theProfile ) insertProfileInToOrder( theProfile, aProfileIndex ); // Indicate model of the need to update the stream presentation - SetToUpdate( true ); + Changed( Geom_3d ); return true; } @@ -554,7 +535,7 @@ bool HYDROData_Stream::SetProfiles( const HYDROData_SequenceOfObjects& theProfil SetReferenceObjects( theProfiles, DataTag_Profile ); if ( anIsToUpdate ) - SetToUpdate( true ); + Changed( Geom_3d ); } return true; @@ -597,22 +578,20 @@ bool HYDROData_Stream::RemoveProfile( const Handle(HYDROData_Profile)& theProfil removeParameter( aProfileIndex ); // Indicate model of the need to update the stream presentation - SetToUpdate( true ); + Changed( Geom_3d ); return true; } void HYDROData_Stream::RemoveProfiles() { - bool anIsToUpdate = IsMustBeUpdated() || NbReferenceObjects( DataTag_Profile ) > 0; - ClearReferenceObjects( DataTag_Profile ); // Remove the parameters array removeParametersArray(); // Indicate model of the need to update the stream presentation - SetToUpdate( anIsToUpdate ); + Changed( Geom_3d ); } void HYDROData_Stream::insertProfileInToOrder( const Handle(HYDROData_Profile)& theProfile,