X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_ConvToQuadOp.cxx;h=15a6d8ff80b15fe5860f6921cffdfdfd203f7373;hp=a5095e6a923509192faf9fff23c4a5ec60701d7f;hb=b03a1e600155a03e2ae01e31960837e51831db70;hpb=c63ee099ad2b149bd70136839c973e8910137bc5 diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx index a5095e6a9..15a6d8ff8 100644 --- a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx @@ -1,47 +1,46 @@ -// Copyright (C) 2005 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. +// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE // -// 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 +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// 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 +// +// SMESH SMESHGUI : GUI for SMESH component +// File : SMESHGUI_ConvToQuadOp.cxx +// Author : Open CASCADE S.A.S. +// SMESH includes // -/** -* SMESH SMESHGUI -* -* Copyright (C) 2005 CEA/DEN, EDF R&D -* -* -* -* File : SMESHGUI_ConvToQuadOp.h -* Module : SMESHGUI -*/ - #include "SMESHGUI_ConvToQuadOp.h" -#include "SMESHGUI_ConvToQuadDlg.h" -#include "SMESHGUI.h" +#include "SMESHGUI_ConvToQuadDlg.h" #include "SMESHGUI_Utils.h" -#include "SMESH_TypeFilter.hxx" +#include -#include "SalomeApp_Tools.h" +// SALOME GUI includes +#include +#include +#include +#include -#include "SUIT_MessageBox.h" +// IDL includes +#include +#include CORBA_SERVER_HEADER(SMESH_MeshEditor) -#include "LightApp_UpdateFlags.h" - //================================================================================ /*! * \brief Constructor @@ -93,6 +92,8 @@ void SMESHGUI_ConvToQuadOp::startOperation() } connect( myDlg, SIGNAL( onClicked( int ) ), SLOT( ConnectRadioButtons( int ) ) ); + myHelpFileName = "convert_to_from_quadratic_mesh_page.html"; + SMESHGUI_SelectionOp::startOperation(); myDlg->SetMediumNdsOnGeom( false ); @@ -111,14 +112,14 @@ void SMESHGUI_ConvToQuadOp::startOperation() //================================================================================ void SMESHGUI_ConvToQuadOp::selectionDone() { - if ( !dlg()->isShown() ) + if ( !dlg()->isVisible() ) return; SMESHGUI_SelectionOp::selectionDone(); try { QString anMeshEntry = myDlg->selectedObject( 0 ); - _PTR(SObject) pMesh = studyDS()->FindObjectID( anMeshEntry.latin1() ); + _PTR(SObject) pMesh = studyDS()->FindObjectID( anMeshEntry.toLatin1().data() ); if ( !pMesh ) return; SMESH::SMESH_Mesh_var mesh = @@ -176,16 +177,17 @@ SUIT_SelectionFilter* SMESHGUI_ConvToQuadOp::createFilter( const int theId ) con //================================================================================ bool SMESHGUI_ConvToQuadOp::onApply() { + SUIT_OverrideCursor aWaitCursor; QString aMess; QString anMeshEntry = myDlg->selectedObject( 0 ); - _PTR(SObject) pMesh = studyDS()->FindObjectID( anMeshEntry.latin1() ); + _PTR(SObject) pMesh = studyDS()->FindObjectID( anMeshEntry.toLatin1().data() ); if ( !pMesh ) { dlg()->show(); - SUIT_MessageBox::warn1( myDlg, - tr( "SMESH_WRN_WARNING" ), tr("MESH_IS_NOT_SELECTED"), tr( "SMESH_BUT_OK" ) ); + SUIT_MessageBox::warning( myDlg, + tr( "SMESH_WRN_WARNING" ), tr("MESH_IS_NOT_SELECTED") ); return false; } @@ -195,8 +197,8 @@ bool SMESHGUI_ConvToQuadOp::onApply() if( CORBA::is_nil(mesh) ) { - SUIT_MessageBox::warn1( myDlg, - tr( "SMESH_WRN_WARNING" ), tr("REF_IS_NULL"), tr( "SMESH_BUT_OK" ) ); + SUIT_MessageBox::warning( myDlg, + tr( "SMESH_WRN_WARNING" ), tr("REF_IS_NULL") ); return false; } @@ -210,7 +212,7 @@ bool SMESHGUI_ConvToQuadOp::onApply() { bool aParam = true; if( myDlg->IsEnabledCheck() ) - aParam = myDlg->IsMediumNdsOnGeom(); + aParam = myDlg->IsMediumNdsOnGeom(); aEditor->ConvertToQuadratic( aParam ); aResult = true; @@ -268,7 +270,7 @@ SMESHGUI_ConvToQuadOp::MeshType SMESHGUI_ConvToQuadOp::ConsistMesh( const SMESH: void SMESHGUI_ConvToQuadOp::ConnectRadioButtons( int id ) { QString anMeshEntry = myDlg->selectedObject( 0 ); - _PTR(SObject) pMesh = studyDS()->FindObjectID( anMeshEntry.latin1() ); + _PTR(SObject) pMesh = studyDS()->FindObjectID( anMeshEntry.toLatin1().data() ); if ( !pMesh ) return; SMESH::SMESH_Mesh_var mesh = @@ -282,5 +284,3 @@ void SMESHGUI_ConvToQuadOp::ConnectRadioButtons( int id ) else myDlg->SetEnabledCheck( true ); } - -