Salome HOME
Lot 1 (linear&poly distance)
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Operations.cxx
index cf5d70f819c6374412437608ecd18ea27f427953..8c459d9a845488ca46928c816227f92096870f45 100644 (file)
@@ -45,6 +45,7 @@
 #include "HYDROGUI_UpdateObjectOp.h"
 #include "HYDROGUI_VisualStateOp.h"
 #include "HYDROGUI_ImmersibleZoneOp.h"
+#include "HYDROGUI_MeasurementToolOp.h"
 #include "HYDROGUI_ImportGeomObjectOp.h"
 #include "HYDROGUI_ImportObstacleFromFileOp.h"
 #include "HYDROGUI_TranslateObstacleOp.h"
@@ -147,6 +148,8 @@ void HYDROGUI_Module::createActions()
   createAction( ExportSinusXId, "EXPORT_SINUSX", "EXPORT_SINUSX_ICO" );
   createAction( ImportLandCoverMapId, "IMPORT_LANDCOVER_MAP", "IMPORT_LANDCOVER_MAP_ICO" );
 
+  createAction( MeasurementToolId, "MEASUREMENT_TOOL", "MEASUREMENT_TOOL_ICO" );
+
   createAction( ImportBCPolygonId, "IMPORT_BC_POLYGON", "IMPORT_BC_POLYGON_ICO" );
 
   createAction( CreatePolylineId, "CREATE_POLYLINE", "CREATE_POLYLINE_ICO" );
@@ -288,6 +291,8 @@ void HYDROGUI_Module::createMenus()
   createMenu( CreateChannelId, aHydroId, -1, -1 );
   createMenu( CreateDigueId, aHydroId, -1, -1 );
 
+  createMenu( MeasurementToolId, aHydroId, -1, -1 );
+
   int aNewImageId = createMenu( tr( "MEN_DESK_IMAGE" ), aHydroId, -1 );
   createMenu( ImportImageId, aNewImageId, -1, -1 );
   createMenu( separator(), aNewImageId );
@@ -355,6 +360,7 @@ void HYDROGUI_Module::createToolbars()
   createTool( ImportLandCoverMapId, aToolBar );
 
   createTool( ImportBCPolygonId, aToolBar );
+  createTool( MeasurementToolId, aToolBar );
 
   createTool( ImportBathymetryId, aToolBar );
   createTool( CreatePolylineId, aToolBar );
@@ -632,6 +638,9 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
   case ImportBCPolygonId:
     anOp = new HYDROGUI_ImportBCPolygonOp( aModule );
     break;
+  case MeasurementToolId:
+    anOp = new HYDROGUI_MeasurementToolOp( aModule );
+    break;
   case ObserveImageId:
     anOp = new HYDROGUI_ObserveImageOp( aModule );
     break;