]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
new operation for change land cover type
authorasl <asl@opencascade.com>
Mon, 9 Nov 2015 08:36:37 +0000 (11:36 +0300)
committerasl <asl@opencascade.com>
Mon, 9 Nov 2015 08:36:37 +0000 (11:36 +0300)
src/HYDROGUI/HYDROGUI_LandCoverMapDlg.cxx
src/HYDROGUI/HYDROGUI_LandCoverMapOp.cxx
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_Operations.h

index 9c57ed8665208e78446d17ce7de922ca63bacc23..ec2a3e5cf07b00f5df48a5ab6dd0dad1f0a416e8 100644 (file)
@@ -189,7 +189,8 @@ void HYDROGUI_LandCoverMapDlg::updateState( bool theInitialConfigure )
 
     bool aShowStricklerTypesCtrls = ( myOperationId == CreateLandCoverMapId ||
                                       myOperationId == AddLandCoverId ||
-                                      myOperationId == MergeLandCoverId );
+                                      myOperationId == MergeLandCoverId ||
+                                      myOperationId == ChangeLandCoverTypeId );
     myStricklerTypesLabel->setVisible( aShowStricklerTypesCtrls );
     myStricklerTypes->setVisible( aShowStricklerTypesCtrls );
   }
index 3de085b925c4607feb2767621f983b080d944fc0..5e2c0b9e5705d41e573604f35d1cc276ac04dd94 100644 (file)
@@ -57,6 +57,9 @@ HYDROGUI_LandCoverMapOp::HYDROGUI_LandCoverMapOp( HYDROGUI_Module* theModule, co
     case MergeLandCoverId:
       setName( tr( "MERGE_LAND_COVER" ) );
       break;
+    case ChangeLandCoverTypeId:
+      setName( tr( "CHANGE_LAND_COVER_TYPE" ) );
+      break;
   }  
 }
 
@@ -180,7 +183,9 @@ bool HYDROGUI_LandCoverMapOp::processApply( int& theUpdateFlags,
     }
   }
   // Get face(s) selected in the 3d viewer
-  else if ( myOperationId == RemoveLandCoverId || myOperationId == MergeLandCoverId )
+  else if ( myOperationId == RemoveLandCoverId || 
+            myOperationId == MergeLandCoverId || 
+            myOperationId == ChangeLandCoverTypeId )
   {
     // TODO:
     //Fill in aFacesSelectedInViewer list
@@ -188,7 +193,9 @@ bool HYDROGUI_LandCoverMapOp::processApply( int& theUpdateFlags,
 
   // Get selected Strickler type
   QString aSelectedStricklerType;
-  if ( myOperationId == CreateLandCoverMapId || myOperationId == AddLandCoverId || myOperationId == MergeLandCoverId )
+  if ( myOperationId == CreateLandCoverMapId || 
+       myOperationId == AddLandCoverId || 
+       myOperationId == MergeLandCoverId )
   {
     aSelectedStricklerType = aPanel->getSelectedStricklerTypeName();
     if ( aSelectedStricklerType.isEmpty() )
index 1715bc479dadba2b148c154d49874cb07ff58526..b3c604ab3acfb94d16cf0902b8f3172d7ac4464c 100644 (file)
@@ -175,6 +175,7 @@ void HYDROGUI_Module::createActions()
   createAction( RemoveLandCoverId, "REMOVE_LAND_COVER", "REMOVE_LAND_COVER_ICO" );
   createAction( SplitLandCoverId, "SPLIT_LAND_COVER", "SPLIT_LAND_COVER_ICO" );
   createAction( MergeLandCoverId, "MERGE_LAND_COVER", "MERGE_LAND_COVER_ICO" );
+  createAction( ChangeLandCoverTypeId, "CHANGE_LAND_COVER_TYPE", "CHANGE_LAND_COVER_TYPE_ICO" );
 
   createAction( ImportObstacleFromFileId, "IMPORT_OBSTACLE_FROM_FILE", "IMPORT_OBSTACLE_FROM_FILE_ICO" );
   createAction( ImportGeomObjectAsObstacleId, "IMPORT_GEOM_OBJECT_AS_OBSTACLE", "IMPORT_GEOM_OBJECT_ICO" );
@@ -295,6 +296,7 @@ void HYDROGUI_Module::createMenus()
   createMenu( separator(), aLandCoverMapMenuId );
   createMenu( SplitLandCoverId, aLandCoverMapMenuId, -1, -1 );
   createMenu( MergeLandCoverId, aLandCoverMapMenuId, -1, -1 );
+  createMenu( ChangeLandCoverTypeId, aLandCoverMapMenuId, -1, -1 );
   
   createMenu( CreateCalculationId, aHydroId, -1, -1 );
   createMenu( separator(), aHydroId );
@@ -350,6 +352,7 @@ void HYDROGUI_Module::createToolbars()
   createTool( RemoveLandCoverId, aToolBar );
   createTool( SplitLandCoverId, aToolBar );
   createTool( MergeLandCoverId, aToolBar );
+  createTool( ChangeLandCoverTypeId, aToolBar );
 
   createTool( separator(), aToolBar );
   createTool( CreateCalculationId, aToolBar );
@@ -569,6 +572,9 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
   case MergeLandCoverId:
     anOp = new HYDROGUI_LandCoverMapOp( aModule, theId );
     break;
+  case ChangeLandCoverTypeId:
+    anOp = new HYDROGUI_LandCoverMapOp( aModule, theId );
+    break;
   case DuplicateStricklerTableId:
     anOp = new HYDROGUI_DuplicateOp( aModule );
     break;
index 1c845bd263c9967188348ca697c3e317c58057a2..a048c16ff6f9f7a72317068d39c1583f8f27cb1f 100644 (file)
@@ -127,6 +127,7 @@ enum OperationId
   RemoveLandCoverId,
   SplitLandCoverId,
   MergeLandCoverId,
+  ChangeLandCoverTypeId,
 
   PolylineExtractionId,
   SplitPolylinesId,