X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Measurements.cxx;h=ff9394490d5982e07b2b8f9d5bc1abd4f11a2bea;hb=cf56ad7e8d88ee8500aaab001dfcee5924b48304;hp=95161c9dbbee00243e4eea1c6a7adcb7061caf00;hpb=daa2cf53970e196bfe3c82cfde426f1ccc43e630;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Measurements.cxx b/src/SMESHGUI/SMESHGUI_Measurements.cxx index 95161c9db..ff9394490 100644 --- a/src/SMESHGUI/SMESHGUI_Measurements.cxx +++ b/src/SMESHGUI/SMESHGUI_Measurements.cxx @@ -1,23 +1,23 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 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 +// 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 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. +// 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 +// 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 // // File : SMESHGUI_Measurements.cxx // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) @@ -190,8 +190,8 @@ SMESHGUI_MinDistance::SMESHGUI_MinDistance( QWidget* parent ) connect( mySecondTgt, SIGNAL( textEdited( QString ) ), this, SLOT( secondEdited() ) ); QList filters; - filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) ); - filters.append( new SMESH_TypeFilter( GROUP ) ); + filters.append( new SMESH_TypeFilter( SMESH::MESHorSUBMESH ) ); + filters.append( new SMESH_TypeFilter( SMESH::GROUP ) ); myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR ); mySecondTgt->setEnabled( mySecond->checkedId() != OriginTgt ); @@ -564,7 +564,7 @@ void SMESHGUI_MinDistance::compute() int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 ); SMESH::Measurements_var measure = SMESHGUI::GetSMESHGen()->CreateMeasurements(); SMESH::Measure result = measure->MinDistance( s1.in(), s2.in() ); - measure->Destroy(); + measure->UnRegister(); myDX->setText( QString::number( result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); myDY->setText( QString::number( result.minY, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); myDZ->setText( QString::number( result.minZ, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); @@ -706,8 +706,8 @@ SMESHGUI_BoundingBox::SMESHGUI_BoundingBox( QWidget* parent ) connect( mySource, SIGNAL( textEdited( QString ) ), this, SLOT( sourceEdited() ) ); QList filters; - filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) ); - filters.append( new SMESH_TypeFilter( GROUP ) ); + filters.append( new SMESH_TypeFilter( SMESH::MESHorSUBMESH ) ); + filters.append( new SMESH_TypeFilter( SMESH::GROUP ) ); myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR ); clear(); @@ -1043,7 +1043,7 @@ void SMESHGUI_BoundingBox::compute() int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 ); SMESH::Measurements_var measure = SMESHGUI::GetSMESHGen()->CreateMeasurements(); SMESH::Measure result = measure->BoundingBox( srcList.in() ); - measure->Destroy(); + measure->UnRegister(); myXmin->setText( QString::number( result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); myXmax->setText( QString::number( result.maxX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) ); myDX->setText( QString::number( result.maxX-result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );