]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Operation of ordering with empty implementation added to project.
authoradv <adv@opencascade.com>
Thu, 20 Mar 2014 11:48:32 +0000 (11:48 +0000)
committeradv <adv@opencascade.com>
Thu, 20 Mar 2014 11:48:32 +0000 (11:48 +0000)
src/HYDROGUI/HYDROGUI_Module.cxx
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_Operations.h
src/HYDROGUI/HYDROGUI_ZLevelsOp.cxx [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_ZLevelsOp.h [new file with mode: 0644]
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index ffa5d7ed5893d6d4889023535544a3792898c796..26ee9fd732ee99901d5ef286a185ac94b61ab225 100644 (file)
@@ -651,6 +651,10 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
     HYDROGUI_PolylineOp* aPolylineOp = dynamic_cast<HYDROGUI_PolylineOp*>( anOp );
     if ( aPolylineOp && aPolylineOp->deleteEnabled() )
       theMenu->addAction( action( DeleteId ) );
+
+    theMenu->addSeparator();
+    theMenu->addAction( action( SetZLevelId ) );
+    theMenu->addSeparator();
   }
 
   if( anIsObjectBrowser || anIsGraphicsView || anIsOCCView || anIsVTKView )
@@ -659,7 +663,9 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
     theMenu->addAction( action( HideAllId ) );
     theMenu->addSeparator();
   }
-  if ( anIsOCCView || anIsVTKView ) {
+  
+  if ( anIsOCCView || anIsVTKView )
+  {
     theMenu->addSeparator();
     theMenu->addAction( action( CopyViewerPositionId ) );
   }
index aedb1dee49b825b7bcf5fd2d5e1954fd11079240..a2d1f3f6111657421bb743793bbb90963e2c1818 100644 (file)
@@ -55,6 +55,7 @@
 #include "HYDROGUI_SetColorOp.h"
 #include "HYDROGUI_BathymetryBoundsOp.h"
 #include "HYDROGUI_Tool.h"
+#include "HYDROGUI_ZLevelsOp.h"
 
 #include <HYDROData_Document.h>
 #include <HYDROData_Obstacle.h>
@@ -170,6 +171,7 @@ void HYDROGUI_Module::createActions()
                 SLOT( onDelete() ) );
 
   createAction( SetColorId, "COLOR" );
+  createAction( SetZLevelId, "ZLEVEL" );
 
   createAction( ShowId, "SHOW" );
   createAction( ShowOnlyId, "SHOW_ONLY" );
@@ -494,6 +496,9 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
   case SetColorId:
     anOp = new HYDROGUI_SetColorOp( aModule );
     break;
+  case SetZLevelId:
+    anOp = new HYDROGUI_ZLevelsOp( aModule );
+    break;
   case ShowId:
   case ShowOnlyId:
   case ShowAllId:
index 435206a23612a47624c3cae6d0d4d77ac56a98bc..a03a34d8748ae41347c6afa34ecae364eaf99756 100644 (file)
@@ -103,7 +103,9 @@ enum OperationId
   HideId,
   HideAllId,
 
-  SetColorId
+  SetColorId,
+  SetZLevelId,
+
 };
 
 #endif
diff --git a/src/HYDROGUI/HYDROGUI_ZLevelsOp.cxx b/src/HYDROGUI/HYDROGUI_ZLevelsOp.cxx
new file mode 100644 (file)
index 0000000..7d12d15
--- /dev/null
@@ -0,0 +1,62 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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
+//
+
+#include "HYDROGUI_ZLevelsOp.h"
+
+#include "HYDROGUI_ZLevelsDlg.h"
+#include "HYDROGUI_DataModel.h"
+#include "HYDROGUI_Module.h"
+#include "HYDROGUI_Tool.h"
+#include "HYDROGUI_UpdateFlags.h"
+
+#include <HYDROData_Entity.h>
+
+#include <LightApp_Application.h>
+#include <LightApp_UpdateFlags.h>
+
+#include <SUIT_Desktop.h>
+
+HYDROGUI_ZLevelsOp::HYDROGUI_ZLevelsOp( HYDROGUI_Module* theModule )
+: HYDROGUI_Operation( theModule ),
+  myZLevelsDlg( NULL )
+{
+  setName( tr( "SET_Z_LEVELS" ) );
+}
+
+HYDROGUI_ZLevelsOp::~HYDROGUI_ZLevelsOp()
+{
+}
+
+void HYDROGUI_ZLevelsOp::startOperation()
+{
+  HYDROGUI_Operation::startOperation();
+
+  // TODO
+  abort();
+}
+
+bool HYDROGUI_ZLevelsOp::processApply( int& theUpdateFlags,
+                                       QString& theErrorMsg )
+{
+  // TODO
+  return false;
+}
diff --git a/src/HYDROGUI/HYDROGUI_ZLevelsOp.h b/src/HYDROGUI/HYDROGUI_ZLevelsOp.h
new file mode 100644 (file)
index 0000000..8bf51b5
--- /dev/null
@@ -0,0 +1,52 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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_ZLEVELSOP_H
+#define HYDROGUI_ZLEVELSOP_H
+
+#include "HYDROGUI_Operation.h"
+
+#include <HYDROData_Entity.h>
+
+class HYDROGUI_ZLevelsDlg;
+
+class HYDROGUI_ZLevelsOp : public HYDROGUI_Operation
+{
+  Q_OBJECT
+
+public:
+
+  HYDROGUI_ZLevelsOp( HYDROGUI_Module* theModule );
+  virtual ~HYDROGUI_ZLevelsOp();
+
+protected:
+
+  virtual void startOperation();
+
+  virtual bool processApply( int& theUpdateFlags, QString& theErrorMsg );
+
+private:
+  HYDROGUI_ZLevelsDlg*     myZLevelsDlg;
+
+};
+
+#endif
\ No newline at end of file
index a179a88153ede7c43050c7fe12928b1dc7c886c9..67095955660d7a42e1dc40bce481f6aeb7351955 100644 (file)
@@ -826,6 +826,10 @@ Would you like to remove all references from the image?</translation>
       <source>DSK_COLOR</source>
       <translation>Set object color</translation>
     </message>
+    <message>
+      <source>DSK_ZLEVEL</source>
+      <translation>Change layer order</translation>
+    </message>
     <message>
       <source>MEN_CREATE_CALCULATION</source>
       <translation>Create calculation case</translation>
@@ -1070,6 +1074,10 @@ Would you like to remove all references from the image?</translation>
       <source>MEN_COLOR</source>
       <translation>Color</translation>
     </message>
+    <message>
+      <source>MEN_ZLEVEL</source>
+      <translation>Change layer order</translation>
+    </message>
     <message>
       <source>STB_CREATE_CALCULATION</source>
       <translation>Create calculation case</translation>
@@ -1286,6 +1294,10 @@ Would you like to remove all references from the image?</translation>
       <source>STB_COLOR</source>
       <translation>Set object color</translation>
     </message>
+    <message>
+      <source>STB_ZLEVEL</source>
+      <translation>Change layer order</translation>
+    </message>
   </context>
   
   <context>