X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_RemoveNodesOp.cxx;fp=src%2FSMESHGUI%2FSMESHGUI_RemoveNodesOp.cxx;h=0000000000000000000000000000000000000000;hb=56b5060f4b749d409461d3556c18109a87c169b1;hp=795c622e41aa61c8976b0c8767d1aec761dd1913;hpb=717a547e50bdad68bdd925d6dcb5094f6e2b2da1;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_RemoveNodesOp.cxx b/src/SMESHGUI/SMESHGUI_RemoveNodesOp.cxx deleted file mode 100644 index 795c622e4..000000000 --- a/src/SMESHGUI/SMESHGUI_RemoveNodesOp.cxx +++ /dev/null @@ -1,138 +0,0 @@ -// SMESH SMESHGUI : GUI for SMESH component -// -// Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : SMESHGUI_RemoveNodesOp.cxx -// Author : Alexander SOLOVYOV -// Module : SMESH -// $Header$ - -#include "SMESHGUI_RemoveNodesOp.h" -#include -#include -#include - -//================================================================================= -// function : -// purpose : -//================================================================================= -SMESHGUI_RemoveNodesOp::SMESHGUI_RemoveNodesOp() -: SMESHGUI_SelectionOp( NodeSelection ), - myDlg( 0 ) -{ -} - -//================================================================================= -// function : -// purpose : -//================================================================================= -SMESHGUI_RemoveNodesOp::~SMESHGUI_RemoveNodesOp() -{ - if( myDlg ) - delete myDlg; -} - -//================================================================================= -// function : -// purpose : -//================================================================================= -SalomeApp_Dialog* SMESHGUI_RemoveNodesOp::dlg() const -{ - return myDlg; -} - -//================================================================================= -// function : -// purpose : -//================================================================================= -void SMESHGUI_RemoveNodesOp::startOperation() -{ - if( !myDlg ) - { - myDlg = new SMESHGUI_RemoveNodesDlg(); - connect( myDlg, SIGNAL( objectChanged( int, const QStringList& ) ), this, SLOT( onTextChanged( int, const QStringList& ) ) ); - } - - SMESHGUI_SelectionOp::startOperation(); - - myDlg->show(); -} - -//================================================================================= -// function : -// purpose : -//================================================================================= -void SMESHGUI_RemoveNodesOp::selectionDone() -{ - SMESHGUI_SelectionOp::selectionDone(); - updateDialog(); -} - -//================================================================================= -// function : -// purpose : -//================================================================================= -void SMESHGUI_RemoveNodesOp::updateDialog() -{ - if( !myDlg ) - return; - - bool en = myDlg->hasSelection( 0 ); - myDlg->setButtonEnabled( en, QtxDialog::OK | QtxDialog::Apply ); -} - -//================================================================================= -// function : -// purpose : -//================================================================================= -bool SMESHGUI_RemoveNodesOp::onApply() -{ - if( isStudyLocked() ) - return false; - - IdList ids; selectedIds( 0, ids ); - - SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array; - anArrayOfIdeces->length(ids.count()); - for (int i=0, n=ids.count(); iGetMeshEditor(); - aResult = aMeshEditor->RemoveNodes( anArrayOfIdeces.inout() ); - } - catch(...) - { - } - - if (aResult) - { - initDialog(); - SMESH::UpdateView(); - } - - SMESH::SetPointRepresentation(true); - return aResult; -} -