X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FEntityGUI%2FEntityGUI_SubShapeDlg.cxx;h=dd73cfe930229fbb7aac6e3ac5dc3e48ce485492;hb=7e21a68ba07185cd1dddcf9e1522a28111c2cee4;hp=9dc4679bfc4f164a8f15f9a726ed1e29b2566ef6;hpb=56ca7cc4091fd08893cdecf33991b74298eed640;p=modules%2Fgeom.git diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index 9dc4679bf..dd73cfe93 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2010 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 @@ -19,6 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // GEOM GEOMGUI : GUI for Geometry component // File : EntityGUI_SubShapeDlg.cxx // Author : Lucien PIGNOLONI, Open CASCADE S.A.S. @@ -53,7 +54,7 @@ // TRUE to construct a modal dialog. //================================================================================= EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_SUBSHAPE" ) ) ); @@ -140,7 +141,7 @@ void EntityGUI_SubShapeDlg::Init() connect( GroupPoints->CheckButton1, SIGNAL( stateChanged( int ) ), this, SLOT( SubShapeToggled() ) ); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged( )), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged( )), this, SLOT( SelectionIntoArgument() ) ); updateButtonState(); resize(100,100); @@ -344,7 +345,7 @@ void EntityGUI_SubShapeDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); SubShapeToggled(); updateButtonState(); } @@ -427,7 +428,7 @@ void EntityGUI_SubShapeDlg::ComboTextChanged() // purpose : //================================================================================= unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes( const TopoDS_Shape& S, - const int shapeType ) const + const int shapeType ) const { if ( S.IsNull() ) return 0; @@ -437,13 +438,13 @@ unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes( const TopoDS_Shape& S, if ( S.ShapeType() == TopAbs_COMPOUND && ( TopAbs_ShapeEnum(shapeType) == TopAbs_SHAPE || - TopAbs_ShapeEnum(shapeType) == TopAbs_COMPSOLID || - TopAbs_ShapeEnum(shapeType) == TopAbs_COMPOUND ) ) { + TopAbs_ShapeEnum(shapeType) == TopAbs_COMPSOLID || + TopAbs_ShapeEnum(shapeType) == TopAbs_COMPOUND ) ) { TopoDS_Iterator It( S, Standard_True, Standard_True ); for ( ; It.More(); It.Next() ) { if ( M.Add( It.Value() ) ) { if ( TopAbs_ShapeEnum( shapeType ) == TopAbs_SHAPE || - TopAbs_ShapeEnum( shapeType ) == It.Value().ShapeType() ) { + TopAbs_ShapeEnum( shapeType ) == It.Value().ShapeType() ) { index++; } } @@ -574,18 +575,18 @@ bool EntityGUI_SubShapeDlg::execute (ObjectList& objects) if (aSelList.Extent() == 1) { Standard_Boolean aResult = Standard_False; GEOM::GEOM_Object_var anObj = - GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult); + GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult); if (aResult && !anObj->_is_nil()) { - TColStd_IndexedMapOfInteger aMapIndex; - aSelMgr->GetIndexes(aSelList.First(), aMapIndex); + TColStd_IndexedMapOfInteger aMapIndex; + aSelMgr->GetIndexes(aSelList.First(), aMapIndex); - GEOM::GEOM_ILocalOperations_var aLocOp = - getGeomEngine()->GetILocalOperations(getStudyId()); + GEOM::GEOM_ILocalOperations_var aLocOp = + getGeomEngine()->GetILocalOperations(getStudyId()); - for (int i = 0, n = aList->length(); i < n; i++) - if (aMapIndex.Contains(aLocOp->GetSubShapeIndex(myObject, aList[i]))) - objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i])); + for (int i = 0, n = aList->length(); i < n; i++) + if (aMapIndex.Contains(aLocOp->GetSubShapeIndex(myObject, aList[i]))) + objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i])); } } }