X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_StandardMeshInfosDlg.cxx;h=caf0544665d98dae3d9ac4a9351339b016549dd5;hb=9357f5c87098aff2b95b754d69f66c76d2df9c24;hp=4b7540fc06b2282b6dc7b19bc2523d79374fe9c8;hpb=0635c9fc80f67d1e5dc0e94ec85f487286a92070;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.cxx b/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.cxx index 4b7540fc0..caf054466 100644 --- a/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.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 // + // SMESH SMESHGUI : GUI for SMESH component // File : SMESHGUI_StandardMeshInfosDlg.cxx // Author : Michael ZORIN, Open CASCADE S.A.S. @@ -203,20 +204,20 @@ void SMESHGUI_StandardMeshInfosDlg::DumpMeshInfos() int aDimension = 0; double aNbDimElements = 0; if (aNbVolumes > 0) { - aNbDimElements = aNbVolumes; - aDimension = 3; + aNbDimElements = aNbVolumes; + aDimension = 3; } else if(aNbFaces > 0) { - aNbDimElements = aNbFaces; - aDimension = 2; + aNbDimElements = aNbFaces; + aDimension = 2; } else if(aNbEdges > 0) { - aNbDimElements = aNbEdges; - aDimension = 1; + aNbDimElements = aNbEdges; + aDimension = 1; } else if(aNbNodes > 0) { - aNbDimElements = aNbNodes; - aDimension = 0; + aNbDimElements = aNbNodes; + aDimension = 0; } // information about the mesh @@ -234,15 +235,15 @@ void SMESHGUI_StandardMeshInfosDlg::DumpMeshInfos() aMeshSO->FindSubObject(SMESH::Tag_NodeGroups, anObj); if (anObj) { _PTR(ChildIterator) it = aStudy->NewChildIterator(anObj); - if (it->More()) { + if (it->More()) { anInfo.append(QString("Groups:

")); hasGroup = true; } - for ( ; it->More(); it->Next()) { + for ( ; it->More(); it->Next()) { _PTR(SObject) subObj = it->Value(); CORBA::Object_var anObject = SMESH::SObjectToObject(subObj); - SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(anObject); - if (!aGroup->_is_nil()) { + SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(anObject); + if (!aGroup->_is_nil()) { anInfo.append(QString("- %1
").arg(aGroup->GetName())); anInfo.append(QString("%1
").arg("on nodes")); anInfo.append(QString("%1
").arg(aGroup->Size())); @@ -259,7 +260,7 @@ void SMESHGUI_StandardMeshInfosDlg::DumpMeshInfos() anInfo.append(QString("
")); } } - } + } } // info about groups on edges @@ -271,11 +272,11 @@ void SMESHGUI_StandardMeshInfosDlg::DumpMeshInfos() anInfo.append(QString("Groups:

")); hasGroup = true; } - for ( ; it->More(); it->Next()) { + for ( ; it->More(); it->Next()) { _PTR(SObject) subObj = it->Value(); CORBA::Object_var anObject = SMESH::SObjectToObject(subObj); - SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(anObject); - if (!aGroup->_is_nil()) { + SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(anObject); + if (!aGroup->_is_nil()) { anInfo.append(QString("- %1
").arg(aGroup->GetName())); anInfo.append(QString("%1
").arg("on edges")); anInfo.append(QString("%1
").arg(aGroup->Size())); @@ -292,7 +293,7 @@ void SMESHGUI_StandardMeshInfosDlg::DumpMeshInfos() anInfo.append(QString("
")); } } - } + } } // info about groups on faces @@ -300,15 +301,15 @@ void SMESHGUI_StandardMeshInfosDlg::DumpMeshInfos() aMeshSO->FindSubObject(SMESH::Tag_FaceGroups, anObj); if (anObj) { _PTR(ChildIterator) it = aStudy->NewChildIterator(anObj); - if (!hasGroup && it->More()) { + if (!hasGroup && it->More()) { anInfo.append(QString("Groups:

")); hasGroup = true; } - for ( ; it->More(); it->Next()) { + for ( ; it->More(); it->Next()) { _PTR(SObject) subObj = it->Value(); CORBA::Object_var anObject = SMESH::SObjectToObject(subObj); - SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(anObject); - if (!aGroup->_is_nil()) { + SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(anObject); + if (!aGroup->_is_nil()) { anInfo.append(QString("- %1
").arg(aGroup->GetName())); anInfo.append(QString("%1
").arg("on faces")); anInfo.append(QString("%1
").arg(aGroup->Size())); @@ -325,7 +326,7 @@ void SMESHGUI_StandardMeshInfosDlg::DumpMeshInfos() anInfo.append(QString("
")); } } - } + } } // info about groups on volumes @@ -333,13 +334,13 @@ void SMESHGUI_StandardMeshInfosDlg::DumpMeshInfos() aMeshSO->FindSubObject(SMESH::Tag_VolumeGroups, anObj); if (anObj) { _PTR(ChildIterator) it = aStudy->NewChildIterator(anObj); - if (!hasGroup && it->More()) + if (!hasGroup && it->More()) anInfo.append(QString("Groups:
")); - for ( ; it->More(); it->Next()) { + for ( ; it->More(); it->Next()) { _PTR(SObject) subObj = it->Value(); CORBA::Object_var anObject = SMESH::SObjectToObject(subObj); - SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(anObject); - if (!aGroup->_is_nil()) { + SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(anObject); + if (!aGroup->_is_nil()) { anInfo.append(QString("- %1
").arg(aGroup->GetName())); anInfo.append(QString("%1
").arg("on volumes")); anInfo.append(QString("%1
").arg(aGroup->Size())); @@ -356,7 +357,7 @@ void SMESHGUI_StandardMeshInfosDlg::DumpMeshInfos() anInfo.append(QString("
")); } } - } + } } myInfo->setText(anInfo); @@ -448,10 +449,10 @@ void SMESHGUI_StandardMeshInfosDlg::onHelp() platform = "application"; #endif SUIT_MessageBox::warning(this, tr("WRN_WARNING"), - tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", - platform)). - arg(myHelpFileName)); + tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). + arg(app->resourceMgr()->stringValue("ExternalBrowser", + platform)). + arg(myHelpFileName)); } }