+
+bool SMESHGUI_Selection::isImported( const int ind ) const
+{
+ QString e = entry( ind );
+ _PTR(SObject) SO = SMESH::GetActiveStudyDocument()->FindObjectID( e.toLatin1().constData() );
+ bool res = false;
+ if( SO )
+ {
+ SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( SMESH::SObjectToObject( SO ) );
+ if( !aMesh->_is_nil() )
+ {
+ SALOME_MED::MedFileInfo* inf = aMesh->GetMEDFileInfo();
+ res = strlen( (char*)inf->fileName ) > 0;
+ }
+ }
+ return res;
+}
+
+//=======================================================================
+//function : groupType
+//purpose :
+//=======================================================================
+
+QString SMESHGUI_Selection::groupType( int ind ) const
+{
+ QString e = entry( ind );
+ _PTR(SObject) SO = SMESH::GetActiveStudyDocument()->FindObjectID( e.toLatin1().constData() );
+ QString type;
+ if( SO )
+ {
+ CORBA::Object_var obj = SMESH::SObjectToObject( SO );
+
+ SMESH::SMESH_Group_var aGroup = SMESH::SMESH_Group::_narrow( obj );
+ SMESH::SMESH_GroupOnGeom_var aGroupOnGeom = SMESH::SMESH_GroupOnGeom::_narrow( obj );
+ if( !aGroup->_is_nil() )
+ type = QString( "Group" );
+ else if ( !aGroupOnGeom->_is_nil() )
+ type = QString( "GroupOnGeom" );
+ }
+ return type;
+}