]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #1326, #1327: bathymetry operations
authorasl <asl@opencascade.com>
Thu, 28 Sep 2017 13:13:27 +0000 (16:13 +0300)
committerasl <asl@opencascade.com>
Thu, 28 Sep 2017 13:13:27 +0000 (16:13 +0300)
src/HYDROGUI/CMakeLists.txt
src/HYDROGUI/HYDROGUI_BathymetryOp.cxx [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_BathymetryOp.h [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx
src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.h
src/HYDROGUI/HYDROGUI_Module.h
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_Operations.h
src/HYDROGUI/resources/HYDROGUI_images.ts
src/HYDROGUI/resources/HYDROGUI_msg_en.ts
src/HYDROGUI/resources/icon_bathymetry_selection.png [new file with mode: 0644]

index 81e524bae1d2c7eb78ded23d8b83dc2d952baf6c..05491dc53a0648ab81931a475d5d3973a7e121a6 100644 (file)
@@ -124,6 +124,7 @@ set(PROJECT_HEADERS
     HYDROGUI_Actor.h
     HYDROGUI_BathymetryBoundsOp.h
     HYDROGUI_BathymetrySelectionOp.h
+    HYDROGUI_BathymetryOp.h
     HYDROGUI_TranslateObstacleDlg.h
     HYDROGUI_TranslateObstacleOp.h
     HYDROGUI_ListModel.h
@@ -269,6 +270,7 @@ set(PROJECT_SOURCES
     HYDROGUI_Actor.cxx
     HYDROGUI_BathymetryBoundsOp.cxx
     HYDROGUI_BathymetrySelectionOp.cxx
+    HYDROGUI_BathymetryOp.cxx
     HYDROGUI_TranslateObstacleDlg.cxx
     HYDROGUI_TranslateObstacleOp.cxx
     HYDROGUI_ListModel.cxx
diff --git a/src/HYDROGUI/HYDROGUI_BathymetryOp.cxx b/src/HYDROGUI/HYDROGUI_BathymetryOp.cxx
new file mode 100644 (file)
index 0000000..787053c
--- /dev/null
@@ -0,0 +1,39 @@
+// Copyright (C) 2014-2015  EDF-R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <HYDROGUI_BathymetryOp.h>
+
+HYDROGUI_BathymetryOp::HYDROGUI_BathymetryOp( HYDROGUI_Module* theModule, int theMode )
+: HYDROGUI_Operation( theModule ), myMode( theMode )
+{
+}
+
+HYDROGUI_BathymetryOp::~HYDROGUI_BathymetryOp()
+{
+}
+
+void HYDROGUI_BathymetryOp::startOperation()
+{
+  //TODO
+}
+
+void HYDROGUI_BathymetryOp::abortOperation()
+{
+  //TODO
+}
diff --git a/src/HYDROGUI/HYDROGUI_BathymetryOp.h b/src/HYDROGUI/HYDROGUI_BathymetryOp.h
new file mode 100644 (file)
index 0000000..7855f84
--- /dev/null
@@ -0,0 +1,41 @@
+// Copyright (C) 2014-2015  EDF-R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+
+#ifndef HYDROGUI_BATHYMETRY_OP_H
+#define HYDROGUI_BATHYMETRY_OP_H
+
+#include <HYDROGUI_Operation.h>
+
+class HYDROGUI_BathymetryOp : public HYDROGUI_Operation
+{
+  Q_OBJECT
+
+public:
+  HYDROGUI_BathymetryOp( HYDROGUI_Module* theModule, int theMode );
+  virtual ~HYDROGUI_BathymetryOp();
+
+protected:
+  virtual void startOperation();
+  virtual void abortOperation();
+
+private:
+  int myMode;
+};
+
+#endif
index 317ca6aacc70cd261c18b8c0924bdba49212a914..2fc0fc9c730539dbe6c4a6cb73cb55928b7be0a5 100644 (file)
@@ -42,16 +42,6 @@ void HYDROGUI_BathymetrySelectionOp::abortOperation()
   activateSelection( false );
 }
 
-void HYDROGUI_BathymetrySelectionOp::commitOperation()
-{
-  activateSelection( false );
-}
-
-void HYDROGUI_BathymetrySelectionOp::stopOperation()
-{
-  activateSelection( false );
-}
-
 void HYDROGUI_BathymetrySelectionOp::activateSelection( bool isActive )
 {
   if( myIsActive==isActive )
index 60feb7270a114389ba71bf71ba8eef3151b97218..227e582edba788795222be05a3f127f5478838d4 100644 (file)
@@ -33,8 +33,6 @@ public:
 protected:
   virtual void startOperation();
   virtual void abortOperation();
-  virtual void commitOperation();
-  virtual void stopOperation();
 
   void activateSelection( bool );
 
index 73e4acc7da52029898b65966591d2751c53a832c..b7b4ffa2c1c8e2d79ad2d6300b0ffee75df5d8f4 100644 (file)
@@ -274,6 +274,7 @@ protected slots:
   void                            onOperation();
   void                            onDelete();
   void                            onBathymetrySelection();
+  void                            onBathymetryText();
 
 
   bool                            onUndo( int theNumActions );
index 3fa2afa37f50579a272d8c8d25c3288612d0d0d3..75ca6f832714174cb3a11b9d1b622a7eed06100a 100644 (file)
@@ -71,6 +71,7 @@
 #include "HYDROGUI_SetTransparencyOp.h"
 #include "HYDROGUI_ImportLandCoverMapOp.h"
 #include "HYDROGUI_BathymetrySelectionOp.h"
+#include "HYDROGUI_BathymetryOp.h"
 
 #include <HYDROData_Document.h>
 #include <HYDROData_Obstacle.h>
@@ -156,6 +157,14 @@ void HYDROGUI_Module::createActions()
   createAction( BathymetrySelectionId, "BATHYMETRY_SELECTION", "BATHYMETRY_SELECTION_ICO",
     0, true, SLOT( onBathymetrySelection() ) );
 
+  createAction( BathymetryTextId, "BATHYMETRY_TEXT", "BATHYMETRY_TEXT_ICO",
+    0, true, SLOT( onBathymetryText() ) );
+
+  createAction( BathymetryRescaleSelectionId, "BATHYMETRY_RESCALE_SELECTION", "BATHYMETRY_RESCALE_SELECTION_ICO" );
+  createAction( BathymetryRescaleVisibleId, "BATHYMETRY_RESCALE_VISIBLE", "BATHYMETRY_RESCALE_VISIBLE_ICO" );
+  createAction( BathymetryRescaleUserId, "BATHYMETRY_RESCALE_USER", "BATHYMETRY_RESCALE_USER_ICO" );
+  createAction( BathymetryRescaleDefaultId, "BATHYMETRY_RESCALE_DEFAULT", "BATHYMETRY_RESCALE_DEFAULT_ICO" );
+
   createAction( CreateImmersibleZoneId, "CREATE_IMMERSIBLE_ZONE", "CREATE_IMMERSIBLE_ZONE_ICO" );
   createAction( EditImmersibleZoneId, "EDIT_IMMERSIBLE_ZONE", "EDIT_IMMERSIBLE_ZONE_ICO" );
 
@@ -370,6 +379,11 @@ void HYDROGUI_Module::createToolbars()
 
   createTool( separator(), aToolBar );
   createTool( BathymetrySelectionId, aToolBar );
+  createTool( BathymetryTextId, aToolBar );
+  createTool( BathymetryRescaleSelectionId, aToolBar );
+  createTool( BathymetryRescaleVisibleId, aToolBar );
+  createTool( BathymetryRescaleUserId, aToolBar );
+  createTool( BathymetryRescaleDefaultId, aToolBar );
 }
 
 void HYDROGUI_Module::createUndoRedoActions()
@@ -573,6 +587,14 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
   case BathymetrySelectionId:
     anOp = new HYDROGUI_BathymetrySelectionOp( aModule );
     break;
+  case BathymetryTextId:
+  case BathymetryRescaleSelectionId:
+  case BathymetryRescaleVisibleId:
+  case BathymetryRescaleUserId:
+  case BathymetryRescaleDefaultId:
+    anOp = new HYDROGUI_BathymetryOp( aModule, theId );
+    break;
+
   case CreateImmersibleZoneId:
   case EditImmersibleZoneId:
     anOp = new HYDROGUI_ImmersibleZoneOp( aModule, theId == EditImmersibleZoneId );
@@ -776,3 +798,8 @@ void HYDROGUI_Module::onBathymetrySelection()
   else
     operation( BathymetrySelectionId )->abort();
 }
+
+void HYDROGUI_Module::onBathymetryText()
+{
+  //TODO
+}
index f7916633ecd684747bf3870e0bbb68473b5397f1..c558cfbd3f4f76d458d5a3ed20f8f9ce7366f2d5 100644 (file)
@@ -138,6 +138,11 @@ enum OperationId
   LandCoverScalarMapModeOffId,
 
   BathymetrySelectionId,
+  BathymetryTextId,
+  BathymetryRescaleSelectionId,
+  BathymetryRescaleVisibleId,
+  BathymetryRescaleUserId,
+  BathymetryRescaleDefaultId,
 };
 
 #endif
index e71e1c5aedf1057febb8e355fc667f3e3ea27489..6249163cd5070ece46c1629ef48d426474fcd79a 100644 (file)
       <source>ICON_CURSOR_18</source>
       <translation>icon_cursor_18.png</translation>
     </message>
-
+    <message>
+      <source>BATHYMETRY_SELECTION_ICO</source>
+      <translation>icon_bathymetry_selection.png</translation>
+    </message>
   </context>
 </TS>
index 82ce2e0f3f976d573a6453fa8db135b699b1052f..391221f9acd32696c08e9790b4e279e0600fc87c 100644 (file)
@@ -967,6 +967,10 @@ Would you like to remove all references from the image?</translation>
       <source>DSK_BATHYMETRY_BOUNDS</source>
       <translation>Create boundary polyline</translation>
     </message>
+    <message>
+      <source>DSK_BATHYMETRY_SELECTION</source>
+      <translation>Selection on bathymetry</translation>
+    </message>
     <message>
       <source>DSK_IMPORT_IMAGE</source>
       <translation>Import image</translation>
@@ -1312,6 +1316,10 @@ Would you like to remove all references from the image?</translation>
       <source>MEN_BATHYMETRY_BOUNDS</source>
       <translation>Create boundary polyline</translation>
     </message>
+    <message>
+      <source>MEN_BATHYMETRY_SELECTION</source>
+      <translation>Selection on bathymetry</translation>
+    </message>
     <message>
       <source>MEN_IMPORT_IMAGE</source>
       <translation>Import image</translation>
@@ -1621,6 +1629,10 @@ Would you like to remove all references from the image?</translation>
       <source>STB_BATHYMETRY_BOUNDS</source>
       <translation>Create boundary polyline</translation>
     </message>
+    <message>
+      <source>STB_BATHYMETRY_SELECTION</source>
+      <translation>Selection on bathymetry</translation>
+    </message>
     <message>
       <source>STB_IMPORT_IMAGE</source>
       <translation>Import image</translation>
diff --git a/src/HYDROGUI/resources/icon_bathymetry_selection.png b/src/HYDROGUI/resources/icon_bathymetry_selection.png
new file mode 100644 (file)
index 0000000..2b43780
Binary files /dev/null and b/src/HYDROGUI/resources/icon_bathymetry_selection.png differ