diff --git a/src/OBJECT/SMESH_SVTKActor.cxx b/src/OBJECT/SMESH_SVTKActor.cxx index 103a46f1e..dd72914b0 100644 --- a/src/OBJECT/SMESH_SVTKActor.cxx +++ b/src/OBJECT/SMESH_SVTKActor.cxx @@ -108,7 +108,7 @@ SMESH_SVTKActor void SMESH_SVTKActor ::MapCells(SALOME_Actor* theMapActor, - const TColStd_IndexedMapOfInteger& theMapIndex) + const SVTK_TIndexedMapOfVtkId& theMapIndex) { myUnstructuredGrid->Initialize(); myUnstructuredGrid->Allocate(); diff --git a/src/OBJECT/SMESH_SVTKActor.h b/src/OBJECT/SMESH_SVTKActor.h index 77499fde5..570eb5261 100644 --- a/src/OBJECT/SMESH_SVTKActor.h +++ b/src/OBJECT/SMESH_SVTKActor.h @@ -61,7 +61,7 @@ public: //! Allow to recostruct selected cells from source SALOME_Actor and map of subindexes virtual void MapCells(SALOME_Actor* theMapActor, - const TColStd_IndexedMapOfInteger& theMapIndex); + const SVTK_TIndexedMapOfVtkId& theMapIndex); //! To remove the actor an all its internal devices diff --git a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx index 127f31824..94f8fb565 100644 --- a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx @@ -784,7 +784,7 @@ void SMESHGUI_AddMeshElementDlg::onTextChange (const QString& theNewText) aMesh = myActor->GetObject()->GetMesh(); if (aMesh) { - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); bool allOk = true; diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx index 880316aa5..318731e4d 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx @@ -989,14 +989,14 @@ void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText) myCurrentLineEdit = send; if (aMesh) { - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); bool allOk = true; for (int i = 0; i < aListId.count(); i++) { if ( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) ) { - newIndices.Add( FromIdType(n->GetID()) ); + newIndices.Add( n->GetID() ); } else { diff --git a/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx index 59c1aceec..50052045c 100644 --- a/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx @@ -614,12 +614,12 @@ void SMESHGUI_CopyMeshDlg::onTextChange (const QString& theNewText) QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); if (myActor && aMesh) { - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; if (send == myLineEditElements) { for (int i = 0; i < aListId.count(); i++) if ( const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt())) { - newIndices.Add(FromIdType(e->GetID())); + newIndices.Add(e->GetID()); } } myNbOkElements = newIndices.Extent(); diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx index 69326ecbd..435624e63 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx @@ -688,13 +688,13 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onTextChange(const QString& theNewText) if (GetConstructorId() == 0) { if ( aMesh ) { - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split( " ", QString::SkipEmptyParts ); for ( int i = 0; i < aListId.count(); i++ ) { const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ); if ( n ) { - newIndices.Add(FromIdType(n->GetID())); + newIndices.Add(n->GetID()); myNbOkElements++; } } @@ -720,14 +720,14 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onTextChange(const QString& theNewText) // check entered ids of faces and highlight them QStringList aListId; if ( aMesh ) { - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; aListId = theNewText.split( " ", QString::SkipEmptyParts ); for ( int i = 0; i < aListId.count(); i++ ) { const SMDS_MeshElement * e = aMesh->FindElement( aListId[ i ].toInt() ); if ( e ) { - newIndices.Add(FromIdType(e->GetID())); + newIndices.Add(e->GetID()); myNbOkElements++; } } @@ -1147,7 +1147,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onListSelectionChanged() SALOME_ListIO aList; mySelectionMgr->setSelectedObjects( aList ); - TColStd_MapOfInteger aIndexes; + SVTK_TVtkIDsMap aIndexes; QList selItems = myFacesByNodes->selectedItems(); QListWidgetItem* anItem; diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx index 72bb84ef3..30c2e472c 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx @@ -688,8 +688,8 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText) if (bOk) { const SMDS_MeshNode* n = aMesh->FindNode(ind); if (n) { - TColStd_MapOfInteger newIndices; - newIndices.Add(FromIdType(n->GetID())); + SVTK_TVtkIDsMap newIndices; + newIndices.Add(n->GetID()); mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, false ); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->highlight( aPathActor->getIO(), true, true ); diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx index c720feb65..a65572de1 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx @@ -289,7 +289,7 @@ void SMESHGUI_3TypesSelector::selectionIntoArgument() } else // get indices of selected elements { - TColStd_IndexedMapOfInteger aMapIndex; + SVTK_TIndexedMapOfVtkId aMapIndex; mySelector->GetIndex(IO,aMapIndex); int nbElements = aMapIndex.Extent(); if ( nbElements > 0 ) @@ -354,7 +354,7 @@ void SMESHGUI_3TypesSelector::onTextChange( const QString& theNewText ) SMESH::smIdType_array_var ids = new SMESH::smIdType_array; ids->length( aListId.count() ); - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; for (int i = 0; i < aListId.count(); i++) { int id = aListId[ i ].toInt(); bool validId = false; @@ -1368,7 +1368,7 @@ void SMESHGUI_ExtrusionDlg::SelectionIntoArgument() if ( SelectVectorButton->isChecked() ) { Handle(SALOME_InteractiveObject) IO = aList.First(); - TColStd_IndexedMapOfInteger aMapIndex; + SVTK_TIndexedMapOfVtkId aMapIndex; mySelector->GetIndex(IO,aMapIndex); if ( aMapIndex.Extent() != 1 ) return; diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx index 4cc801419..79e415e44 100644 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx @@ -3006,13 +3006,13 @@ void SMESHGUI_FilterDlg::reject() SALOME_ListIO aList; mySelectionMgr->clearFilters(); mySelectionMgr->clearSelected(); - SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger anIter (myIObjects); + SALOME_DataMapIteratorOfIOMapOfVtk anIter (myIObjects); for ( ; anIter.More(); anIter.Next()) { aList.Append(anIter.Key()); - TColStd_MapOfInteger aResMap; - const TColStd_IndexedMapOfInteger& anIndMap = anIter.Value(); + SVTK_TVtkIDsMap aResMap; + const SVTK_TIndexedMapOfVtkId& anIndMap = anIter.Value(); for (int i = 1, n = anIndMap.Extent(); i <= n; i++) aResMap.Add(anIndMap(i)); @@ -3343,7 +3343,7 @@ void SMESHGUI_FilterDlg::SetSelection() const SALOME_ListIO& anObjs = mySelector->StoredIObjects(); SALOME_ListIteratorOfListIO anIter (anObjs); for ( ; anIter.More(); anIter.Next()) { - TColStd_IndexedMapOfInteger aMap; + SVTK_TIndexedMapOfVtkId aMap; mySelector->GetIndex(anIter.Value(), aMap); myIObjects.Bind(anIter.Value(), aMap); } @@ -3580,7 +3580,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource (const int theType, // Create map of entities to be filtered TColStd_MapOfInteger aToBeFiltered; - SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger anIter(myIObjects); + SALOME_DataMapIteratorOfIOMapOfVtk anIter(myIObjects); for ( ; anIter.More(); anIter.Next()) { @@ -3614,7 +3614,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource (const int theType, SMESH::SMESH_Mesh_var aMeshPtr = SMESH::IObjectToInterface(anIter.Key()); if (!aMeshPtr->_is_nil() && aMeshPtr->GetId() == myMesh->GetId()) { - const TColStd_IndexedMapOfInteger& aSelMap = anIter.Value(); + const SVTK_TIndexedMapOfVtkId& aSelMap = anIter.Value(); if (aSelMap.Extent() > 0) { @@ -3647,7 +3647,7 @@ SMESH_Actor* SMESHGUI_FilterDlg::getActor() if ( meshActor && meshActor->GetVisibility() ) return meshActor; - SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger anIter(myIObjects); + SALOME_DataMapIteratorOfIOMapOfVtk anIter(myIObjects); for ( ; anIter.More(); anIter.Next()) { Handle(SALOME_InteractiveObject) io = anIter.Key(); @@ -3707,7 +3707,7 @@ void SMESHGUI_FilterDlg::selectInViewer (const int theType, const QList& th SMESH::RemoveFilter(aFilterId); // get vtk ids - TColStd_MapOfInteger aMap; + SVTK_TVtkIDsMap aMap; QList::const_iterator anIter; for (anIter = theIds.begin(); anIter != theIds.end(); ++anIter) { aMap.Add(*anIter); diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.h b/src/SMESHGUI/SMESHGUI_FilterDlg.h index 1240b7e72..dc0c475be 100644 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.h +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.h @@ -39,6 +39,7 @@ // SALOME GUI includes #include #include +#include // IDL includes #include @@ -59,6 +60,9 @@ class SMESHGUI_FilterLibraryDlg; class SMESH_Actor; class SVTK_Selector; +typedef NCollection_DataMap SALOME_DataMapOfIOMapOfVtk; +typedef SALOME_DataMapOfIOMapOfVtk::Iterator SALOME_DataMapIteratorOfIOMapOfVtk; + /*! * Class : SMESHGUI_FilterTable * Description : Frame containing @@ -308,7 +312,7 @@ private: bool myDiffSourcesEnabled; QWidget* mySourceWg; - SALOME_DataMapOfIOMapOfInteger myIObjects; + SALOME_DataMapOfIOMapOfVtk myIObjects; bool myIsSelectionChanged; QMap< int, SMESH::Filter_var > myFilter; QMap< int, bool > myInsertState; diff --git a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx index 0ffd06502..91b913fdd 100644 --- a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx @@ -361,7 +361,7 @@ void SMESHGUI_FindElemByPointOp::onElemSelected() QList ids = myDlg->myFoundList->selectedItems(); QList::iterator id = ids.begin(); - TColStd_MapOfInteger idMap; + SVTK_TVtkIDsMap idMap; for ( ; id != ids.end(); ++id ) idMap.Add( (*id)->text().toInt() ); diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index 0132e8ea2..2dc454d81 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -1263,7 +1263,7 @@ void SMESHGUI_GroupDlg::onListSelectionChanged() if (myCurrentLineEdit == 0) { mySelectionMgr->clearSelected(); - TColStd_MapOfInteger aIndexes; + SVTK_TVtkIDsMap aIndexes; QList selItems = myElements->selectedItems(); QListWidgetItem* anItem; foreach(anItem, selItems) aIndexes.Add(anItem->text().toInt()); diff --git a/src/SMESHGUI/SMESHGUI_IdPreview.cxx b/src/SMESHGUI/SMESHGUI_IdPreview.cxx index baa1a7314..083f6ff2f 100644 --- a/src/SMESHGUI/SMESHGUI_IdPreview.cxx +++ b/src/SMESHGUI/SMESHGUI_IdPreview.cxx @@ -97,13 +97,13 @@ SMESHGUI_IdPreview::SMESHGUI_IdPreview(SVTK_ViewWindow* theViewWindow): } void SMESHGUI_IdPreview::SetPointsData ( SMDS_Mesh* theMesh, - const TColStd_MapOfInteger & theNodesIdMap ) + const SVTK_TVtkIDsMap & theNodesIdMap ) { vtkPoints* aPoints = vtkPoints::New(); aPoints->SetNumberOfPoints(theNodesIdMap.Extent()); myIDs.clear(); - TColStd_MapIteratorOfMapOfInteger idIter( theNodesIdMap ); + SVTK_TVtkIDsMapIterator idIter( theNodesIdMap ); for( int i = 0; idIter.More(); idIter.Next(), i++ ) { const SMDS_MeshNode* aNode = theMesh->FindNode(idIter.Key()); diff --git a/src/SMESHGUI/SMESHGUI_IdPreview.h b/src/SMESHGUI/SMESHGUI_IdPreview.h index 6f1e14b44..e7c85e859 100644 --- a/src/SMESHGUI/SMESHGUI_IdPreview.h +++ b/src/SMESHGUI/SMESHGUI_IdPreview.h @@ -29,6 +29,7 @@ #include #include +#include #include @@ -52,7 +53,7 @@ public: SMESHGUI_IdPreview(SVTK_ViewWindow* theViewWindow); ~SMESHGUI_IdPreview(); - void SetPointsData( SMDS_Mesh* theMesh, const TColStd_MapOfInteger & theNodesIdMap ); + void SetPointsData( SMDS_Mesh* theMesh, const SVTK_TVtkIDsMap & theNodesIdMap ); void SetElemsData ( const std::vector & theElemsIdMap, const std::list & theGrCentersXYZ ); template< class INT_ITER, class XYZ_ITER > diff --git a/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx b/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx index e3cf69feb..6febe32b6 100644 --- a/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx @@ -869,7 +869,7 @@ void SMESHGUI_MakeNodeAtPointOp::onTextChange( const QString& theText ) if( const SMDS_MeshNode* aNode = aMesh->FindNode( theText.toInt() ) ) { - TColStd_MapOfInteger aListInd; + SVTK_TVtkIDsMap aListInd; aListInd.Add( FromIdType(aNode->GetID()) ); selector()->AddOrRemoveIndex( anIO, aListInd, false ); if( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( SMESHGUI::GetSMESHGUI() ) ) diff --git a/src/SMESHGUI/SMESHGUI_Measurements.cxx b/src/SMESHGUI/SMESHGUI_Measurements.cxx index b1315f131..8d3e72146 100644 --- a/src/SMESHGUI/SMESHGUI_Measurements.cxx +++ b/src/SMESHGUI/SMESHGUI_Measurements.cxx @@ -492,7 +492,7 @@ void SMESHGUI_MinDistance::firstEdited() if ( myFirstActor && selector ) { Handle(SALOME_InteractiveObject) IO = myFirstActor->getIO(); if ( myFirst->checkedId() == NodeTgt || myFirst->checkedId() == ElementTgt ) { - TColStd_MapOfInteger ID; + SVTK_TVtkIDsMap ID; ID.Add( myFirstTgt->text().toLong() ); selector->AddOrRemoveIndex( IO, ID, false ); } @@ -520,7 +520,7 @@ void SMESHGUI_MinDistance::secondEdited() Handle(SALOME_InteractiveObject) IO = mySecondActor->getIO(); if ( mySecond->checkedId() == NodeTgt || mySecond->checkedId() == ElementTgt ) { if ( !text.isEmpty() ) { - TColStd_MapOfInteger ID; + SVTK_TVtkIDsMap ID; ID.Add( text.toLong() ); selector->AddOrRemoveIndex( IO, ID, false ); } @@ -1022,7 +1022,7 @@ void SMESHGUI_BoundingBox::sourceEdited() if ( myActor && selector ) { Handle(SALOME_InteractiveObject) IO = myActor->getIO(); if ( mySourceMode->checkedId() == NodesSrc || mySourceMode->checkedId() == ElementsSrc ) { - TColStd_MapOfInteger ID; + SVTK_TVtkIDsMap ID; if ( !mySource->isReadOnly() ) myIDs = mySource->text(); QStringList ids = myIDs.split( " ", QString::SkipEmptyParts ); @@ -1420,7 +1420,7 @@ void SMESHGUI_Angle::selectionChanged() clear(); QString nodesString; - TColStd_IndexedMapOfInteger idsMap; + SVTK_TIndexedMapOfVtkId idsMap; SALOME_ListIO selected; SMESHGUI::selectionMgr()->selectedObjects( selected ); selected.Reverse(); // to keep order of selection @@ -1528,7 +1528,7 @@ void SMESHGUI_Angle::nodesEdited() { clear(); - TColStd_MapOfInteger ID; + SVTK_TVtkIDsMap ID; QStringList ids = myNodes->text().split( " ", QString::SkipEmptyParts ); foreach ( QString idStr, ids ) { diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx index c6d075bcb..9ea3045d2 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx @@ -469,7 +469,7 @@ void SMESHGUI_MergeDlg::Init() // function : FindGravityCenter() // purpose : //================================================================================= -void SMESHGUI_MergeDlg::FindGravityCenter(TColStd_MapOfInteger & theElemsIdMap, +void SMESHGUI_MergeDlg::FindGravityCenter(SVTK_TVtkIDsMap & theElemsIdMap, std::vector& theIDs, std::list< gp_XYZ > & theGrCentersXYZ) { @@ -484,7 +484,7 @@ void SMESHGUI_MergeDlg::FindGravityCenter(TColStd_MapOfInteger & theElemsIdMap, int nbNodes; theIDs.reserve( theElemsIdMap.Extent() ); - TColStd_MapIteratorOfMapOfInteger idIter( theElemsIdMap ); + SVTK_TVtkIDsMapIterator idIter( theElemsIdMap ); for( ; idIter.More(); idIter.Next() ) { const SMDS_MeshElement* anElem = aMesh->FindElement(idIter.Key()); if ( !anElem ) @@ -845,7 +845,7 @@ void SMESHGUI_MergeDlg::onSelectGroup() myIsBusy = true; ListEdit->clear(); - TColStd_MapOfInteger anIndices; + SVTK_TVtkIDsMap anIndices; QList selItems = ListCoincident->selectedItems(); QListWidgetItem* anItem; QStringList aListIds; @@ -908,7 +908,7 @@ void SMESHGUI_MergeDlg::onSelectElementFromGroup() if (myIsBusy || !myActor) return; - TColStd_MapOfInteger anIndices; + SVTK_TVtkIDsMap anIndices; QList selItems = ListEdit->selectedItems(); QListWidgetItem* anItem; @@ -1595,7 +1595,7 @@ void SMESHGUI_MergeDlg::onSelectKeep() if ( myActor ) { mySelectionMgr->clearSelected(); - TColStd_MapOfInteger aIndexes; + SVTK_TVtkIDsMap aIndexes; QList selItems = KeepList->selectedItems(); QListWidgetItem* anItem; foreach(anItem, selItems) aIndexes.Add(anItem->text().toInt()); diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.h b/src/SMESHGUI/SMESHGUI_MergeDlg.h index 5cecfd2f6..e421671e8 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.h +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.h @@ -30,8 +30,9 @@ // SMESH includes #include "SMESH_SMESHGUI.hxx" -// Qt includes +// GUI and Qt includes #include +#include // OCCT includes #include @@ -88,7 +89,7 @@ private: bool isKeepIDsSelection(); bool isNewKeepGroup( const char* entry ); - void FindGravityCenter( TColStd_MapOfInteger&, + void FindGravityCenter( SVTK_TVtkIDsMap&, std::vector& , std::list& ); // add the centers of gravity of ElemsIdMap elements to the GrCentersXYZ list diff --git a/src/SMESHGUI/SMESHGUI_MeshInfo.cxx b/src/SMESHGUI/SMESHGUI_MeshInfo.cxx index 571384316..57b76a490 100644 --- a/src/SMESHGUI/SMESHGUI_MeshInfo.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshInfo.cxx @@ -3315,7 +3315,7 @@ void SMESHGUI_MeshInfoDlg::idChanged() myIDPreview->SetPointsLabeled( false ); if ( myProxy ) { - TColStd_MapOfInteger ID; + SVTK_TVtkIDsMap ID; QSet ids; std::vector idVec; std::list< gp_XYZ > aGrCentersXYZ; diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index d524ec880..395814985 100644 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -1411,7 +1411,7 @@ void SMESHGUI_MeshPatternDlg::onTextChanged (const QString& theNewText) if (aMesh) { QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; for (int i = 0; i < aListId.count(); i++) { const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt()); diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index 8a959ecb3..34ba6a13a 100644 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -697,7 +697,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn() if (nbSelected == 0) return; - TColStd_IndexedMapOfInteger toBeAdded; + SVTK_TIndexedMapOfVtkId toBeAdded; if (!mySubmeshChk->isChecked() && !myGroupChk->isChecked()) { if (nbSelected > 0) @@ -712,7 +712,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn() SMESH::smIdType_array_var anIds = aSubMesh->GetElementsId(); for (int i = 0, n = anIds->length(); i < n; i++) { if (isIdValid(FromIdType(anIds[ i ]))) - toBeAdded.Add(FromIdType(anIds[ i ])); + toBeAdded.Add(anIds[ i ]); } } } @@ -728,7 +728,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn() SMESH::smIdType_array_var anIds = aGroup->GetListOfID(); for (int i = 0, n = anIds->length(); i < n; i++) { if (isIdValid(FromIdType(anIds[ i ]))) - toBeAdded.Add(FromIdType(anIds[ i ])); + toBeAdded.Add(anIds[ i ]); } } } @@ -875,7 +875,7 @@ void SMESHGUI_MultiEditDlg::onListSelectionChanged() anActor = myActor; TVisualObjPtr anObj = anActor->GetObject(); - TColStd_MapOfInteger anIndexes; + SVTK_TVtkIDsMap anIndexes; int total = myListBox->count(); for (int i = 0; i < total; i++) { @@ -1818,7 +1818,7 @@ void SMESHGUI_SplitVolumesDlg::onSelectionDone() if (!aSelMesh->_is_nil()) myMesh = aSelMesh; - TColStd_IndexedMapOfInteger aMapIndex; + SVTK_TIndexedMapOfVtkId aMapIndex; mySelector->GetIndex( anIO, aMapIndex ); if ( !aMapIndex.IsEmpty() ) showFacetByElement( aMapIndex(1) ); diff --git a/src/SMESHGUI/SMESHGUI_OffsetDlg.cxx b/src/SMESHGUI/SMESHGUI_OffsetDlg.cxx index ec681f8eb..ee7716ee6 100644 --- a/src/SMESHGUI/SMESHGUI_OffsetDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_OffsetDlg.cxx @@ -552,13 +552,13 @@ void SMESHGUI_OffsetDlg::onTextChange (const QString& theNewText) if (aMesh) { Handle(SALOME_InteractiveObject) anIO = myActor->getIO(); - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); for (int i = 0; i < aListId.count(); i++) { if ( const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt())) - newIndices.Add( FromIdType(e->GetID()) ); + newIndices.Add( e->GetID() ); myNbOkElements++; } diff --git a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx index 4e2f64549..7ef8401c4 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx @@ -348,7 +348,7 @@ void SMESHGUI_RemoveElementsDlg::onTextChange(const QString& theNewText) if(SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh()){ Handle(SALOME_InteractiveObject) anIO = myActor->getIO(); - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); for (int i = 0; i < aListId.count(); i++) { diff --git a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx index e50b5c851..fe0fe6cbc 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx @@ -356,7 +356,7 @@ void SMESHGUI_RemoveNodesDlg::onTextChange(const QString& theNewText) if(SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh()){ Handle(SALOME_InteractiveObject) anIO = myActor->getIO(); - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); for (int i = 0; i < aListId.count(); i++) { diff --git a/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx b/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx index 8c6d52952..620802fe8 100644 --- a/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx @@ -518,7 +518,7 @@ void SMESHGUI_ReorientFacesOp::selectionDone() if ( nbSelected == 1 ) { - TColStd_IndexedMapOfInteger faceIndices; + SVTK_TIndexedMapOfVtkId faceIndices; selector()->GetIndex( anIO, faceIndices ); if ( faceIndices.Extent() == 1 ) { @@ -558,7 +558,7 @@ void SMESHGUI_ReorientFacesOp::selectionDone() } else { - TColStd_IndexedMapOfInteger nodeIndices; + SVTK_TIndexedMapOfVtkId nodeIndices; selector()->GetIndex( anIO, nodeIndices ); if ( nodeIndices.Extent() > 0 && nodeIndices.Extent() <=2 ) { @@ -620,7 +620,7 @@ void SMESHGUI_ReorientFacesOp::onTextChange( const QString& theText ) myDlg->activateObject( EFace ); myDlg->setObjectText( EFace, theText ); } - TColStd_MapOfInteger ids; + SVTK_TVtkIDsMap ids; if ( !theText.isEmpty() && theText.toInt() > 0 ) ids.Add( theText.toInt() ); diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx index 4c88473ba..3b21f38b1 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx @@ -602,7 +602,7 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument() return; Handle(SALOME_InteractiveObject) IO = aList.First(); - TColStd_IndexedMapOfInteger aMapIndex; + SVTK_TIndexedMapOfVtkId aMapIndex; mySelector->GetIndex(IO,aMapIndex); if ( aMapIndex.Extent() != 1 ) return; diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx index 42667c09c..b0e12148f 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx @@ -644,13 +644,13 @@ void SMESHGUI_RotationDlg::onTextChange (const QString& theNewText) if (send == LineEditElements) { Handle(SALOME_InteractiveObject) anIO = myActor->getIO(); - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); for (int i = 0; i < aListId.count(); i++) { const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt()); if (e) - newIndices.Add(FromIdType(e->GetID())); + newIndices.Add(e->GetID()); myNbOkElements++; } diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx index 19666562d..c71d28d16 100644 --- a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx @@ -682,7 +682,7 @@ void SMESHGUI_ScaleDlg::onTextChange (const QString& theNewText) if (aMesh) { Handle(SALOME_InteractiveObject) anIO = myActor->getIO(); - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); @@ -690,7 +690,7 @@ void SMESHGUI_ScaleDlg::onTextChange (const QString& theNewText) for (int i = 0; i < aListId.count(); i++) { const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt()); if (e) - newIndices.Add(FromIdType(e->GetID())); + newIndices.Add(e->GetID()); myNbOkElements++; } } diff --git a/src/SMESHGUI/SMESHGUI_SelectionOp.cxx b/src/SMESHGUI/SMESHGUI_SelectionOp.cxx index 1a16815ff..45d111e98 100644 --- a/src/SMESHGUI/SMESHGUI_SelectionOp.cxx +++ b/src/SMESHGUI/SMESHGUI_SelectionOp.cxx @@ -262,7 +262,7 @@ void SMESHGUI_SelectionOp::highlight( const Handle( SALOME_InteractiveObject )& // Purpose : Select/deselect cells of mesh //======================================================================= void SMESHGUI_SelectionOp::addOrRemoveIndex( const Handle( SALOME_InteractiveObject )& obj, - const TColStd_MapOfInteger& indices, + const SVTK_TVtkIDsMap& indices, const bool isModeShift ) { SVTK_Selector* sel = selector(); @@ -468,7 +468,7 @@ void SMESHGUI_SelectionOp::onTextChanged( int, const QStringList& list ) if( !dlg() ) return; - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; SALOME_ListIO sel; selectionMgr()->selectedObjects( sel ); SMESH_Actor* anActor = actor(); @@ -483,12 +483,12 @@ void SMESHGUI_SelectionOp::onTextChanged( int, const QStringList& list ) if ( selectionMode() == NodeSelection ) for( ; anIt!=aLast; anIt++ ) { if( const SMDS_MeshNode * n = aMesh->FindNode( *anIt ) ) - newIndices.Add( FromIdType(n->GetID()) ); + newIndices.Add( n->GetID() ); } else for( ; anIt!=aLast; anIt++ ) { if( const SMDS_MeshElement* e = aMesh->FindElement( *anIt ) ) - newIndices.Add( FromIdType(e->GetID()) ); + newIndices.Add( e->GetID() ); } selector()->AddOrRemoveIndex( sel.First(), newIndices, false ); diff --git a/src/SMESHGUI/SMESHGUI_SelectionOp.h b/src/SMESHGUI/SMESHGUI_SelectionOp.h index de37e058f..1d265b3bd 100644 --- a/src/SMESHGUI/SMESHGUI_SelectionOp.h +++ b/src/SMESHGUI/SMESHGUI_SelectionOp.h @@ -34,6 +34,7 @@ // SALOME GUI includes #include +#include #include // IDL includes @@ -110,7 +111,7 @@ protected: //! Select some nodes or elements in VTK void addOrRemoveIndex( const Handle( SALOME_InteractiveObject )&, - const TColStd_MapOfInteger&, const bool isModeShift); + const SVTK_TVtkIDsMap&, const bool isModeShift); SVTK_ViewWindow* viewWindow() const; SVTK_Selector* selector() const; diff --git a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx index df05b65e2..b80e0f998 100644 --- a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx @@ -1541,7 +1541,7 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText) send->clear(); if (aMesh) { - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; if (GetConstructorId() != 3 || (send != LineEdit1 && send != LineEdit4)) { SMESH::SetPointRepresentation(true); @@ -1551,7 +1551,7 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText) const SMDS_MeshNode * n = aMesh->FindNode(theNewText.toInt()); if (n) { - newIndices.Add(FromIdType(n->GetID())); + newIndices.Add(n->GetID()); mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->highlight( myActor->getIO(), true, true ); @@ -1583,7 +1583,7 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText) const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt()); if (e) { - newIndices.Add(FromIdType(e->GetID())); + newIndices.Add(e->GetID()); atLeastOneExists = true; } } diff --git a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx index 144382246..864f31115 100644 --- a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx @@ -498,12 +498,12 @@ void SMESHGUI_ShapeByMeshOp::onElemIdChanged(const QString& theNewText) case VOLUME: type = SMDSAbs_Volume; break; default: return; } - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split( " ", QString::SkipEmptyParts); for ( int i = 0; i < aListId.count(); i++ ) { if ( const SMDS_MeshElement * e = aMesh->FindElement( aListId[ i ].toInt() )) if ( e->GetType() == type ) - newIndices.Add( FromIdType(e->GetID()) ); + newIndices.Add( e->GetID() ); } if ( !newIndices.IsEmpty() ) diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx index ff1fa4b81..d46cb7554 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx @@ -523,7 +523,7 @@ void SMESHGUI_SmoothingDlg::onTextChange (const QString& theNewText) QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); if (send == LineEditElements) { - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; for (int i = 0; i < aListId.count(); i++) { int id = aListId[ i ].toInt(); if ( id > 0 ) { @@ -538,7 +538,7 @@ void SMESHGUI_SmoothingDlg::onTextChange (const QString& theNewText) } } else if (send == LineEditNodes) { - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; for (int i = 0; i < aListId.count(); i++) { int id = aListId[ i ].toInt(); if ( id > 0 ) { @@ -619,7 +619,7 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument() myNbOkElements = true; } else { // get indices of selected elements - TColStd_IndexedMapOfInteger aMapIndex; + SVTK_TIndexedMapOfVtkId aMapIndex; mySelector->GetIndex(IO,aMapIndex); myNbOkElements = aMapIndex.Extent(); diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx index 80054ebbf..e5c429799 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx @@ -701,7 +701,7 @@ void SMESHGUI_SymmetryDlg::onTextChange (const QString& theNewText) if (aMesh) { Handle(SALOME_InteractiveObject) anIO = myActor->getIO(); - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); @@ -709,7 +709,7 @@ void SMESHGUI_SymmetryDlg::onTextChange (const QString& theNewText) for (int i = 0; i < aListId.count(); i++) { const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt()); if (e) - newIndices.Add(FromIdType(e->GetID())); + newIndices.Add(e->GetID()); myNbOkElements++; } diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx index 4486dfbe9..f5546fd44 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx @@ -713,7 +713,7 @@ void SMESHGUI_TranslationDlg::onTextChange (const QString& theNewText) if (aMesh) { Handle(SALOME_InteractiveObject) anIO = myActor->getIO(); - TColStd_MapOfInteger newIndices; + SVTK_TVtkIDsMap newIndices; QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts); @@ -721,7 +721,7 @@ void SMESHGUI_TranslationDlg::onTextChange (const QString& theNewText) for (int i = 0; i < aListId.count(); i++) { const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt()); if (e) - newIndices.Add(FromIdType(e->GetID())); + newIndices.Add(e->GetID()); myNbOkElements++; } } diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index a6bfbd353..1cc4206eb 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -1194,7 +1194,7 @@ namespace SMESH QString& theName) { theName = ""; - TColStd_IndexedMapOfInteger aMapIndex; + SVTK_TIndexedMapOfVtkId aMapIndex; theSelector->GetIndex(theIO,aMapIndex); for(int i = 1; i <= aMapIndex.Extent(); i++) @@ -1208,7 +1208,7 @@ namespace SMESH QString& theName) { theName = ""; - TColStd_IndexedMapOfInteger aMapIndex; + SVTK_TIndexedMapOfVtkId aMapIndex; theSelector->GetIndex(theIO,aMapIndex); typedef std::set TIdContainer; @@ -1238,7 +1238,7 @@ namespace SMESH if ( anIO.IsNull() || !anIO->hasEntry() ) return -1; - TColStd_IndexedMapOfInteger aMapIndex; + SVTK_TIndexedMapOfVtkId aMapIndex; theSelector->GetIndex( anIO, aMapIndex ); if ( aMapIndex.Extent() != 2 ) return -1; diff --git a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx index 207d4c30b..4408fe3c1 100644 --- a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx +++ b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx @@ -1739,7 +1739,7 @@ public: if ( vw->SelectionMode() == ActorSelection ) return; - TColStd_MapOfInteger idMap; + SVTK_TVtkIDsMap idMap; std::vector::const_iterator it; for ( it = myIds.begin(); it != myIds.end(); ++it ) { @@ -1991,7 +1991,7 @@ public: if ( !actor || !actor->hasIO() ) return; - TColStd_IndexedMapOfInteger idMap; + SVTK_TIndexedMapOfVtkId idMap; selector->GetIndex( actor->getIO(), idMap ); for ( int i = 1; i <= idMap.Extent(); i++ ) diff --git a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx index 08f1210b9..618a1f322 100644 --- a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx +++ b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx @@ -109,9 +109,9 @@ StdMeshers_NumberOfSegments::BuildDistributionTab( const vector& tab, */ //============================================================================= -void StdMeshers_NumberOfSegments::SetNumberOfSegments(int segmentsNumber) +void StdMeshers_NumberOfSegments::SetNumberOfSegments(smIdType segmentsNumber) { - int oldNumberOfSegments = _numberOfSegments; + smIdType oldNumberOfSegments = _numberOfSegments; if (segmentsNumber <= 0) throw SALOME_Exception(LOCALIZED("number of segments must be positive")); _numberOfSegments = segmentsNumber; @@ -126,7 +126,7 @@ void StdMeshers_NumberOfSegments::SetNumberOfSegments(int segmentsNumber) */ //============================================================================= -int StdMeshers_NumberOfSegments::GetNumberOfSegments() const +smIdType StdMeshers_NumberOfSegments::GetNumberOfSegments() const { return _numberOfSegments; } diff --git a/src/StdMeshers/StdMeshers_NumberOfSegments.hxx b/src/StdMeshers/StdMeshers_NumberOfSegments.hxx index bd80c2f0f..80becbbbc 100644 --- a/src/StdMeshers/StdMeshers_NumberOfSegments.hxx +++ b/src/StdMeshers/StdMeshers_NumberOfSegments.hxx @@ -57,12 +57,12 @@ public: * \brief Set the number of segments * \param segmentsNumber - must be greater than zero */ - void SetNumberOfSegments(int segmentsNumber); + void SetNumberOfSegments(smIdType segmentsNumber); /*! * \brief Get the number of segments */ - int GetNumberOfSegments() const; + smIdType GetNumberOfSegments() const; /*! * \brief This enumeration presents available types of distribution