void GEOMBase_Helper::erase( GEOM::GEOM_Object_ptr object, const bool updateView )
{
if ( !object->_is_nil() ) {
- std::string entry = getEntry( object );
+ QString entry = getEntry( object );
getDisplayer()->Erase( new SALOME_InteractiveObject(
- entry.c_str(), "GEOM", strdup( GEOMBase::GetName( object ).toLatin1().constData() ) ), true, updateView );
+ entry.toLatin1().constData(),
+ "GEOM", strdup( GEOMBase::GetName( object ).toLatin1().constData() ) ), true, updateView );
}
}
// Enable activisation of selection
getDisplayer()->SetToActivate( true );
- std::string entry = getEntry( object );
+ QString entry = getEntry( object );
getDisplayer()->Redisplay(new SALOME_InteractiveObject
- (entry.c_str(), "GEOM", strdup(GEOMBase::GetName(object).toLatin1().constData())), false);
+ (entry.toLatin1().constData(), "GEOM", strdup(GEOMBase::GetName(object).toLatin1().constData())), false);
}
if ( withChildren ) {
(GeometryGUI::ClientSObjectToObject(anIt->Value()));
if ( !CORBA::is_nil( aChild ) ) {
if ( !aChild->_is_nil() ) {
- std::string entry = getEntry( aChild );
+ QString entry = getEntry( aChild );
getDisplayer()->Redisplay( new SALOME_InteractiveObject(
- entry.c_str(), "GEOM", strdup( GEOMBase::GetName( aChild ).toLatin1().constData() ) ), false );
+ entry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( aChild ).toLatin1().constData() ) ), false );
}
}
}
GEOM::GEOM_Object_ptr anObj = *anIter;
if ( anObj->_is_nil() )
continue;
- std::string aEntry = getEntry( anObj );
- if ( aEntry != "" )
+ QString anEntry = getEntry( anObj );
+ if ( anEntry != "" )
aListOfIO.Append( new SALOME_InteractiveObject(
- aEntry.c_str(), "GEOM", strdup( GEOMBase::GetName( anObj ).toLatin1().constData() ) ) );
+ anEntry.toLatin1().constData(), "GEOM", strdup( GEOMBase::GetName( anObj ).toLatin1().constData() ) ) );
}
getDisplayer()->LocalSelection( aListOfIO, theMode );
// Function : getEntry
// Purpose :
//================================================================
-char* GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
+QString GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
{
SalomeApp_Study* study = getStudy();
if ( study ) {
- CORBA::String_var objIOR = GEOMBase::GetIORFromObject( object );
- std::string IOR( objIOR );
- if ( IOR != "" ) {
- _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) );
+ QString objIOR = GEOMBase::GetIORFromObject( object );
+ if ( objIOR != "" ) {
+ _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( objIOR.toLatin1().constData() ) );
if ( SO )
- return (char*) TCollection_AsciiString((char*)SO->GetID().c_str()).ToCString();
+ return QString::fromStdString(SO->GetID());
}
}
- return (char*)"";
+ return "";
}
//================================================================
ObjectList::iterator anIter;
for ( anIter = objects.begin(); anIter != objects.end(); ++anIter )
{
- std::string entry = getEntry( *anIter );
- QString aEntry( entry.c_str() );
- LightApp_DataOwner* anOwher = new LightApp_DataOwner( aEntry );
+ QString anEntry = getEntry( *anIter );
+ LightApp_DataOwner* anOwher = new LightApp_DataOwner( anEntry );
aList.append( anOwher );
}
dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
_PTR(Study) aDStudy = appStudy->studyDS();
- std::string IOR = GEOMBase::GetIORFromObject( theFather );
- _PTR(SObject) SObj ( aDStudy->FindObjectIOR( IOR ) );
+ QString IOR = GEOMBase::GetIORFromObject( theFather );
+ _PTR(SObject) SObj ( aDStudy->FindObjectIOR( IOR.toLatin1().constData() ) );
bool inStudy = false;
GEOM::GEOM_Object_var aReturnObject;
if ( !anOp->_is_nil() ) {
GEOM::GEOM_Object_var aFatherObj = anOp->GetMainShape( it.value() );
if ( !aFatherObj->_is_nil() ) {
- std::string aFatherEntry = getEntry( aFatherObj );
+ QString aFatherEntry = getEntry( aFatherObj );
if ( aFatherEntry != "") { // additional checking that object is valid 0020598 EDF 1191
GEOM::GEOM_Object_var aFindedObject = findObjectInFather(aFatherObj, it.key().toLatin1().data() );
//Add Object to study if its not exist