From: adv Date: Thu, 20 Mar 2014 11:48:32 +0000 (+0000) Subject: Operation of ordering with empty implementation added to project. X-Git-Tag: BR_hydro_v1_0_1~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a4583c5dce2b21c67fb215131ff02243ca4811f1;p=modules%2Fhydro.git Operation of ordering with empty implementation added to project. --- diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index ffa5d7ed..26ee9fd7 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -651,6 +651,10 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient, HYDROGUI_PolylineOp* aPolylineOp = dynamic_cast( 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 ) ); } diff --git a/src/HYDROGUI/HYDROGUI_Operations.cxx b/src/HYDROGUI/HYDROGUI_Operations.cxx index aedb1dee..a2d1f3f6 100644 --- a/src/HYDROGUI/HYDROGUI_Operations.cxx +++ b/src/HYDROGUI/HYDROGUI_Operations.cxx @@ -55,6 +55,7 @@ #include "HYDROGUI_SetColorOp.h" #include "HYDROGUI_BathymetryBoundsOp.h" #include "HYDROGUI_Tool.h" +#include "HYDROGUI_ZLevelsOp.h" #include #include @@ -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: diff --git a/src/HYDROGUI/HYDROGUI_Operations.h b/src/HYDROGUI/HYDROGUI_Operations.h index 435206a2..a03a34d8 100644 --- a/src/HYDROGUI/HYDROGUI_Operations.h +++ b/src/HYDROGUI/HYDROGUI_Operations.h @@ -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 index 00000000..7d12d15a --- /dev/null +++ b/src/HYDROGUI/HYDROGUI_ZLevelsOp.cxx @@ -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 + +#include +#include + +#include + +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 index 00000000..8bf51b51 --- /dev/null +++ b/src/HYDROGUI/HYDROGUI_ZLevelsOp.h @@ -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 + +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 diff --git a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts index a179a881..67095955 100644 --- a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts +++ b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts @@ -826,6 +826,10 @@ Would you like to remove all references from the image? DSK_COLOR Set object color + + DSK_ZLEVEL + Change layer order + MEN_CREATE_CALCULATION Create calculation case @@ -1070,6 +1074,10 @@ Would you like to remove all references from the image? MEN_COLOR Color + + MEN_ZLEVEL + Change layer order + STB_CREATE_CALCULATION Create calculation case @@ -1286,6 +1294,10 @@ Would you like to remove all references from the image? STB_COLOR Set object color + + STB_ZLEVEL + Change layer order +