Salome HOME
Python console has been added for HYDRO module (Bug #22).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Operations.cxx
index e5e3ea7788b1f6cccb76381d5693f5f83325ed65..b0f255bdfe6ccc90fb4aa26934525defb43a4daa 100644 (file)
@@ -27,6 +27,7 @@
 #include "HYDROGUI_ExportImageOp.h"
 #include "HYDROGUI_ImportImageOp.h"
 #include "HYDROGUI_ImportBathymetryOp.h"
+#include "HYDROGUI_CalculationOp.h"
 #include "HYDROGUI_Module.h"
 #include "HYDROGUI_ObserveImageOp.h"
 #include "HYDROGUI_PolylineOp.h"
@@ -72,7 +73,6 @@ void HYDROGUI_Module::createActions()
 
   createAction( ImportImageId, "IMPORT_IMAGE", "", Qt::CTRL + Qt::Key_I );
   createAction( EditImportedImageId, "EDIT_IMPORTED_IMAGE" );
-  createAction( EditCompositeImageId, "EDIT_COMPOSITE_IMAGE" );
   createAction( ObserveImageId, "OBSERVE_IMAGE" );
   createAction( ExportImageId, "EXPORT_IMAGE" );
   createAction( UpdateImageId, "UPDATE_IMAGE" );
@@ -82,8 +82,17 @@ void HYDROGUI_Module::createActions()
 
   createAction( ImportBathymetryId, "IMPORT_BATHYMETRY", "", Qt::CTRL + Qt::SHIFT + Qt::Key_I );
 
-  createAction( FuseId, "FUSE_IMAGES" );
-  createAction( CutId, "CUT_IMAGES" );
+  createAction( CreateCalculationId, "CREATE_CALCULATION" );
+  createAction( EditCalculationId, "EDIT_CALCULATION" );
+
+  createAction( FuseImagesId, "FUSE_IMAGES" );
+  createAction( EditFusedImageId, "EDIT_FUSED_IMAGE" );
+
+  createAction( CutImagesId, "CUT_IMAGES" );
+  createAction( EditCutImageId, "EDIT_CUT_IMAGE" );
+
+  createAction( SplitImageId, "SPLIT_IMAGE" );
+  createAction( EditSplittedImageId, "EDIT_SPLITTED_IMAGE" );
 
   createAction( DeleteId, "DELETE", "", Qt::Key_Delete );
 
@@ -110,8 +119,10 @@ void HYDROGUI_Module::createMenus()
   createMenu( ImportImageId, aHydroId, -1, -1 );
   createMenu( ImportBathymetryId, aHydroId, -1, -1 );
   createMenu( CreatePolylineId, aHydroId, -1, -1 );
-  createMenu( FuseId, aHydroId, -1, -1 );
-  createMenu( CutId, aHydroId, -1, -1 );
+  createMenu( CreateCalculationId, aHydroId, -1, -1 );
+  createMenu( FuseImagesId, aHydroId, -1, -1 );
+  createMenu( CutImagesId, aHydroId, -1, -1 );
+  createMenu( SplitImageId, aHydroId, -1, -1 );
 }
 
 void HYDROGUI_Module::createPopups()
@@ -120,7 +131,7 @@ void HYDROGUI_Module::createPopups()
 
 void HYDROGUI_Module::createToolbars()
 {
-  int aToolBar = createTool( tr( "HYDRO_TOOLBAR" ) );
+  int aToolBar = createTool( tr( "MEN_DESK_HYDRO" ) );
   createTool( UndoId, aToolBar );
   createTool( RedoId, aToolBar );
 }
@@ -245,17 +256,24 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
   case EditPolylineId:
     anOp = new HYDROGUI_PolylineOp( aModule, theId == EditPolylineId );
     break;
-  case FuseId:
-    anOp = new HYDROGUI_TwoImagesOp( aModule, HYDROGUI_TwoImagesOp::Fuse );
+  case ImportBathymetryId:
+    anOp = new HYDROGUI_ImportBathymetryOp( aModule );
+    break;
+  case CreateCalculationId:
+  case EditCalculationId:
+    anOp = new HYDROGUI_CalculationOp( aModule, theId == EditCalculationId );
     break;
-  case CutId:
-    anOp = new HYDROGUI_TwoImagesOp( aModule, HYDROGUI_TwoImagesOp::Cut );
+  case FuseImagesId:
+  case EditFusedImageId:
+    anOp = new HYDROGUI_TwoImagesOp( aModule, HYDROGUI_TwoImagesOp::Fuse, theId == EditFusedImageId );
     break;
-  case EditCompositeImageId:
-    anOp = new HYDROGUI_TwoImagesOp( aModule, HYDROGUI_TwoImagesOp::Edit );
+  case CutImagesId:
+  case EditCutImageId:
+    anOp = new HYDROGUI_TwoImagesOp( aModule, HYDROGUI_TwoImagesOp::Cut, theId == EditCutImageId );
     break;
-  case ImportBathymetryId:
-    anOp = new HYDROGUI_ImportBathymetryOp( aModule );
+  case SplitImageId:
+  case EditSplittedImageId:
+    anOp = new HYDROGUI_TwoImagesOp( aModule, HYDROGUI_TwoImagesOp::Split, theId == EditSplittedImageId );
     break;
   case DeleteId:
     anOp = new HYDROGUI_DeleteOp( aModule );