From: asl Date: Mon, 22 Jun 2015 05:16:15 +0000 (+0300) Subject: Merge remote-tracking branch 'origin/BR_LAND_COVER' into BR_v14_rc X-Git-Tag: v1.4.2~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f7598de0de5abad3f557c8b2c52d0e0163a0951c;p=modules%2Fhydro.git Merge remote-tracking branch 'origin/BR_LAND_COVER' into BR_v14_rc Conflicts: src/HYDROGUI/HYDROGUI_CalculationOp.cxx src/HYDROGUI/HYDROGUI_CalculationOp.h --- f7598de0de5abad3f557c8b2c52d0e0163a0951c diff --cc src/HYDROData/HYDROData_CalculationCase.h index a54800f1,9d84b3d4..70e925e7 --- a/src/HYDROData/HYDROData_CalculationCase.h +++ b/src/HYDROData/HYDROData_CalculationCase.h @@@ -407,11 -434,27 +434,13 @@@ private const TopTools_ListOfShape& theFaces, const HYDROData_ShapesGroup::SeqOfGroupsDefs& theGroupsDefs, QString& theGeomObjEntry ) const; - - /** - * Publish the given shape in GEOM as a GEOM object. - * \param theGeomEngine GEOM module engine - * \param theStudy SALOMEDS study, used for publishing of the shape - * \param theShape the shape to publish as a GEOM object - * \param theName the name of the published object - * \return the published GEOM object - */ - GEOM::GEOM_Object_ptr publishShapeInGEOM( GEOM::GEOM_Gen_var theGeomEngine, - SALOMEDS::Study_ptr theStudy, - const TopoDS_Shape& theShape, - const QString& theName, - QString& theGeomObjEntry ) const; - + void CreateRegionsDef( const Handle(HYDROData_Document)& theDoc, - const HYDROData_SplitToZonesTool::SplitDataList& theZones ); + const HYDROData_SplitToZonesTool::SplitDataList& theZones, + const bool theLandCover ); void CreateRegionsAuto( const Handle(HYDROData_Document)& theDoc, - const HYDROData_SplitToZonesTool::SplitDataList& theZones ); + const HYDROData_SplitToZonesTool::SplitDataList& theZones, + const bool theLandCover ); void CreateEdgeGroupsDef( const Handle(HYDROData_Document)& theDoc, const HYDROData_SplitToZonesTool::SplitDataList& theEdges ); diff --cc src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 2c84a4fb,82a21857..ede72aa4 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@@ -1093,21 -1169,9 +1173,20 @@@ void HYDROGUI_CalculationOp::setZonesVi } } - void HYDROGUI_CalculationOp::setGeomObjectsVisible( bool theIsVisible ) + void HYDROGUI_CalculationOp::AssignDefaultZonesColors( const bool theLandCover ) +{ + myShowGeomObjects = theIsVisible; + + HYDROData_SequenceOfObjects aSeq = myEditedObject->GetGeometryObjects(); + + HYDROData_SequenceOfObjects::Iterator anIter( aSeq ); + for ( ; anIter.More(); anIter.Next() ) { + setObjectVisibility( anIter.Value(), theIsVisible ); + } +} + - void HYDROGUI_CalculationOp::AssignDefaultZonesColors() { - HYDROData_SequenceOfObjects aRegions = myEditedObject->GetRegions(); + HYDROData_SequenceOfObjects aRegions = myEditedObject->GetRegions( theLandCover ); HYDROData_SequenceOfObjects::Iterator aRegionsIter( aRegions ); HYDROData_SequenceOfObjects aZones; Handle(HYDROData_Region) aRegion; @@@ -1213,11 -1302,10 +1317,11 @@@ void HYDROGUI_CalculationOp::createPrev { LightApp_Application* anApp = module()->getApp(); HYDROData_SequenceOfObjects aSeq; - if ( myShowGeomObjects ) - { - HYDROData_SequenceOfObjects aGeomObj = myEditedObject->GetGeometryObjects(); - aSeq.Append( aGeomObj ); + if ( theLandCover ) + aSeq = myEditedObject->GetLandCovers(); + else + aSeq = myEditedObject->GetGeometryObjects(); + } Handle(HYDROData_Entity) anEntity; if ( myShowZones ) diff --cc src/HYDROGUI/HYDROGUI_CalculationOp.h index b4961a35,17134b7e..3c1c9a54 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.h +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.h @@@ -118,9 -127,9 +127,9 @@@ protected slots */ void onClickedInZonesBrowser( SUIT_DataObject* theItem ); /** - * Hide zones in the viewer. + * Slot called on back button click. */ - void onBack( const int ); + void onHideZones( const int ); /** * Geometry object is selected in the list on the first wizard page */ @@@ -142,11 -151,10 +151,11 @@@ void onOrderLandCoverChanged( bool& isConfirmed ); private: - void createPreview(); - void closePreview(); + void createPreview( const bool theLandCover); + void closePreview( bool theRemoveViewManager = true ); void setObjectVisibility( Handle(HYDROData_Entity) theEntity, const bool theIsVisible ); - void setZonesVisible( bool theIsVisible ); + void setZonesVisible( bool theIsVisible, const bool theLandCover ); + void setGeomObjectsVisible( bool theIsVisible ); void getNamesAndEntries( const HYDROData_SequenceOfObjects& theSeq, QStringList& theNames, QStringList& theEntries ) const;