}
QString aTitle = QString(myScalarBarActor->GetTitle());
aTitle.replace(QRegExp("(:\\s).*"),"\\1"+ QString::number(GetNumberControlEntities()));
- myScalarBarActor->SetTitle(aTitle.toLatin1().constData());
+ myScalarBarActor->SetTitle(aTitle.toUtf8().constData());
}
else {
return false;
// Handle( SALOME_InteractiveObject ) anIO = new SALOME_InteractiveObject();
- // anIO->setEntry( theEntry.toLatin1().constData() );
+ // anIO->setEntry( theEntry.toUtf8().constData() );
// get indexes of seleted elements
TopExp::MapShapes( theMainShape, myMapOfShapes );
QString entry = QString( "%1_%2" ).arg( myEntry ).arg( index );
// Create interactive object
Handle( SALOME_InteractiveObject ) anIO = new SALOME_InteractiveObject();
- anIO->setEntry( entry.toLatin1().constData() );
+ anIO->setEntry( entry.toUtf8().constData() );
// Init Actor
anActor->SetVectorMode( myType==TopAbs_EDGE );
anActor->setIO( anIO );
_PTR(Study) study = appStudy->studyDS();
QString entry = owner->entry();
- _PTR(SObject) aSO( study->FindObjectID( entry.toLatin1().data() ) ), aRefSO;
+ _PTR(SObject) aSO( study->FindObjectID( entry.toUtf8().data() ) ), aRefSO;
if( extractReference && aSO && aSO->ReferencedObject( aRefSO ) )
aSO = aRefSO;
_PTR(Study) study = appStudy->studyDS();
QString entry = owner->entry();
- _PTR(SObject) obj (study->FindObjectID(entry.toLatin1().data())), aRefSO;
+ _PTR(SObject) obj (study->FindObjectID(entry.toUtf8().data())), aRefSO;
if( extractReference && obj && obj->ReferencedObject( aRefSO ) )
obj = aRefSO;
if (!obj) return false;
// Check that the entry corresponds to a real object in the Study
// as the object may be deleted or modified after the visual state is saved.
- _PTR(SObject) so = studyDS->FindObjectID(entry.toLatin1().data());
+ _PTR(SObject) so = studyDS->FindObjectID(entry.toUtf8().data());
if (!so) continue; //Skip the not existent entry
std::vector<std::string> paramNames = ip->getAllParameterNames( *entIt );
SMESH_Actor* aGeomAc = SMESH_Actor::SafeDownCast(ac);
if (aGeomAc->hasIO()) {
Handle(SALOME_InteractiveObject) io = aGeomAc->getIO();
- if (io->hasEntry() && strcmp(io->getEntry(), entry.toLatin1().data()) == 0) {
+ if (io->hasEntry() && strcmp(io->getEntry(), entry.toUtf8().data()) == 0) {
isFound = true;
vtkActors.Bind(viewIndex, aGeomAc);
}
// get study
_PTR(Study) study = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() )->studyDS();
// get mesh name
- _PTR(SObject) obj = study->FindObjectID( entry.toLatin1().constData() );
+ _PTR(SObject) obj = study->FindObjectID( entry.toUtf8().constData() );
QString name;
if ( obj )
name = SMESH::fromUtf8(obj->GetName());
QString groupName = myDlg->myGroupListCmBox->currentText();
SMESH::SMESH_IDSource_var newObj =
- editor->Create0DElementsOnAllNodes( meshObject, groupName.toLatin1().data(),
+ editor->Create0DElementsOnAllNodes( meshObject, groupName.toUtf8().data(),
myDlg->myDuplicateElemsChkBox->isChecked() );
int newNb0D = mesh->Nb0DElements() - prevNb0D;
bool isUnique = false;
while (!isUnique) {
aName = theOperation + "_" + QString::number(++aNumber);
- isUnique = (aSet.count(aName.toLatin1().data()) == 0);
+ isUnique = (aSet.count(aName.toUtf8().data()) == 0);
}
return aName;
try {
aMesh = myMeshArray[0]->GetMesh();
- aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ aMesh->SetParameters( aParameters.join(":").toUtf8().constData() );
SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
// concatenate meshes
{
QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( myMainShape, "MAIN_SHAPE" ));
SALOMEDS::SObject_wrap so = geomGen->AddInStudy( myMainShape,
- name.toLatin1().data(),
+ name.toUtf8().data(),
GEOM::GEOM_Object::_nil());
// look for myMainShape in the table
for ( int r = 0, nr = table()->rowCount(); r < nr; ++r ) {
}
QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( shape, "ERROR_SHAPE" ));
SALOMEDS::SObject_wrap so = geomGen->AddInStudy( shape,
- name.toLatin1().data(), myMainShape);
+ name.toUtf8().data(), myMainShape);
if ( !so->_is_nil() ) {
CORBA::String_var name = so->GetName();
CORBA::String_var entry = so->GetID();
else grName = "bad mesh of " + grName;
SMESH::SMESH_Gen_var gen = getSMESHGUI()->GetSMESHGen();
SMESH::ListOfGroups_var groups
- ( gen->MakeGroupsOfBadInputElements(myMesh,curSub,grName.toLatin1().data()) );
+ ( gen->MakeGroupsOfBadInputElements(myMesh,curSub,grName.toUtf8().data()) );
update( UF_ObjBrowser | UF_Model );
if( LightApp_Application* anApp = dynamic_cast<LightApp_Application*>( application() ))
{
try
{
QString anObjEntry = myDlg->selectedObject( 0 );
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() );
if ( !pObj ) return;
SMESH::SMESH_IDSource_var idSource =
QString aMess;
QString anObjEntry = myDlg->selectedObject( 0 );
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() );
if ( !pObj )
{
dlg()->show();
void SMESHGUI_ConvToQuadOp::ConnectRadioButtons( int id )
{
QString anObjEntry = myDlg->selectedObject( 0 );
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() );
if ( !pObj ) return;
SMESH::SMESH_IDSource_var idSource =
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
aPartToCopy = aMeshEditor->MakeIDSource( anElementsId, SMESH::ALL );
}
- QByteArray meshName = myMeshNameEdit->text().toLatin1();
+ QByteArray meshName = myMeshNameEdit->text().toUtf8();
bool toCopyGroups = ( myCopyGroupsCheck->isChecked() );
bool toKeepIDs = ( myKeepIdsCheck->isChecked() );
QFile aFile( fName );
aFile.open( QIODevice::WriteOnly );
- long aWritten = aFile.write( aData.toLatin1(), aLen );
+ long aWritten = aFile.write( aData.toUtf8(), aLen );
aFile.close();
if ( aWritten != aLen ) {
if( vtk_viewer )
{
SUIT_ViewWindow* wnd = vtk_viewer->getViewManager()->getActiveView();
- SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toLatin1().data() );
+ SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toUtf8().data() );
if( !anActor )
- anActor = SMESH::CreateActor( entry.toLatin1().data(), true );
+ anActor = SMESH::CreateActor( entry.toUtf8().data(), true );
if( anActor )
{
SMESH::DisplayActor( wnd, anActor );
- prs = LightApp_Displayer::buildPresentation( entry.toLatin1().data(), aViewFrame );
+ prs = LightApp_Displayer::buildPresentation( entry.toUtf8().data(), aViewFrame );
}
if( prs )
UpdatePrs( prs );
if(viewer_type != SVTK_Viewer::Type())
return res;
- _PTR(SObject) obj = SMESH::getStudy()->FindObjectID( (const char*)entry.toLatin1() );
+ _PTR(SObject) obj = SMESH::getStudy()->FindObjectID( (const char*)entry.toUtf8() );
CORBA::Object_var anObj = SMESH::SObjectToObject( obj );
/*
for ( int i = 0; i < myGroups1.count(); i++ )
{
SMESH::SMESH_Group_var group =
- aMeshEditor->DoubleElements( myGroups1[i], groupName.toLatin1().data() );
+ aMeshEditor->DoubleElements( myGroups1[i], groupName.toUtf8().data() );
if ( group->_is_nil() )
{
if ( toCreateElemGroup )
SMESH::SMESH_Mesh_var mesh = SelectorWdg->GetMesh();
- mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ mesh->SetParameters( aParameters.join(":").toUtf8().constData() );
SMESH::ListOfIDSources_var nodes = new SMESH::ListOfIDSources();
SMESH::ListOfIDSources_var edges = new SMESH::ListOfIDSources();
SMESH::SMESH_MeshEditor_var meshEditor = mesh->GetMeshEditor();
SMESH::ListOfGroups_var groups;
- mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ mesh->SetParameters( aParameters.join(":").toUtf8().constData() );
if ( ExtrMethod_RBut2->isVisible() &&
ExtrMethod_RBut2->isChecked() ) // Extrusion by normal
QString aName;
myTable->GetThreshold(i, aName);
- std::vector<_PTR(SObject)> aList = SMESH::getStudy()->FindObjectByName(aName.toLatin1().constData(), "GEOM");
+ std::vector<_PTR(SObject)> aList = SMESH::getStudy()->FindObjectByName(aName.toUtf8().constData(), "GEOM");
if (aList.size() == 0) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
tr("BAD_SHAPE_NAME").arg(aName));
}
if (myFileName->text() != myLibrary->GetFileName())
- myLibrary->SetFileName( myFileName->text().toLatin1().constData() );
+ myLibrary->SetFileName( myFileName->text().toUtf8().constData() );
bool aResult = false;
} else if (myMode == EDIT || myMode == ADD_TO) {
SMESH::Filter_var aFilter = createFilter();
if (!myListBox->selectedItems().empty() &&
- !myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
- myName->text().toLatin1().constData(),
+ !myLibrary->Replace(myCurrFilterName.toUtf8().constData(),
+ myName->text().toUtf8().constData(),
aFilter.in())) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
tr("ERROR_OF_EDITING"));
if (aFilterMgr->_is_nil())
return;
- myLibrary = aFilterMgr->LoadLibrary(autoExtension(getFileName()).toLatin1().constData());
+ myLibrary = aFilterMgr->LoadLibrary(autoExtension(getFileName()).toUtf8().constData());
if (myLibrary->_is_nil()) {
if (myMode == COPY_FROM) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
return;
} else {
myLibrary = aFilterMgr->CreateLibrary();
- myLibrary->SetFileName(getFileName().toLatin1().constData());
+ myLibrary->SetFileName(getFileName().toUtf8().constData());
}
}
}
SMESH::Filter_var aFilter = createFilter();
- myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
- myName->text().toLatin1().constData(),
+ myLibrary->Replace(myCurrFilterName.toUtf8().constData(),
+ myName->text().toUtf8().constData(),
aFilter);
}
// Fill table with filter parameters
- SMESH::Filter_var aFilter = myLibrary->Copy(theName.toLatin1().constData());
+ SMESH::Filter_var aFilter = myLibrary->Copy(theName.toUtf8().constData());
myCurrFilterName = theName;
myCurrFilter = myListBox->currentRow();
myName->setText(theName);
return;
SMESH::Filter_var aFilter = createFilter();
- myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
- myName->text().toLatin1().constData(),
+ myLibrary->Replace(myCurrFilterName.toUtf8().constData(),
+ myName->text().toUtf8().constData(),
aFilter);
}
myTable->Clear(myTable->GetType());
// add new filter in library
bool aResult = !aFilter->GetPredicate()->_is_nil()
- ? myLibrary->Add(aName.toLatin1().constData(), aFilter)
- : myLibrary->AddEmpty(aName.toLatin1().constData(), (SMESH::ElementType)myTable->GetType());
+ ? myLibrary->Add(aName.toUtf8().constData(), aFilter)
+ : myLibrary->AddEmpty(aName.toUtf8().constData(), (SMESH::ElementType)myTable->GetType());
if (!aResult) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
int anIndex = getIndex(myCurrFilterName);
- if (anIndex == -1 || !myLibrary->Delete(myCurrFilterName.toLatin1().constData())) {
+ if (anIndex == -1 || !myLibrary->Delete(myCurrFilterName.toUtf8().constData())) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
tr("ERROR_OF_DELETING"));
} else {
if (valid)
{
SMESH::Filter_var aFilter = createFilter(myTable->GetType());
- myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
- myName->text().toLatin1().constData(),
+ myLibrary->Replace(myCurrFilterName.toUtf8().constData(),
+ myName->text().toUtf8().constData(),
aFilter);
}
}
bool isUnique = false;
while (!isUnique) {
aName = theOperation + "_" + QString::number(++aNumber);
- isUnique = (aSet.count(std::string(SMESH::toUtf8(aName))) == 0);
+ isUnique = (aSet.count(std::string(aName.toUtf8().constData())) == 0);
}
return aName;
do
{
aResName = aPrefix + QString::number( i++ );
- anObj = SMESH::getStudy()->FindObject( SMESH::toUtf8(aResName) );
+ anObj = SMESH::getStudy()->FindObject( aResName.toUtf8().constData() );
}
while ( anObj );
myName->setText(aResName);
SALOMEDS::Color aColor = theGroup->GetColor();
setGroupColor( aColor );
- myMeshGroupLine->setText(SMESH::fromUtf8(theGroup->GetName()));
+ myMeshGroupLine->setText(theGroup->GetName());
int aType = 0;
switch(theGroup->GetType()) {
{
myNameChanged = true;
myName->blockSignals(true);
- myName->setText(SMESH::fromUtf8(theGroup->GetName()));
+ myName->setText(theGroup->GetName());
myName->blockSignals(false);
}
if (myGeomObjects->length() == 1) {
myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType,
- SMESH::toUtf8(myName->text()),
+ myName->text().toUtf8(),
myGeomObjects[0]);
}
else {
aNewGeomGroupName += myName->text();
SALOMEDS::SObject_var aNewGroupSO =
geomGen->AddInStudy(aGroupVar,
- SMESH::toUtf8(aNewGeomGroupName), aMeshShape);
+ aNewGeomGroupName.toUtf8(), aMeshShape);
}
myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType,
- SMESH::toUtf8(myName->text()),
+ myName->text().toUtf8(),
aGroupVar);
}
resultGroup = SMESH::SMESH_GroupBase::_narrow( myGroupOnGeom );
return false;
myGroupOnFilter = myMesh->CreateGroupFromFilter(aType,
- SMESH::toUtf8(myName->text()),
- myFilter);
+ myName->text().toUtf8(),
+ myFilter);
resultGroup = SMESH::SMESH_GroupBase::_narrow( myGroupOnFilter );
isCreation = true;
}
if( aMeshGroupSO )
anEntryList.append( aMeshGroupSO->GetID().c_str() );
- resultGroup->SetName(SMESH::toUtf8(myName->text().trimmed()));
+ resultGroup->SetName(myName->text().trimmed().toUtf8());
if ( isCreation )
{
if ( !anActor ) return false;
myActorsList.append( anActor );
}
- anActor->setName(SMESH::toUtf8(myName->text()));
+ anActor->setName(myName->text().toUtf8());
QColor c;
int delta;
switch ( myTypeId ) {
if ( !aStudy ) return false;
// mesh
- _PTR(SObject) meshSO = aStudy->FindObjectID( myMeshID.toLatin1().data() );
+ _PTR(SObject) meshSO = aStudy->FindObjectID( myMeshID.toUtf8().data() );
SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( meshSO );
if ( mesh->_is_nil() ) return false;
for ( int i = 0; geomID != geomEnd; ++geomID, ++i )
{
// selected geom
- _PTR(SObject) geomSO = aStudy->FindObjectID( geomID->toLatin1().data() );
+ _PTR(SObject) geomSO = aStudy->FindObjectID( geomID->toUtf8().data() );
GEOM::GEOM_Object_var geom = SMESH::SObjectToInterface<GEOM::GEOM_Object>(geomSO);
if ( geom->_is_nil() ) continue;
// groupNames.append( name );
//printf( "apply() %s %s\n", (*geomID).latin1(), name.latin1() );
- group = mesh->CreateGroupFromGEOM( elemType, name.toLatin1().data(), geom );
+ group = mesh->CreateGroupFromGEOM( elemType, name.toUtf8().data(), geom );
if( !group->_is_nil() )
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( group ) )
anEntryList.append( aSObject->GetID().c_str() );
// study
if (_PTR(Study) aStudy = SMESH::getStudy()) {
// mesh
- if (_PTR(SObject) meshSO = aStudy->FindObjectID( myMeshID.toLatin1().data() )) {
+ if (_PTR(SObject) meshSO = aStudy->FindObjectID( myMeshID.toUtf8().data() )) {
// shape to mesh
_PTR(SObject) anObj, shapeToMesh;
if (meshSO->FindSubObject(1, anObj) && anObj->ReferencedObject(shapeToMesh)) {
QStringList::iterator name = names.begin(), id = ids.begin(), idEnd = ids.end();
for (; id != idEnd; ++id, ++name ) {
// shape SO
- if (_PTR(SObject) shapeSO = aStudy->FindObjectID( id->toLatin1().data() )) {
+ if (_PTR(SObject) shapeSO = aStudy->FindObjectID( id->toUtf8().data() )) {
// check if shape SO is a child of shape to mesh
while ( shapeSO && shapeSO->GetID() != shapeToMesh->GetID() )
if ( shapeSO->Depth() < 2 )
{
SMESH::ListOfGroups_var aList = convert( myGroups );
SMESH::SMESH_Group_var aNewGrp =
- aMesh->UnionListOfGroups( aList, aName.toLatin1().constData() );
+ aMesh->UnionListOfGroups( aList, aName.toUtf8().constData() );
if ( !CORBA::is_nil( aNewGrp ) )
{
aNewGrp->SetColor( getColor() );
{
SMESH::ListOfGroups_var aList = convert( myGroups );
SMESH::SMESH_Group_var aNewGrp =
- aMesh->IntersectListOfGroups( aList, aName.toLatin1().constData() );
+ aMesh->IntersectListOfGroups( aList, aName.toUtf8().constData() );
if ( !CORBA::is_nil( aNewGrp ) )
{
aNewGrp->SetColor( getColor() );
SMESH::ListOfGroups_var aList1 = convert( myGroups1 );
SMESH::ListOfGroups_var aList2 = convert( myGroups2 );
SMESH::SMESH_Group_var aNewGrp =
- aMesh->CutListOfGroups( aList1, aList2, aName.toLatin1().constData() );
+ aMesh->CutListOfGroups( aList1, aList2, aName.toUtf8().constData() );
if ( !CORBA::is_nil( aNewGrp ) )
{
aNewGrp->SetColor( getColor() );
(SMESH::NB_COMMON_NODES_ENUM) myNbNoCombo->currentIndex();
SMESH::SMESH_Group_var aNewGrp =
- aMesh->CreateDimGroup( aList, anElemType, aName.toLatin1().constData(),
+ aMesh->CreateDimGroup( aList, anElemType, aName.toUtf8().constData(),
aNbCoNodes, myUnderlOnlyChk->isChecked() );
if ( !CORBA::is_nil( aNewGrp ) )
{
SMESH::SMESH_Group_var aGroup;
try {
if ( !theMesh->_is_nil() )
- aGroup = theMesh->CreateGroup( theType, SMESH::toUtf8(theGroupName) );
+ aGroup = theMesh->CreateGroup( theType, theGroupName.toUtf8() );
}
catch( const SALOME::SALOME_Exception& S_ex ) {
SalomeApp_Tools::QtCatchCorbaException( S_ex );
isVariable = false;
}
const char* text() const {
- ((QByteArray&) myTextAsBytes) = myText.toLatin1(); return myTextAsBytes.constData();
+ ((QByteArray&) myTextAsBytes) = myText.toUtf8(); return myTextAsBytes.constData();
}
};
try {
// load plugin library
if(MYDEBUG) MESSAGE("Loading client meshers plugin library ...");
- LibHandle libHandle = LoadLib( aClientLibName.toLatin1().data() );
+ LibHandle libHandle = LoadLib( aClientLibName.toUtf8().data() );
if (!libHandle) {
// report any error, if occurred
{
try {
SMESH::SMESH_Hypothesis_var aHypothesis;
aHypothesis = SMESHGUI::GetSMESHGen()->CreateHypothesis(aHypType.toLatin1().data(),
- aServLib.toLatin1().data());
+ aServLib.toUtf8().data());
if (!aHypothesis->_is_nil()) {
_PTR(SObject) aHypSObject = SMESH::FindSObject(aHypothesis.in());
if (aHypSObject) {
HypothesisData* aHypData = GetHypothesisData(aHypType);
QString aServLib = aHypData->ServerLibName;
return SMESHGUI::GetSMESHGen()->IsApplicable( aHypType.toLatin1().data(),
- aServLib.toLatin1().data(),
+ aServLib.toUtf8().data(),
theGeomObject,
toCheckAll);
}
bool isMesh = true;
for ( int i = 0; i < ids.count() && isMesh; ++i )
{
- _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( ids[i].toLatin1().constData() );
+ _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( ids[i].toUtf8().constData() );
mySrcMesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( sobj );
//isMesh = !mySrcMesh->_is_nil(); // EAP - it's sometimes necessary to copy to a new mesh
}
for ( int i = 0; i < entries.count(); ++i )
{
SMESH::SMESH_GroupBase_var grp;
- if ( _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toLatin1().constData() ))
+ if ( _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toUtf8().constData() ))
grp = SMESH::SObjectToInterface<SMESH::SMESH_GroupBase>( sobj );
if ( grp->_is_nil() ) {
msg = tr( "SMESH_NOT_ONLY_GROUPS" );
for ( int i = 0; i < entries.count(); ++i )
{
SMESH::SMESH_IDSource_var idSource;
- if ( _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toLatin1().constData() ))
+ if ( _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toUtf8().constData() ))
idSource = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( sobj );
if ( !idSource->_is_nil() ) {
SMESH::array_of_ElementType_var types = idSource->GetTypes();
groups->length( entries.count() );
for ( int i = 0; i < entries.count(); ++i )
{
- _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toLatin1().constData() );
+ _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toUtf8().constData() );
SMESH::SMESH_IDSource_var grp = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( sobj );
SMESH::array_of_ElementType_var types = grp->GetTypes();
if ( types->length() < 1 || types[0] != goodType )
SMESH::SMESH_Group_var newGrp;
SMESH::SMESH_Mesh_var newMesh;
CORBA::Long nbAdded = aMeshEditor->MakeBoundaryElements( mode,
- groupName.toLatin1().constData(),
- meshName.toLatin1().constData(),
+ groupName.toUtf8().constData(),
+ meshName.toUtf8().constData(),
copyAll,
groups,
newMesh.out(),
ok = true;
for ( int i = 0; i < entries.count(); ++i )
- if ( SMESH_Actor* actor = SMESH::FindActorByEntry( entries[i].toLatin1().constData() ))
+ if ( SMESH_Actor* actor = SMESH::FindActorByEntry( entries[i].toUtf8().constData() ))
SMESH::Update(actor->getIO(),actor->GetVisibility());
SMESH::RepaintCurrentView();
}
if (aMeshEditor->_is_nil())
return true;
- aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ aMesh->SetParameters( aParameters.join(":").toUtf8().constData() );
bool ok;
int anId = myDlg->myId->text().toInt( &ok );
// mesh
QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
- _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
+ _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() );
if (!pMesh) return false;
SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pMesh );
QStringList::const_iterator aSubShapesIter = aGEOMs.begin();
for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++) {
QString aSubGeomEntry = (*aSubShapesIter);
- _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toLatin1().data());
+ _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toUtf8().data());
if (!pSubGeom) return false;
GEOM::GEOM_Object_var aSubGeomVar =
QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
- _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
+ _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() );
if ( pMesh ) {
QStringList algoNames;
if ( algo &&
algo->InputTypes.empty() && // builds all dimensions it-self
!algo->IsSupportSubmeshes )
- return CORBA::string_dup( algoNames[0].toLatin1().data() );
+ return CORBA::string_dup( algoNames[0].toUtf8().data() );
}
// GEOM::GEOM_Object_var geom;
-// if (_PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() ))
+// if (_PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() ))
// geom = SMESH::SObjectToInterface<GEOM::GEOM_Object>( pGeom );
// if ( !geom->_is_nil() && geom->GetShapeType() >= GEOM::FACE ) { // WIRE, EDGE as well
if ( algo &&
algo->InputTypes.empty() && // builds all dimensions it-self
!algo->IsSupportSubmeshes )
- return CORBA::string_dup( algoNames[0].toLatin1().data() );
+ return CORBA::string_dup( algoNames[0].toUtf8().data() );
}
// }
}
{
QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
- _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
- _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() );
+ _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() );
+ _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() );
if ( pMesh && pGeom ) {
GEOM::GEOM_Object_var geom = SMESH::SObjectToInterface<GEOM::GEOM_Object>( pGeom );
if ( !geom->_is_nil() ) {
//Check geometry for mesh
QString anObjEntry = myDlg->selectedObject(SMESHGUI_MeshDlg::Obj);
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID(anObjEntry.toLatin1().data());
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID(anObjEntry.toUtf8().data());
if (pObj)
{
SMESH::SMESH_Mesh_var aMeshVar =
int iSubSh = 0;
for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++, iSubSh++) {
QString aSubGeomEntry = (*aSubShapesIter);
- _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toLatin1().data());
+ _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toUtf8().data());
if( pSubGeom ) {
SALOMEDS_SObject* sobj = _CAST(SObject,pSubGeom);
} else {
// get geometry by selected sub-mesh
QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() );
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
if (!aGeomVar->_is_nil()) {
aSeq->length(1);
// enable/disable popup for choice of geom selection way
bool enable = false;
QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
- if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() )) {
+ if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() )) {
SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pMesh );
if ( !mesh->_is_nil() ) {
//rnv: issue 21056: EDF 1608 SMESH: Dialog Box "Create Sub Mesh": focus should automatically switch to geometry
QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
- _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() );
+ _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() );
if ( !pGeom || GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() )->_is_nil() )
myDlg->activateObject(SMESHGUI_MeshDlg::Geom);
enable = ( shapeDim > 1 ) && ( mesh->NbEdges() > 0 );
{
QString aMeshEntry = myDlg->selectedObject
( myToCreate ? SMESHGUI_MeshDlg::Mesh : SMESHGUI_MeshDlg::Obj );
- if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() )) {
+ if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() )) {
SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface<SMESH::SMESH_Mesh>( pMesh );
if ( !mesh->_is_nil() && CORBA::is_nil( mesh->GetShapeToMesh() )) {
theMess = tr( "IMPORTED_MESH" );
}
return true;
}
- _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() );
+ _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() );
if ( !pGeom || GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() )->_is_nil() )
{
theMess = tr( "GEOMETRY_OBJECT_IS_NULL" );
theMess = tr( "MESH_IS_NOT_DEFINED" );
return false;
}
- _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
+ _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() );
if ( !pMesh || SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() )->_is_nil() )
{
theMess = tr( "MESH_IS_NULL" );
QString aCurrentGeomToSelect;
if ( !theMeshType.isEmpty() ) {
aCurrentGeomToSelect = myDlg->selectedObject( myToCreate ? SMESHGUI_MeshDlg::Geom : SMESHGUI_MeshDlg::Obj );
- if ( _PTR(SObject) so = SMESH::getStudy()->FindObjectID( aCurrentGeomToSelect.toLatin1().data() )) {
+ if ( _PTR(SObject) so = SMESH::getStudy()->FindObjectID( aCurrentGeomToSelect.toUtf8().data() )) {
aGeomVar = SMESH::GetGeom( so );
}
if ( aCurrentGeomToSelect != myLastGeomToSelect )
{
anEntry = myDlg->selectedObject
( myToCreate ? SMESHGUI_MeshDlg::Mesh : SMESHGUI_MeshDlg::Obj );
- if ( _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anEntry.toLatin1().data() ))
+ if ( _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anEntry.toUtf8().data() ))
{
CORBA::Object_ptr Obj = _CAST( SObject,pObj )->GetObject();
if ( myToCreate ) // mesh and geom may be selected
{
aMeshVar = SMESH::SMESH_Mesh::_narrow( Obj );
anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
- if ( _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( anEntry.toLatin1().data() ))
+ if ( _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( anEntry.toUtf8().data() ))
aGeomVar= GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
}
else // edition: sub-mesh may be selected
if ( !myToCreate ) // mesh to edit can be selected
{
anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
- if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( anEntry.toLatin1().data() ))
+ if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( anEntry.toUtf8().data() ))
{
aMeshVar = SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() );
if ( !aMeshVar->_is_nil() )
}
if ( aGeomVar->_is_nil() ) {
anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
- if ( _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( anEntry.toLatin1().data() ))
+ if ( _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( anEntry.toUtf8().data() ))
{
aGeomVar= GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
}
}
SMESH::SMESH_Hypothesis_var hyp =
- SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
- aServerLib.toLatin1().data(),
+ SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toUtf8().data(),
+ aServerLib.toUtf8().data(),
aMeshVar,
aGeomVar,
/*byMesh = */isSubMesh);
if ( hyp->_is_nil() && isSubMesh )
hyp = SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(),
- aServerLib.toLatin1().data(),
+ aServerLib.toUtf8().data(),
aMeshVar,
aGeomVar,
/*byMesh = */false);
aMeshEntry = aGeomEntry;
if ( aMeshEntry != aGeomEntry ) { // Get Geom object from Mesh of a sub-mesh being edited
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() );
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
aMeshEntry = ( aGeomVar->_is_nil() ) ? QString() : SMESH::toQStr( aGeomVar->GetStudyEntry() );
}
if ( aMeshEntry == "" && aGeomEntry == "" ) { // get geom of an object being edited
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() );
bool isMesh;
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj, &isMesh );
if ( !aGeomVar->_is_nil() )
if ( anObjEntry != "" && aGeomEntry != "" && aMeshEntry == "" ) {
// take geometry from submesh being created
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() );
if ( pObj ) {
// if current object is sub-mesh
SMESH::SMESH_subMesh_var aSubMeshVar =
for ( int i = 0; it!=aList.end(); it++, ++i )
{
QString aGeomEntry = *it;
- _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() );
+ _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() );
GEOM::GEOM_Object_var aGeomVar =
GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
// get mesh object
QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
- _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() );
+ _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() );
SMESH::SMESH_Mesh_var aMeshVar =
SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() );
if (aMeshVar->_is_nil())
{
//QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
QString aGeomEntry = aGEOMs.first();
- _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toLatin1().data() );
+ _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() );
aGeomVar = GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() );
}
else if (aGEOMs.count() > 1)
QStringList::const_iterator aSubShapesIter = aGEOMs.begin();
for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++, iSubSh++) {
QString aSubGeomEntry = (*aSubShapesIter);
- _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toLatin1().data());
+ _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toUtf8().data());
GEOM::GEOM_Object_var aSubGeomVar =
GEOM::GEOM_Object::_narrow(_CAST(SObject,pSubGeom)->GetObject());
TopAbs_ShapeEnum aSubShapeType = (TopAbs_ShapeEnum)aSubGeomVar->GetShapeType();
aNewGeomGroupName += aName;
SALOMEDS::SObject_wrap aNewGroupSO =
geomGen->AddInStudy( aGeomVar,
- aNewGeomGroupName.toLatin1().data(), mainGeom);
+ aNewGeomGroupName.toUtf8().data(), mainGeom);
}
}
}
SUIT_OverrideCursor aWaitCursor;
// create sub-mesh
- SMESH::SMESH_subMesh_var aSubMeshVar = aMeshVar->GetSubMesh( aGeomVar, aName.toLatin1().data() );
+ SMESH::SMESH_subMesh_var aSubMeshVar = aMeshVar->GetSubMesh( aGeomVar, aName.toUtf8().data() );
_PTR(SObject) aSubMeshSO = SMESH::FindSObject( aSubMeshVar.in() );
if ( aSubMeshSO ) {
- SMESH::SetName( aSubMeshSO, aName.toLatin1().data() );
+ SMESH::SetName( aSubMeshSO, aName.toUtf8().data() );
theEntryList.append( aSubMeshSO->GetID().c_str() );
}
do
{
aResName = aPrefix + QString::number( i++ );
- anObj = aStudy->FindObject( aResName.toLatin1().data() );
+ anObj = aStudy->FindObject( aResName.toUtf8().data() );
}
while ( anObj );
void SMESHGUI_MeshOp::readMesh()
{
QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() );
if ( !pObj )
return;
return false;
QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toLatin1().data() );
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() );
if ( !pObj )
return false;
}
// set mesh object to SMESHGUI_ShapeByMeshOp and start it
QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
- if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toLatin1().data() )) {
+ if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() )) {
SMESH::SMESH_Mesh_var aMeshVar =
SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() );
if ( !aMeshVar->_is_nil() ) {
if ( !aGeomVar->_is_nil() )
{
QString ID = SMESH::toQStr( aGeomVar->GetStudyEntry() );
- if ( _PTR(SObject) aGeomSO = SMESH::getStudy()->FindObjectID( ID.toLatin1().data() )) {
+ if ( _PTR(SObject) aGeomSO = SMESH::getStudy()->FindObjectID( ID.toUtf8().data() )) {
selectObject( aGeomSO );
selectionDone();
}
aParameters << myNode1->text();
if(myType == Type_3d )
aParameters << myNode2->text();
- myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ myMesh->SetParameters( aParameters.join(":").toUtf8().constData() );
}
QList<int> ids;
getIds(ids);
try {
SMESH::SMESH_Pattern_var aPattern = SMESH::GetPattern();
- if (!aPattern->LoadFromFile(theName.toLatin1().data()) ||
+ if (!aPattern->LoadFromFile(theName.toUtf8().data()) ||
(myType == Type_2d && !aPattern->Is2D())) {
SMESH::SMESH_Pattern::ErrorCode aCode = aPattern->GetErrorCode();
QString aMess;
theBaseName : theBaseName + "_" + thePostfix;
if ( _PTR(Study) aStudy = getStudy() ) {
QString name = baseName;
- while ( !aStudy->FindObjectByName( name.toLatin1().data(), "SMESH" ).empty() ) {
+ while ( !aStudy->FindObjectByName( name.toUtf8().data(), "SMESH" ).empty() ) {
int nb = 0;
QStringList names = name.split("_", QString::KeepEmptyParts);
if ( names.count() > 0 ) {
{
QStringList aParameters;
aParameters << myMaxAngleSpin->text();
- myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ myMesh->SetParameters( aParameters.join(":").toUtf8().constData() );
}
SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor();
double aMaxAngle = myMaxAngleSpin->GetValue() * M_PI / 180.0;
aParameters << myDirSpin[0]->text();
aParameters << myDirSpin[1]->text();
aParameters << myDirSpin[2]->text();
- myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ myMesh->SetParameters( aParameters.join(":").toUtf8().constData() );
SMESH::PointStruct_var point = new SMESH::PointStruct;
point->x = myPointSpin[0]->GetValue();
try {
_PTR(SObject) aSobj = SMESH::FindSObject( theMesh );
SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor();
- theMesh->SetParameters( theParameters.join(":").toLatin1().constData() );
+ theMesh->SetParameters( theParameters.join(":").toUtf8().constData() );
aNodeId = aMeshEditor->AddNode( x, y, z );
if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( aSobj->GetID().c_str() ) ) {
aVisualObj->Update( true );
point.y = myDlg->myY->GetValue();
point.z = myDlg->myZ->GetValue();
- aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ aMesh->SetParameters( aParameters.join(":").toUtf8().constData() );
aResult = aMeshEditor->Reorient2D( myObject, direction, face, point );
}
{
// check object
QString objectEntry = myDlg->selectedObject( EObject );
- _PTR(SObject) pSObject = SMESH::getStudy()->FindObjectID( objectEntry.toLatin1().data() );
+ _PTR(SObject) pSObject = SMESH::getStudy()->FindObjectID( objectEntry.toUtf8().data() );
myObject = SMESH::SMESH_IDSource::_narrow( _CAST( SObject,pSObject )->GetObject() );
if ( myObject->_is_nil() )
{
if ( myDlg->myConstructorGrp->checkedId() == CONSTRUCTOR_VOLUME )
{
objectEntry = myDlg->selectedObject( EVolumes );
- _PTR(SObject) pSObject = SMESH::getStudy()->FindObjectID( objectEntry.toLatin1().data() );
+ _PTR(SObject) pSObject = SMESH::getStudy()->FindObjectID( objectEntry.toUtf8().data() );
myVolumeObj = SMESH::SObjectToInterface< SMESH::SMESH_IDSource>( pSObject );
if ( myVolumeObj->_is_nil() )
{
SMESH::SMESH_Mesh_var mesh = SelectorWdg->GetMesh();
- mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ mesh->SetParameters( aParameters.join(":").toUtf8().constData() );
SMESH::ListOfIDSources_var nodes = new SMESH::ListOfIDSources();
SMESH::ListOfIDSources_var edges = new SMESH::ListOfIDSources();
if(CheckBoxMesh->isChecked()) {
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, false);
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, false);
}
break;
if(CheckBoxMesh->isChecked()) {
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
groups = aMeshEditor->RotateObjectMakeGroups(myObjects[i], anAxis, anAngle);
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
groups = aMeshEditor->RotateMakeGroups(anElementsId, anAxis, anAngle);
}
}
if(CheckBoxMesh->isChecked()) {
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, true);
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true);
}
}
for ( int i = 0; i < myObjects.count(); i++ ) {
QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
mesh = aMeshEditor->RotateObjectMakeMesh(myObjects[i], anAxis, anAngle, makeGroups,
- aName.toLatin1().data());
+ aName.toUtf8().data());
if (!mesh->_is_nil()) {
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
anEntryList.append( aSObject->GetID().c_str() );
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups,
- LineEditNewMesh->text().toLatin1().data());
+ LineEditNewMesh->text().toUtf8().data());
if (!mesh->_is_nil()) {
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
anEntryList.append( aSObject->GetID().c_str() );
if ( CheckBoxMesh->isChecked() )
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters( aParameters.join( ":" ).toLatin1().constData() );
+ myMeshes[i]->SetParameters( aParameters.join( ":" ).toUtf8().constData() );
aMeshEditor->Scale(myObjects[i], aPoint, aScaleFact, false);
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
- myMeshes[0]->SetParameters( aParameters.join( ":" ).toLatin1().constData() );
+ myMeshes[0]->SetParameters( aParameters.join( ":" ).toUtf8().constData() );
aMeshEditor->Scale( src, aPoint, aScaleFact, false);
}
break;
if(CheckBoxMesh->isChecked())
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
groups = aMeshEditor->ScaleMakeGroups(myObjects[i], aPoint, aScaleFact);
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
groups = aMeshEditor->ScaleMakeGroups( src, aPoint, aScaleFact);
}
}
if(CheckBoxMesh->isChecked()) {
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->Scale(myObjects[i], aPoint, aScaleFact, true);
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->Scale( src, aPoint, aScaleFact, true);
}
}
for ( int i = 0; i < myObjects.count(); i++ ) {
QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
mesh = aMeshEditor->ScaleMakeMesh(myObjects[i], aPoint, aScaleFact, makeGroups,
- aName.toLatin1().data());
+ aName.toUtf8().data());
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
anEntryList.append( aSObject->GetID().c_str() );
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL);
mesh = aMeshEditor->ScaleMakeMesh( src, aPoint, aScaleFact, makeGroups,
- LineEditNewMesh->text().toLatin1().data());
+ LineEditNewMesh->text().toUtf8().data());
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
anEntryList.append( aSObject->GetID().c_str() );
}
{
if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
{
- _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
CORBA::Object_var obj = SMESH::SObjectToObject( sobj );
SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource::_narrow( obj );
if ( !CORBA::is_nil( idSrc ) )
bool SMESHGUI_Selection::isQuadratic( int ind ) const
{
- _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
if ( !so )
return false;
SMESH::SMESH_IDSource_var idSource = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( so );
{
if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
{
- _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
CORBA::Object_var obj = SMESH::SObjectToObject( sobj );
if ( !CORBA::is_nil( obj ) ) {
{
if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
{
- _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
CORBA::Object_var obj = SMESH::SObjectToObject( sobj );
if ( !CORBA::is_nil( obj ) ) {
int dim = -1;
if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
{
- _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
CORBA::Object_var obj = SMESH::SObjectToObject( sobj );
if ( !CORBA::is_nil( obj ) ) {
myTypes[ind].startsWith("Mesh " )))
{
QMap<int,int> modeMap;
- _PTR(SObject) meshSO = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) meshSO = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
_PTR(SComponent) component = meshSO->GetFatherComponent();
if ( meshSO->Depth() - component->Depth() > 1 ) // sub-mesh, get a mesh
if ( maxDim < 2 ) // we can preview 1D or 2D
{
QMap<int,int> modeMap;
- _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
SMESHGUI_PrecomputeOp::getAssignedAlgos( pMesh, modeMap );
if ( modeMap.size() > 1 )
return (( modeMap.contains( SMESH::DIM_3D )) ||
{
if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
{
- _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
GEOM::GEOM_Object_var shape = SMESH::GetShapeOnMeshOrSubMesh( so );
return !shape->_is_nil();
}
bool isEditable = true;
if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] == "Hypothesis" )
{
- _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
SMESH::SMESH_Hypothesis_var hyp = SMESH::SObjectToInterface<SMESH::SMESH_Hypothesis>( so );
if ( !hyp->_is_nil() )
{
{
if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" )
{
- SMESH_Actor* actor = SMESH::FindActorByEntry( entry( ind ).toLatin1().data() );
+ SMESH_Actor* actor = SMESH::FindActorByEntry( entry( ind ).toUtf8().data() );
if ( actor && actor->hasIO() ) {
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetCurrentVtkView() )
return aViewWindow->isVisible( actor->getIO() );
{
if ( ind >= 0 )
{
- _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
if ( sobj )
return SMESH::getStudy()->GetUseCaseBuilder()->HasChildren( sobj );
}
if ( ind >= 0 )
{
_PTR(Study) study = SMESH::getStudy();
- _PTR(SObject) sobj = study->FindObjectID( entry( ind ).toLatin1().data() );
+ _PTR(SObject) sobj = study->FindObjectID( entry( ind ).toUtf8().data() );
if ( sobj && study->GetUseCaseBuilder()->IsUseCaseNode( sobj ) ) {
_PTR(UseCaseIterator) it = study->GetUseCaseBuilder()->GetUseCaseIterator( sobj );
for ( it->Init( false ); it->More(); it->Next() ) nb++;
int SMESHGUI_Selection::type( const QString& entry )
{
int res = -1;
- _PTR(SObject) obj = SalomeApp_Application::getStudy()->FindObjectID( entry.toLatin1().data() );
+ _PTR(SObject) obj = SalomeApp_Application::getStudy()->FindObjectID( entry.toUtf8().data() );
if ( obj ) {
_PTR(SObject) ref;
if ( obj->ReferencedObject( ref ) )
bool SMESHGUI_Selection::isImported( const int ind ) const
{
bool res = false;
- _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().constData() );
+ _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().constData() );
if ( sobj )
{
SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( SMESH::SObjectToObject( sobj ) );
QString SMESHGUI_Selection::groupType( int ind ) const
{
- _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toLatin1().constData() );
+ _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().constData() );
if ( sobj )
{
SMESH::SMESH_Group_var g = SMESH::SObjectToInterface<SMESH::SMESH_Group>( sobj );
if( t<0 )
{
//try to get GEOM type
- _PTR( SObject ) sobj = aStudy->FindObjectID( str.toLatin1().data() );
+ _PTR( SObject ) sobj = aStudy->FindObjectID( str.toUtf8().data() );
if( sobj )
{
GEOM::GEOM_Object_var obj = GEOM::GEOM_Object::_narrow(
int id = _id.toInt( &ok );
if( ok )
{
- _PTR( SObject ) sobj = aStudy->FindObjectID( entry.toLatin1().data() );
+ _PTR( SObject ) sobj = aStudy->FindObjectID( entry.toUtf8().data() );
SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow(
dynamic_cast<SALOMEDS_SObject*>( sobj.get() )->GetObject() );
SMESH::SMESH_subMesh_var submesh = SMESH::SMESH_subMesh::_narrow(
// GEOM_Object is published -> no need to UnRegister()
myGeomObj = GEOM::GEOM_Object::_duplicate
(SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement
- ( myMesh.in(), elemID, myDlg->myGeomName->text().toLatin1().constData()) );
+ ( myMesh.in(), elemID, myDlg->myGeomName->text().toUtf8().constData()) );
}
else
{
QString aNewGeomGroupName ( myDlg->myGeomName->text() );
SALOMEDS::SObject_wrap aNewGroupSO =
geomGen->AddInStudy( aGeomObject,
- aNewGeomGroupName.toLatin1().data(), aMeshShape);
+ aNewGeomGroupName.toUtf8().data(), aMeshShape);
// get a GEOM_Object already published, which doesn't need UnRegister()
CORBA::Object_var obj = aNewGroupSO->GetObject();
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
- myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ myMesh->SetParameters( aParameters.join(":").toUtf8().constData() );
if ( CheckBoxParametric->isChecked() ) {
if(CheckBoxMesh->isChecked())
int nbObj = 0;
for ( int i = 0; i < entries.count() ; ++i )
{
- _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( entries[i].toLatin1().data() );
+ _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( entries[i].toUtf8().data() );
SMESH::SMESH_IDSource_var obj = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( pObj );
if( !CORBA::is_nil( obj ))
{
if(CheckBoxMesh->isChecked())
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, false );
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
}
break;
if(CheckBoxMesh->isChecked())
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
groups = aMeshEditor->MirrorObjectMakeGroups(myObjects[i], aMirror, aMirrorType);
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
groups = aMeshEditor->MirrorMakeGroups(anElementsId, aMirror, aMirrorType);
}
}
if(CheckBoxMesh->isChecked())
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, true);
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, true);
}
}
for ( int i = 0; i < myObjects.count(); i++ ) {
QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
mesh = aMeshEditor->MirrorObjectMakeMesh(myObjects[i], aMirror, aMirrorType, makeGroups,
- aName.toLatin1().data());
+ aName.toUtf8().data());
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
anEntryList.append( aSObject->GetID().c_str() );
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
- LineEditNewMesh->text().toLatin1().data());
+ LineEditNewMesh->text().toUtf8().data());
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
anEntryList.append( aSObject->GetID().c_str() );
}
if(CheckBoxMesh->isChecked())
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->TranslateObject(myObjects[i], aVector, false);
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->Translate(anElementsId, aVector, false);
}
break;
if(CheckBoxMesh->isChecked()) {
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
groups = aMeshEditor->TranslateObjectMakeGroups(myObjects[i],aVector);
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
groups = aMeshEditor->TranslateMakeGroups(anElementsId, aVector);
}
}
if(CheckBoxMesh->isChecked()) {
for ( int i = 0; i < myObjects.count(); i++ ) {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->TranslateObject(myObjects[i], aVector, true);
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
aMeshEditor->Translate(anElementsId, aVector, true);
}
}
for ( int i = 0; i < myObjects.count(); i++ ) {
QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) );
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor();
- myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
mesh = aMeshEditor->TranslateObjectMakeMesh(myObjects[i], aVector, makeGroups,
- aName.toLatin1().data());
+ aName.toUtf8().data());
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
anEntryList.append( aSObject->GetID().c_str() );
}
}
else {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor();
- myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData());
+ myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData());
mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups,
- LineEditNewMesh->text().toLatin1().data());
+ LineEditNewMesh->text().toUtf8().data());
if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
anEntryList.append( aSObject->GetID().c_str() );
}
{
if (getStudy()->GetProperties()->IsLocked())
return;
- SMESHGUI::GetSMESHGen()->SetName(theSObject->GetIOR().c_str(), theName.toLatin1().data());
+ SMESHGUI::GetSMESHGen()->SetName(theSObject->GetIOR().c_str(), theName.toUtf8().data());
}
void SetValue (_PTR(SObject) theSObject, const QString& theValue)
aBuilder->FindOrCreateAttribute(theSObject, "AttributeComment");
_PTR(AttributeComment) aComment = anAttr;
if (aComment)
- aComment->SetValue(theValue.toLatin1().data());
+ aComment->SetValue(theValue.toUtf8().data());
}
void setFileName (_PTR(SObject) theSObject, const QString& theValue)
aBuilder->FindOrCreateAttribute(theSObject, "AttributeExternalFileDef");
_PTR(AttributeExternalFileDef) aFileName = anAttr;
if (aFileName)
- aFileName->SetValue(theValue.toLatin1().data());
+ aFileName->SetValue(theValue.toUtf8().data());
}
void setFileType (_PTR(SObject) theSObject, const QString& theValue)
aBuilder->FindOrCreateAttribute(theSObject, "AttributeFileType");
_PTR(AttributeFileType) aFileType = anAttr;
if (aFileType)
- aFileType->SetValue(theValue.toLatin1().data());
+ aFileType->SetValue(theValue.toUtf8().data());
}
CORBA::Object_var SObjectToObject (_PTR(SObject) theSObject )
aDomainRoot = theStudyBuilder->NewObjectToTag(theSComponentMesh,theDomainRootTag);
SALOMEDS::GenericAttribute_var anAttr = theStudyBuilder->FindOrCreateAttribute(aDomainRoot,"AttributeName");
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
- aName->SetValue(theName.toLatin1().data());
+ aName->SetValue(theName.toUtf8().data());
aName->UnRegister();
anAttr = theStudyBuilder->FindOrCreateAttribute(aDomainRoot,"AttributePixMap");
SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
SALOMEDS::GenericAttribute_var anAttr =
theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeName");
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
- aName->SetValue(theAppliedDomainMEN.toLatin1().data());
+ aName->SetValue(theAppliedDomainMEN.toUtf8().data());
aName->UnRegister();
anAttr = theStudyBuilder->FindOrCreateAttribute(anAppliedDomainSO,"AttributeSelectable");
SALOMEDS::AttributeSelectable_var aSelAttr = SALOMEDS::AttributeSelectable::_narrow(anAttr);
aSubMeshesRoot = myStudyBuilder->NewObjectToTag(aMeshSO,aShapeTag);
anAttr = myStudyBuilder->FindOrCreateAttribute(aSubMeshesRoot,"AttributeName");
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
- aName->SetValue(aSubMeshName.toLatin1().data());
+ aName->SetValue(aSubMeshName.toUtf8().data());
aName->UnRegister();
anAttr = myStudyBuilder->FindOrCreateAttribute(aSubMeshesRoot,"AttributeSelectable");
SALOMEDS::AttributeSelectable_var aSelAttr = SALOMEDS::AttributeSelectable::_narrow(anAttr);
try
{
if( isCreation() )
- SMESH::SetName( SMESH::FindSObject( h ), myName->text().toLatin1().constData() );
+ SMESH::SetName( SMESH::FindSObject( h ), myName->text().toUtf8().constData() );
// threshold
h->SetVarParameter( myThreshold->text().toLatin1().constData(), "SetSizeThreshold" );
params << myPointSpin[0]->text();
params << myPointSpin[1]->text();
params << myPointSpin[2]->text();
- h->SetVarParameter( params.join(":").toLatin1().constData(), "SetFixedPoint" );
+ h->SetVarParameter( params.join(":").toUtf8().constData(), "SetFixedPoint" );
params.clear();
SMESH::PointStruct ps;
params << spins[ax][1]->text();
params << spins[ax][2]->text();
}
- h->SetVarParameter( params.join(":").toLatin1().constData(), "SetAxesDirs" );
+ h->SetVarParameter( params.join(":").toUtf8().constData(), "SetAxesDirs" );
SMESH::DirStruct axDir[3];
for ( int ax = 0; ax < 3; ++ax )
QString aServLib = aHypData->ServerLibName;
QString aHypType = aHypData->TypeName;
try {
- set( gen->CreateHypothesis(aHypType.toLatin1().data(), aServLib.toLatin1().data()));
+ set( gen->CreateHypothesis(aHypType.toLatin1().data(), aServLib.toUtf8().data()));
}
catch (const SALOME::SALOME_Exception & S_ex) {
SalomeApp_Tools::QtCatchCorbaException(S_ex);
try
{
if( isCreation() )
- SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.toLatin1().data() );
+ SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.toUtf8().data() );
- h->SetVarParameter( h_data.myNbSegVarName.toLatin1().constData(), "SetNumberOfSegments" );
+ h->SetVarParameter( h_data.myNbSegVarName.toUtf8().constData(), "SetNumberOfSegments" );
h->SetNumberOfSegments( h_data.myNbSeg );
int distr = h_data.myDistrType;
if ( distr == 0 )
h->SetDistrType( distr ); // this is actually needed at non-uniform -> uniform switch
if( distr==1 ) {
- h->SetVarParameter( h_data.myScaleVarName.toLatin1().constData(), "SetScaleFactor" );
+ h->SetVarParameter( h_data.myScaleVarName.toUtf8().constData(), "SetScaleFactor" );
h->SetScaleFactor( h_data.myScale );
}
if( distr==2 || distr==3 )
h->SetTableFunction( h_data.myTable );
if( distr==3 )
- h->SetExpressionFunction( h_data.myExpr.toLatin1().data() );
+ h->SetExpressionFunction( h_data.myExpr.toUtf8().data() );
//setting of function must follow after setConversionMode, because otherwise
//the function will be checked with old conversion mode, so that it may occurs
//unexpected errors for user
// name
if( myName )
- SMESH::SetName( SMESH::FindSObject( h ), myName->text().toLatin1().constData() );
+ SMESH::SetName( SMESH::FindSObject( h ), myName->text().toUtf8().constData() );
// transition
h->SetQuadType( StdMeshers::QuadType( myTypeWdg->GetType()) );
bool res = getStdParamFromDlg( params );
if( isCreation() )
{
- SMESH::SetName( SMESH::FindSObject( hypothesis() ), params[0].myValue.toString().toLatin1().data() );
+ SMESH::SetName( SMESH::FindSObject( hypothesis() ), params[0].myValue.toString().toUtf8().data() );
params.erase( params.begin() );
}
GEOM::GEOM_Object_var StdMeshersGUI_SubShapeSelectorWdg::GetGeomObjectByEntry( const QString& theEntry )
{
GEOM::GEOM_Object_var aGeomObj;
- SALOMEDS::SObject_var aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID( theEntry.toLatin1().data() );
+ SALOMEDS::SObject_var aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID( theEntry.toUtf8().data() );
if (!aSObj->_is_nil() )
{
CORBA::Object_var obj = aSObj->GetObject();