Unicode support

This commit is contained in:
rnv 2018-07-12 17:41:48 +03:00
commit 81de8c6b11
63 changed files with 160 additions and 160 deletions

View File

@ -256,7 +256,7 @@ bool AdvancedGUI_DividedCylinderDlg::execute (ObjectList& objects)
QStringList aParameters;
aParameters << GroupParams->SpinBox_DX->text(); // R parameter
aParameters << GroupParams->SpinBox_DY->text(); // H parameter
if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toLatin1().constData());
if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
if (res)

View File

@ -434,7 +434,7 @@ bool AdvancedGUI_DividedDiskDlg::execute (ObjectList& objects)
{
QStringList aParameters;
aParameters << GroupParams->SpinBox_DX->text();
if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toLatin1().constData());
if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
break;
case 1:
@ -447,7 +447,7 @@ bool AdvancedGUI_DividedDiskDlg::execute (ObjectList& objects)
{
QStringList aParameters;
aParameters << GroupPntVecR->SpinBox_DX->text();
if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toLatin1().constData());
if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
break;
}

View File

@ -1201,7 +1201,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects)
}
if (aParameters.count() > 0)
anObj[0]->SetParameters(aParameters.join(":").toLatin1().constData());
anObj[0]->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj[0]._retn());

View File

@ -245,7 +245,7 @@ bool AdvancedGUI_SmoothingSurfaceDlg::execute (ObjectList& objects)
{
QStringList aParameters;
//@@ put stringified input parameters to the string list here to store in the data model for notebook @@//
if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toLatin1().constData());
if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
if (res)

View File

@ -592,7 +592,7 @@ bool BasicGUI_CircleDlg::execute( ObjectList& objects )
aParameters << GroupPntVecR->SpinBox_DX->text();
anObj = anOper->MakeCirclePntVecR( myPoint.get(), myDir.get(), getRadius() );
if ( !anObj->_is_nil() && !IsPreview() )
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
res = true;
break;
}

View File

@ -472,9 +472,9 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects)
if (myBySelectionBtn->isChecked())
anObj = anOper->MakePolyline(points.in(), myGroupPoints->CheckButton1->isChecked());
else
anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()),
qPrintable(myGroupParams->myYExpr->text()),
qPrintable(myGroupParams->myZExpr->text()),
anObj = anOper->MakeCurveParametricNew(qUtf8Printable(myGroupParams->myXExpr->text()),
qUtf8Printable(myGroupParams->myYExpr->text()),
qUtf8Printable(myGroupParams->myZExpr->text()),
myGroupParams->myPMin->value(),
myGroupParams->myPMax->value(),
myGroupParams->myPStep->value(),
@ -485,9 +485,9 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects)
if (myBySelectionBtn->isChecked())
anObj = anOper->MakeSplineBezier(points.in(), myGroupPoints->CheckButton1->isChecked());
else
anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()),
qPrintable(myGroupParams->myYExpr->text()),
qPrintable(myGroupParams->myZExpr->text()),
anObj = anOper->MakeCurveParametricNew(qUtf8Printable(myGroupParams->myXExpr->text()),
qUtf8Printable(myGroupParams->myYExpr->text()),
qUtf8Printable(myGroupParams->myZExpr->text()),
myGroupParams->myPMin->value(),
myGroupParams->myPMax->value(),
myGroupParams->myPStep->value(),
@ -506,9 +506,9 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects)
myGroupPoints->CheckButton2->isChecked());
}
else
anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()),
qPrintable(myGroupParams->myYExpr->text()),
qPrintable(myGroupParams->myZExpr->text()),
anObj = anOper->MakeCurveParametricNew(qUtf8Printable(myGroupParams->myXExpr->text()),
qUtf8Printable(myGroupParams->myYExpr->text()),
qUtf8Printable(myGroupParams->myZExpr->text()),
myGroupParams->myPMin->value(),
myGroupParams->myPMax->value(),
myGroupParams->myPStep->value(),
@ -523,7 +523,7 @@ bool BasicGUI_CurveDlg::execute (ObjectList& objects)
aParameters<<myGroupParams->myPMin->text();
aParameters<<myGroupParams->myPMax->text();
aParameters<<myGroupParams->myPStep->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj._retn());
}

View File

@ -414,7 +414,7 @@ bool BasicGUI_EllipseDlg::execute( ObjectList& objects )
anOper->MakeEllipse ( myPoint.get(), myDir.get(), aMajorR, aMinorR );
if ( !anObj->_is_nil() ) {
if ( !IsPreview() )
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back( anObj._retn() );
}
return true;

View File

@ -752,7 +752,7 @@ bool BasicGUI_PlaneDlg::execute( ObjectList& objects )
if ( !anObj->_is_nil() ) {
if ( !IsPreview() )
anObj->SetParameters(getSizeAsString().toLatin1().constData());
anObj->SetParameters(getSizeAsString().toUtf8().constData());
objects.push_back( anObj._retn() );
}
return res;

View File

@ -889,7 +889,7 @@ bool BasicGUI_PointDlg::execute(ObjectList& objects)
id == GEOM_POINT_REF ||
id == GEOM_POINT_EDGE ||
id == GEOM_POINT_SURF)) {
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
if (id == GEOM_POINT_REF || id == GEOM_POINT_EDGE || id == GEOM_POINT_SURF) {

View File

@ -448,7 +448,7 @@ bool BasicGUI_VectorDlg::execute( ObjectList& objects )
anObj = anOper->MakeVectorDXDYDZ( dx, dy, dz );
if ( !anObj->_is_nil() && !IsPreview() )
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
res = true;
break;

View File

@ -454,7 +454,7 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects )
if ( selected.contains( QString( objStr.in() ) ) )
{
if ( !IsPreview() )
(*anIter)->SetParameters(aParameters.join(":").toLatin1().constData());
(*anIter)->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back( *anIter );
}
else
@ -474,7 +474,7 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects )
{
GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_duplicate( aList[i] );
if ( !IsPreview() )
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back( anObj._retn() );
}
}

View File

@ -591,7 +591,7 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects)
QStringList aParameters;
aParameters << "" << "";
aParameters << mySpinBox[SpinBox1]->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;
@ -608,7 +608,7 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects)
aParameters << mySpinBox[SpinBox2U]->text();
aParameters << "" << "";
aParameters << mySpinBox[SpinBox2V]->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;

View File

@ -475,7 +475,7 @@ bool BuildGUI_EdgeDlg::execute (ObjectList& objects)
anObj = anOper->MakeEdgeWire(myWire.get(), aLinearTolerance, anAngularTolerance);
if (!anObj->_is_nil() && !IsPreview())
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
res = true;
break;
@ -487,7 +487,7 @@ bool BuildGUI_EdgeDlg::execute (ObjectList& objects)
anObj = anOper->MakeEdgeOnCurveByLength(myCurve.get(), aLength, myStartPoint.get());
if (!anObj->_is_nil() && !IsPreview())
anObj->SetParameters(GroupOnCurve->SpinBox_DX->text().toLatin1().constData());
anObj->SetParameters(GroupOnCurve->SpinBox_DX->text().toUtf8().constData());
res = true;
break;

View File

@ -773,7 +773,7 @@ void DependencyTree_View::getNewTreeModel( bool theUseSelectedObject, bool theUs
GEOM::GEOM_Object_var geomObject = GEOM::GEOM_Object::_nil();
geomObject = GEOMBase::ConvertIOinGEOMObject( io );
QString entry = geomObject->GetEntry();
objectsEntry[ iter ] = entry.toLatin1().constData();
objectsEntry[ iter ] = entry.toUtf8().constData();
}
}
else {

View File

@ -995,10 +995,10 @@ bool EntityGUI_3DSketcherDlg::execute (ObjectList& objects)
// MESSAGE("aCommands.last() = "<< aCommands.last().toStdString());
GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow(getOperation());
//GEOM::GEOM_Object_var anObj = anOper->Make3DSketcher(aCoordsArray);
GEOM::GEOM_Object_var anObj = anOper->Make3DSketcherCommand(aCommands.join(":").toLatin1().constData());
GEOM::GEOM_Object_var anObj = anOper->Make3DSketcherCommand(aCommands.join(":").toUtf8().constData());
if (!anObj->_is_nil()) {
if (!IsPreview()) anObj->SetParameters(aParameters.join(":").toLatin1().constData());
if (!IsPreview()) anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back(anObj._retn());
}

View File

@ -753,7 +753,7 @@ void EntityGUI_FieldDlg::StepTable::setValues(GEOM::GEOM_FieldStep_var& step)
vals->length( nbRows * nbComps );
for ( int iV = 0, iR = 0; iR < nbRows; ++iR )
for ( int iC = 1; iC < nbColumns; ++iC )
vals[ iV++ ] = item( iR, iC )->text().toLatin1().constData();
vals[ iV++ ] = item( iR, iC )->text().toUtf8().constData();
ss->SetValues( vals );
}
}
@ -1477,7 +1477,7 @@ int EntityGUI_FieldDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMa
if (!appStudy) return 0;
_PTR(Study) aStudy = appStudy->studyDS();
_PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData()));
_PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData()));
GEOM::GEOM_Object_var aGeomObj =
GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObj));
TopoDS_Shape aShape;
@ -1695,7 +1695,7 @@ void EntityGUI_FieldDlg::activateSelection()
TopoDS_Shape aSubShape = myShapeMap( index );
QString anEntry = QString( "TEMP_" ) + aMainEntry.in() + QString("_%1").arg(index);
Handle(SALOME_InteractiveObject) io =
new SALOME_InteractiveObject(anEntry.toLatin1(), "GEOM", "TEMP_IO");
new SALOME_InteractiveObject(anEntry.toUtf8(), "GEOM", "TEMP_IO");
aDisplayer->SetColor( aCol );
SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView);
if (aPrs) {
@ -1802,7 +1802,7 @@ void EntityGUI_FieldDlg::highlightSubShapes()
if (anIds.Contains(anIndex)) {
aSelList.Append(anIO);
// if (childsMap.contains (anIndex)) {
// Handle(SALOME_InteractiveObject) tmpIO = new SALOME_InteractiveObject(childsMap.value(anIndex).toLatin1().constData(), "GEOM", "TEMP_IO");
// Handle(SALOME_InteractiveObject) tmpIO = new SALOME_InteractiveObject(childsMap.value(anIndex).toUtf8().constData(), "GEOM", "TEMP_IO");
// aSelList.Append(tmpIO);
// }
}
@ -1870,11 +1870,11 @@ bool EntityGUI_FieldDlg::execute()
GEOM::string_array_var compNames = new GEOM::string_array();
compNames->length( nbComps );
for ( int iC = 0; iC < nbComps; ++iC )
compNames[ iC ] = columnNames[ iC+1 ].toLatin1().constData();
compNames[ iC ] = columnNames[ iC+1 ].toUtf8().constData();
GEOM::GEOM_IFieldOperations_var anOper = GEOM::GEOM_IFieldOperations::_narrow(getOperation());
myField = anOper->CreateField( myShape,
aName.toLatin1().constData(),
aName.toUtf8().constData(),
GEOM::field_data_type( getDataType() ),
CORBA::Short( getDim() ),
compNames );
@ -1882,7 +1882,7 @@ bool EntityGUI_FieldDlg::execute()
return false;
SALOMEDS::SObject_wrap aSO =
getGeomEngine()->AddInStudy( myField, aName.toLatin1().constData(), myShape );
getGeomEngine()->AddInStudy( myField, aName.toUtf8().constData(), myShape );
if ( !aSO->_is_nil() ) {
myField->UnRegister();
CORBA::String_var entry = aSO->GetID();
@ -1891,13 +1891,13 @@ bool EntityGUI_FieldDlg::execute()
}
else // update field name
{
myField->SetName( aName.toLatin1().constData() );
myField->SetName( aName.toUtf8().constData() );
CORBA::String_var entry = myField->GetStudyEntry();
if ( entry.in() ) {
SALOMEDS::SObject_wrap SO = aStudyDS->FindObjectID( entry.in() );
if ( !SO->_is_nil() ) {
aBuilder->SetName(SO, aName.toLatin1().constData());
aBuilder->SetName(SO, aName.toUtf8().constData());
}
}
}
@ -1918,7 +1918,7 @@ bool EntityGUI_FieldDlg::execute()
step = myField->AddStep( tbl->getStepID(), tbl->getStamp() );
SALOMEDS::SObject_wrap aSO =
getGeomEngine()->AddInStudy( step, stepName.toLatin1().constData(), myField );
getGeomEngine()->AddInStudy( step, stepName.toUtf8().constData(), myField );
if ( /*!myIsCreation &&*/ !aSO->_is_nil() ) {
step->UnRegister();
CORBA::String_var entry = aSO->GetID();
@ -1933,7 +1933,7 @@ bool EntityGUI_FieldDlg::execute()
if ( entry.in() ) {
SALOMEDS::SObject_wrap SO = aStudyDS->FindObjectID( entry.in() );
if ( !SO->_is_nil() )
aBuilder->SetName( SO, stepName.toLatin1().constData() );
aBuilder->SetName( SO, stepName.toUtf8().constData() );
}
}

View File

@ -2472,7 +2472,7 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects )
if( !IsPreview() ) {
QStringList aCurrentParameters = myParameters;
aCurrentParameters << aParameters;
anObj->SetParameters(aCurrentParameters.join(":").toLatin1().constData());
anObj->SetParameters(aCurrentParameters.join(":").toUtf8().constData());
}
objects.push_back( anObj._retn() );
@ -2755,7 +2755,7 @@ void EntityGUI_SketcherDlg::FindLocalCS()
return;
_PTR(SComponent) fc = obj->GetFatherComponent();
QString geomComp = fc->GetID().c_str();
_PTR(SObject) comp = aStudy->FindObjectID( geomComp.toLatin1().data() );
_PTR(SObject) comp = aStudy->FindObjectID( geomComp.toUtf8().data() );
if ( !comp )
return;

View File

@ -693,7 +693,7 @@ int EntityGUI_SubShapeDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& th
if (!appStudy) return 0;
_PTR(Study) aStudy = appStudy->studyDS();
_PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData()));
_PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData()));
GEOM::GEOM_Object_var aGeomObj =
GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObj));
TopoDS_Shape aShape;
@ -934,7 +934,7 @@ void EntityGUI_SubShapeDlg::ClickOnOkFilter()
( myLessFilterCheck->isChecked() && !myGreaterFilterCheck->isChecked() && isLess ) ||
( myGreaterFilterCheck->isChecked() && !myLessFilterCheck->isChecked() && isGreater ) ) {
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject();
io->setEntry( anEntry.toLatin1().constData() );
io->setEntry( anEntry.toUtf8().constData() );
io->setName( myObject->GetName() );
toSelect.Append(io);
}

View File

@ -626,7 +626,7 @@ bool GEOMBase::SelectionByNameInDialogs( QWidget* widget, const QString& objectU
/* Create a SALOME_InteractiveObject with a SALOME::SObject */
Handle(SALOME_InteractiveObject) IO = new SALOME_InteractiveObject( listSO[0]->GetID().c_str(),
"GEOM",
objectUserName.toLatin1().constData() );
objectUserName.toUtf8().constData() );
/* Add as a selected object */
/* Clear any previous selection : */
@ -710,7 +710,7 @@ void GEOMBase::ShowErrorMessage( const QString& errorCode, const QString& commen
if ( !errorCode.isEmpty() )
text << QObject::tr( errorCode.toLatin1().constData() );
if ( !comment.isEmpty() )
text << QObject::tr( comment.toLatin1().constData() );
text << QObject::tr( comment.toUtf8().constData() );
SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(),
QObject::tr( "GEOM_ERROR" ),
@ -869,7 +869,7 @@ void GEOMBase::PublishSubObject( GEOM::GEOM_Object_ptr object, const QString& na
QString fatherEntry = GetEntry( father );
if ( entry.isEmpty() && !CORBA::is_nil( father ) && !fatherEntry.isEmpty() ) {
QString aName = !name.isEmpty() ? name : GetName( object );
GeometryGUI::GetGeomGen()->AddInStudy( object, aName.toLatin1().data(), father.in() );
GeometryGUI::GetGeomGen()->AddInStudy( object, aName.toUtf8().data(), father.in() );
}
}
}

View File

@ -180,9 +180,9 @@ void GEOMBase_Helper::erase( GEOM::GEOM_Object_ptr object, const bool updateView
if ( !object->_is_nil() ) {
QString entry = getEntry( object );
QString name = GEOMBase::GetName( object );
getDisplayer()->Erase ( new SALOME_InteractiveObject(entry.toLatin1().constData(),
getDisplayer()->Erase ( new SALOME_InteractiveObject(entry.toUtf8().constData(),
"GEOM",
name.toLatin1().constData() ),
name.toUtf8().constData() ),
true, updateView );
}
}
@ -223,9 +223,9 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object,
QString entry = getEntry( object );
QString name = GEOMBase::GetName( object );
getDisplayer()->Redisplay
(new SALOME_InteractiveObject (entry.toLatin1().constData(),
(new SALOME_InteractiveObject (entry.toUtf8().constData(),
"GEOM",
name.toLatin1().constData()),
name.toUtf8().constData()),
false);
}
@ -245,9 +245,9 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object,
QString entry = getEntry( aChild );
QString name = GEOMBase::GetName( aChild );
getDisplayer()->Redisplay
( new SALOME_InteractiveObject( entry.toLatin1().constData(),
( new SALOME_InteractiveObject( entry.toUtf8().constData(),
"GEOM",
name.toLatin1().constData() ),
name.toUtf8().constData() ),
false );
}
}
@ -490,8 +490,8 @@ void GEOMBase_Helper::localSelection( const ObjectList& theObjs, const std::list
if ( anEntry != "" )
{
QString aName = GEOMBase::GetName( anObj );
aListOfIO.Append( new SALOME_InteractiveObject( anEntry.toLatin1().constData(),
"GEOM", aName.toLatin1().constData() ));
aListOfIO.Append( new SALOME_InteractiveObject( anEntry.toUtf8().constData(),
"GEOM", aName.toUtf8().constData() ));
}
}
@ -702,7 +702,7 @@ QString GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
if ( study ) {
QString objIOR = GEOMBase::GetIORFromObject( object );
if ( objIOR != "" ) {
_PTR(SObject) SO ( study->studyDS()->FindObjectIOR( objIOR.toLatin1().constData() ) );
_PTR(SObject) SO ( study->studyDS()->FindObjectIOR( objIOR.toUtf8().constData() ) );
if ( SO )
return QString::fromStdString(SO->GetID());
}
@ -906,7 +906,7 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction, b
aName = GEOMBase::GetDefaultName( getPrefix( obj ) );
}
}
anEntryList << addInStudy( obj, aName.toLatin1().constData() );
anEntryList << addInStudy( obj, aName.toUtf8().constData() );
// updateView=false
if( isDisplayResult() )
display( obj, false );
@ -1145,7 +1145,7 @@ GEOM::GEOM_Object_ptr GEOMBase_Helper::findObjectInFather (GEOM::GEOM_Object_ptr
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
_PTR(Study) aDStudy = appStudy->studyDS();
QString IOR = GEOMBase::GetIORFromObject( theFather );
_PTR(SObject) SObj ( aDStudy->FindObjectIOR( IOR.toLatin1().constData() ) );
_PTR(SObject) SObj ( aDStudy->FindObjectIOR( IOR.toUtf8().constData() ) );
bool inStudy = false;
GEOM::GEOM_Object_var aReturnObject;

View File

@ -48,6 +48,6 @@ GEOM_PreviewFilter::~GEOM_PreviewFilter()
bool GEOM_PreviewFilter::isOk( const SUIT_DataOwner* sOwner ) const
{
const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*> ( sOwner );
return ( owner && strstr( owner->entry().toLatin1().constData(), "TEMP" ) );
return ( owner && strstr( owner->entry().toUtf8().constData(), "TEMP" ) );
}

View File

@ -82,7 +82,7 @@ SALOME_Prs* GEOMGUI_AnnotationMgr::CreatePresentation( const GEOMGUI_AnnotationA
if ( !theEntry.isEmpty() ) {
// owner should be set to provide selection mechanizm
Handle( SALOME_InteractiveObject ) anIO = new SALOME_InteractiveObject();
anIO->setEntry( theEntry.toLatin1().constData() );
anIO->setEntry( theEntry.toUtf8().constData() );
aPresentation->SetOwner( anIO );
}

View File

@ -225,9 +225,9 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
if ( subOwner )
{
QString entry = subOwner->entry();
if ( indexesMap.IsBound( TCollection_AsciiString(entry.toLatin1().data())))
if ( indexesMap.IsBound( TCollection_AsciiString(entry.toUtf8().data())))
{
TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toLatin1().data());
TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toUtf8().data());
subIndexes.Add( subOwner->index() );
//indexesMap.replace( entry, subIndexes );
}
@ -235,7 +235,7 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
{
TColStd_IndexedMapOfInteger subIndexes;
subIndexes.Add( subOwner->index() );
indexesMap.Bind(entry.toLatin1().data(), subIndexes);
indexesMap.Bind(entry.toUtf8().data(), subIndexes);
}
}
else // the owner is NOT a sub owner, maybe it is a DataOwner == GLOBAL selection
@ -279,7 +279,7 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
{
// has a local selection
Handle(AIS_Shape) aisShape = Handle(AIS_Shape)::DownCast( io );
if (!aisShape.IsNull() && indexesMap.IsBound(entryStr.toLatin1().data()))
if (!aisShape.IsNull() && indexesMap.IsBound(entryStr.toUtf8().data()))
{
isLocal = true;
TopoDS_Shape shape = aisShape->Shape();
@ -318,7 +318,7 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
if (isLocal)
{
const TColStd_IndexedMapOfInteger& subIndexes =
indexesMap.ChangeFind(entryStr.toLatin1().data());
indexesMap.ChangeFind(entryStr.toUtf8().data());
const TopoDS_Shape& aSubShape = anOwner->Shape();
int aSubShapeId = aMapOfShapes.FindIndex( aSubShape );

View File

@ -269,7 +269,7 @@ bool GEOMGUI_Selection::isVisible( const int index ) const
GEOM::GEOM_Object_var obj = getObject( index );
SALOME_View* view = GEOM_Displayer::GetActiveView();
if ( !CORBA::is_nil( obj ) && view ) {
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( entry( index ).toLatin1().constData(), "GEOM", "TEMP_IO" );
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( entry( index ).toUtf8().constData(), "GEOM", "TEMP_IO" );
res = view->isVisible( io );
}
@ -342,7 +342,7 @@ QString GEOMGUI_Selection::displayMode( const int index ) const
SALOME_View* view = GEOM_Displayer::GetActiveView();
if ( view /*fix for 9320==>*/&& ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) {
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
SALOME_Prs* prs = view->CreatePrs( entry( index ).toUtf8().constData() );
if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
@ -408,7 +408,7 @@ bool GEOMGUI_Selection::isVectorsMode( const int index ) const
SALOME_View* view = GEOM_Displayer::GetActiveView();
QString viewType = activeViewType();
if ( view && ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) {
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
SALOME_Prs* prs = view->CreatePrs( entry( index ).toUtf8().constData() );
if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
@ -455,7 +455,7 @@ bool GEOMGUI_Selection::isVerticesMode( const int index ) const
SALOME_View* view = GEOM_Displayer::GetActiveView();
QString viewType = activeViewType();
if ( view && ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) {
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
SALOME_Prs* prs = view->CreatePrs( entry( index ).toUtf8().constData() );
if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
@ -502,7 +502,7 @@ bool GEOMGUI_Selection::isNameMode( const int index ) const
SALOME_View* view = GEOM_Displayer::GetActiveView();
QString viewType = activeViewType();
if ( view && ( viewType == OCCViewer_Viewer::Type() || viewType == SVTK_Viewer::Type() ) ) {
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
SALOME_Prs* prs = view->CreatePrs( entry( index ).toUtf8().constData() );
if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
@ -716,7 +716,7 @@ bool GEOMGUI_Selection::topLevel( const int index ) const
SALOME_View* view = GEOM_Displayer::GetActiveView();
QString viewType = activeViewType();
if ( view && viewType == OCCViewer_Viewer::Type() ) {
SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() );
SALOME_Prs* prs = view->CreatePrs( entry( index ).toUtf8().constData() );
if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs;
@ -752,7 +752,7 @@ bool GEOMGUI_Selection::isPhysicalMaterial( const int idx ) const
SALOME_View* view = GEOM_Displayer::GetActiveView();
QString viewType = activeViewType();
if ( view ) {
SALOME_Prs* prs = view->CreatePrs( entry( idx ).toLatin1().constData() );
SALOME_Prs* prs = view->CreatePrs( entry( idx ).toUtf8().constData() );
if ( prs ) {
if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC
SOCC_Prs* occPrs = (SOCC_Prs*) prs;

View File

@ -826,7 +826,7 @@ bool GEOMGUI_TextTreeWdg::setShapeItemVisibility( QSharedPointer<VisualProperty>
//=================================================================================
void GEOMGUI_TextTreeWdg::redisplay( QString theEntry )
{
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( theEntry.toLatin1().constData(), "GEOM", "TEMP_IO" );
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( theEntry.toUtf8().constData(), "GEOM", "TEMP_IO" );
myDisplayer.Redisplay( io );
}

View File

@ -776,7 +776,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
else if ( !myName.empty() ) {
// workaround to allow selection of temporary objects
static int tempId = 0;
anIO = new SALOME_InteractiveObject( QString( "TEMP_%1" ).arg( tempId++ ).toLatin1().data(), "GEOM", myName.c_str() );
anIO = new SALOME_InteractiveObject( QString( "TEMP_%1" ).arg( tempId++ ).toUtf8().data(), "GEOM", myName.c_str() );
AISShape->setIO( anIO );
AISShape->SetOwner( anIO );
}
@ -1049,7 +1049,7 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
else if ( !myName.empty() ) {
// workaround to allow selection of temporary objects
static int tempId = 0;
anIO = new SALOME_InteractiveObject( QString( "TEMP_VTK_%1" ).arg( tempId++ ).toLatin1().data(), "GEOM", myName.c_str() );
anIO = new SALOME_InteractiveObject( QString( "TEMP_VTK_%1" ).arg( tempId++ ).toUtf8().data(), "GEOM", myName.c_str() );
actor->setIO( anIO );
}
@ -1744,7 +1744,7 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry,
if ( prs )
{
Handle( SALOME_InteractiveObject ) theIO = new SALOME_InteractiveObject();
theIO->setEntry( entry.toLatin1().constData() );
theIO->setEntry( entry.toUtf8().constData() );
if ( !theIO.IsNull() )
{
// set interactive object
@ -1823,7 +1823,7 @@ SALOME_Prs* GEOM_Displayer::buildSubshapePresentation(const TopoDS_Shape& aShape
if (prs)
{
Handle(SALOME_InteractiveObject) theIO = new SALOME_InteractiveObject();
theIO->setEntry(entry.toLatin1().constData());
theIO->setEntry(entry.toUtf8().constData());
if (!theIO.IsNull())
{
// set interactive object
@ -2359,7 +2359,7 @@ void GEOM_Displayer::setFieldStepInfo( const GEOM::field_data_type theFieldDataT
bool GEOM_Displayer::canBeDisplayed( const QString& entry, const QString& viewer_type ) const
{
_PTR(SObject) anObj = getStudy()->studyDS()->FindObjectID( (const char*)entry.toLatin1() );
_PTR(SObject) anObj = getStudy()->studyDS()->FindObjectID( (const char*)entry.toUtf8() );
GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(anObj)); // enable displaying of GEOM objects
GEOM::GEOM_FieldStep_var aFieldStepObj = GEOM::GEOM_FieldStep::_narrow(GeometryGUI::ClientSObjectToObject(anObj)); // enable displaying of GEOM field steps
GEOM::GEOM_Gen_var aCompObj = GEOM::GEOM_Gen::_narrow(GeometryGUI::ClientSObjectToObject(anObj)); // enable displaying of whole GEOM component
@ -2748,7 +2748,7 @@ void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& t
if(l_obj)
foreach ( view, views ) {
Handle(SALOME_InteractiveObject) anIO =
new SALOME_InteractiveObject(qPrintable(l_obj->entry()), "GEOM", "");
new SALOME_InteractiveObject(qUtf8Printable(l_obj->entry()), "GEOM", "");
Erase(anIO, false, false, view);
}
}

View File

@ -276,7 +276,7 @@ GEOMGUI* GeometryGUI::getLibrary( const QString& libraryName )
while ( it.hasPrevious() ) {
QFileInfo fi( Qtx::addSlash( it.previous() ) + libraryName );
if ( fi.exists() ) {
OSD_SharedLibrary aSharedLibrary( fi.fileName().toLatin1().constData() );
OSD_SharedLibrary aSharedLibrary( fi.fileName().toUtf8().constData() );
bool res = aSharedLibrary.DlOpen( OSD_RTLD_LAZY );
if ( !res ) {
MESSAGE( "Can't open library : " << aSharedLibrary.DlError() );
@ -327,7 +327,7 @@ GEOMPluginGUI* GeometryGUI::getPluginLibrary( const QString& libraryName )
while ( it.hasPrevious() ) {
QFileInfo fi( Qtx::addSlash( it.previous() ) + libraryName );
if ( fi.exists() ) {
OSD_SharedLibrary aSharedLibrary( fi.fileName().toLatin1().constData() );
OSD_SharedLibrary aSharedLibrary( fi.fileName().toUtf8().constData() );
bool res = aSharedLibrary.DlOpen( OSD_RTLD_LAZY );
if ( !res ) {
MESSAGE( "Can't open library : " << aSharedLibrary.DlError() );
@ -2959,13 +2959,13 @@ void GeometryGUI::storeVisualParameters (int savePoint)
const PropMap& aProps = o_it.value();
//Check that object exists in the study
_PTR(SObject) obj( studyDS->FindObjectID( o_it.key().toLatin1().data() ) );
_PTR(SObject) obj( studyDS->FindObjectID( o_it.key().toUtf8().data() ) );
if ( !obj || !(aProps.count() > 0))
continue;
// entry is "encoded" = it does NOT contain component address, since it is a
// subject to change on next component loading
std::string entry = ip->encodeEntry(o_it.key().toLatin1().data(), componentName);
std::string entry = ip->encodeEntry(o_it.key().toUtf8().data(), componentName);
_PTR(GenericAttribute) anAttr;
if (!obj->FindAttribute(anAttr, "AttributeIOR"))
@ -3073,7 +3073,7 @@ void GeometryGUI::storeVisualParameters (int savePoint)
if ( vType == SOCC_Viewer::Type() && aAnnotationMgr ) {
std::string anAnnotationInfo = GetAnnotationMgr()->getDisplayedIndicesInfo(
o_it.key().toLatin1().data(), dynamic_cast<SOCC_Viewer*>(aView) ).toStdString();
o_it.key().toUtf8().data(), dynamic_cast<SOCC_Viewer*>(aView) ).toStdString();
if (!anAnnotationInfo.empty()) {
param = occParam + "ShapeAnnotationVisibleItems";
ip->setParameter(entry, param.toStdString(), anAnnotationInfo);
@ -3091,19 +3091,19 @@ void GeometryGUI::storeVisualParameters (int savePoint)
QSet<QString>::ConstIterator aEntryIt = anEntriesToStoreShared.constBegin();
for ( ; aEntryIt != anEntriesToStoreShared.constEnd(); ++aEntryIt )
{
std::string aStudyEntry = (*aEntryIt).toLatin1().data();
std::string aStudyEntry = (*aEntryIt).toUtf8().data();
std::string aStoreEntry = ip->encodeEntry( aStudyEntry, componentName );
// store dimension parameters
GEOMGUI_DimensionProperty aDimensions( aStudyEntry );
if ( aDimensions.GetNumber() != 0 ) {
ip->setParameter( aStoreEntry, aDimensionParam.toStdString(), ((QString)aDimensions).toLatin1().data() );
ip->setParameter( aStoreEntry, aDimensionParam.toStdString(), ((QString)aDimensions).toUtf8().data() );
}
_PTR(SObject) aObj( studyDS->FindObjectID( aStudyEntry ) );
const Handle(GEOMGUI_AnnotationAttrs) aShapeAnnAttr = GEOMGUI_AnnotationAttrs::FindAttributes( aObj );
if ( !aShapeAnnAttr.IsNull() ) {
ip->setParameter( aStoreEntry, aAnnotationParam.toStdString(), aShapeAnnAttr->ExportAsPropertyString().toLatin1().data() );
ip->setParameter( aStoreEntry, aAnnotationParam.toStdString(), aShapeAnnAttr->ExportAsPropertyString().toUtf8().data() );
}
}
}
@ -3141,7 +3141,7 @@ void GeometryGUI::restoreVisualParameters (int savePoint)
// 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 );
@ -3185,7 +3185,7 @@ void GeometryGUI::restoreVisualParameters (int savePoint)
if ( aParamNameStr == GEOM::propertyName( GEOM::Dimensions ) )
{
GEOMGUI_DimensionProperty aDimensionProp( aValuesStr );
aDimensionProp.SaveToAttribute( entry.toLatin1().data() );
aDimensionProp.SaveToAttribute( entry.toUtf8().data() );
}
else if ( aParamNameStr == GEOM::propertyName( GEOM::ShapeAnnotations ) )
{
@ -3524,16 +3524,16 @@ bool GeometryGUI::renameObject( const QString& entry, const QString& name)
return result;
}
_PTR(SObject) obj ( aStudy->FindObjectID(qPrintable(entry)) );
_PTR(SObject) obj ( aStudy->FindObjectID(qUtf8Printable(entry)) );
_PTR(GenericAttribute) anAttr;
if ( obj ) {
if ( obj->FindAttribute(anAttr, "AttributeName") ) {
_PTR(AttributeName) aName (anAttr);
aName->SetValue( name.toLatin1().data() ); // rename the SObject
aName->SetValue( name.toUtf8().data() ); // rename the SObject
GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(obj));
if (!CORBA::is_nil(anObj)) {
anObj->SetName( name.toLatin1().data() ); // Rename the corresponding GEOM_Object
anObj->SetName( name.toUtf8().data() ); // Rename the corresponding GEOM_Object
emit SignalDependencyTreeRenameObject( anObj->GetEntry() );
emit SignalTextTreeRenameObject( entry );
}

View File

@ -93,7 +93,7 @@ static bool inUse( const QString& component, const QMap<QString,QString>& object
std::list<_PTR(SObject)> aSelectedSO;
for ( oit = objects.begin(); oit != objects.end(); ++oit )
{
_PTR(SObject) so = study->FindObjectID( oit.key().toLatin1().data() );
_PTR(SObject) so = study->FindObjectID( oit.key().toUtf8().data() );
if ( !so )
continue;
aSelectedSO.push_back(so);
@ -398,7 +398,7 @@ void GEOMToolsGUI::OnEditDelete()
continue; // invalid object
// ...
QString entry = anIObject->getEntry();
_PTR(SObject) obj = aStudy->FindObjectID( entry.toLatin1().data() );
_PTR(SObject) obj = aStudy->FindObjectID( entry.toUtf8().data() );
// check parent component
QString parentComp = getParentComponent( obj );
if ( parentComp != geomComp ) {
@ -471,7 +471,7 @@ void GEOMToolsGUI::OnEditDelete()
if ( isComponentSelected ) {
// GEOM component is selected: delete all objects recursively
_PTR(SObject) comp = aStudy->FindObjectID( geomComp.toLatin1().data() );
_PTR(SObject) comp = aStudy->FindObjectID( geomComp.toUtf8().data() );
if ( !comp )
return;
_PTR(ChildIterator) it ( aStudy->NewChildIterator( comp ) );
@ -499,7 +499,7 @@ void GEOMToolsGUI::OnEditDelete()
// ... and then delete all objects
QMap<QString, QString>::Iterator it;
for ( it = toBeDeleted.begin(); it != toBeDeleted.end(); ++it ) {
_PTR(SObject) obj ( aStudy->FindObjectID( it.key().toLatin1().data() ) );
_PTR(SObject) obj ( aStudy->FindObjectID( it.key().toUtf8().data() ) );
// remove object from GEOM engine
removeObjectWithChildren( obj, views, &disp );
// remove objects from study
@ -509,7 +509,7 @@ void GEOMToolsGUI::OnEditDelete()
}
// ... and then delete all folders
for ( it = toBeDelFolders.begin(); it != toBeDelFolders.end(); ++it ) {
_PTR(SObject) obj ( aStudy->FindObjectID( it.key().toLatin1().data() ) );
_PTR(SObject) obj ( aStudy->FindObjectID( it.key().toUtf8().data() ) );
// remove object from GEOM engine
removeObjectWithChildren( obj, views, &disp );
// remove objects from study

View File

@ -858,7 +858,7 @@ void GEOMToolsGUI::OnCreateFolder()
_PTR(SObject) aFatherSO(aStudy->FindObjectID(anIObject->getEntry()));
if ( !aFatherSO ) return;
GeometryGUI::GetGeomGen()->CreateFolder( tr("NEW_FOLDER_NAME").toLatin1().constData(),
GeometryGUI::GetGeomGen()->CreateFolder( tr("NEW_FOLDER_NAME").toUtf8().constData(),
_CAST(SObject, aFatherSO)->GetSObject() );
app->updateObjectBrowser( false );
}

View File

@ -53,7 +53,7 @@ GEOMToolsGUI_LineWidthDlg::GEOMToolsGUI_LineWidthDlg (QWidget* parent, const QSt
setObjectName("GEOMToolsGUI_LineWidthDlg");
setModal(true);
setWindowTitle(tr(title.toLatin1().constData()));
setWindowTitle(tr(title.toUtf8().constData()));
setSizeGripEnabled(true);
QGridLayout* MyDialogLayout = new QGridLayout(this);
MyDialogLayout->setSpacing(6);

View File

@ -373,7 +373,7 @@ void GEOMToolsGUI_MarkerDlg::browse()
filters << tr( "Texture files (*.dat)" ) << tr( "All files (*)" );
QString aFileName = SUIT_Session::session()->activeApplication()->getFileName( true, QString(), filters.join( ";;" ), tr( "LOAD_TEXTURE_TLT" ), this );
if ( !aFileName.isEmpty() ) {
addTexture( myOperation->LoadTexture( aFileName.toLatin1().constData() ), true );
addTexture( myOperation->LoadTexture( aFileName.toUtf8().constData() ), true );
}
}

View File

@ -145,7 +145,7 @@ GEOMToolsGUI_PublishDlg::~GEOMToolsGUI_PublishDlg()
QTreeWidgetItemIterator it( myTreeWidget );
while ( *it ) {
QString entry = myEntryToItem.key( *it );
_PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
_PTR(SObject) SO ( aStudy->FindObjectID( qUtf8Printable( entry ) ) );
if ( SO ) {
GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
if ( CORBA::is_nil( aGeomObject ) ) continue;
@ -232,7 +232,7 @@ QTreeWidgetItem* GEOMToolsGUI_PublishDlg::findParentItem(SalomeApp_DataObject* t
if( !(aResult = myEntryToItem.value(targetEntry)) ) {
if( aParrent != myGeomRoot ) {
QString aName;
_PTR(SObject) aSO ( SalomeApp_Application::getStudy()->FindObjectID(qPrintable(aParrent->entry())));
_PTR(SObject) aSO ( SalomeApp_Application::getStudy()->FindObjectID(qUtf8Printable(aParrent->entry())));
_PTR(GenericAttribute) anAttr;
if ( aSO->FindAttribute(anAttr, "AttributeName") ) {
_PTR(AttributeName) anAttrName (anAttr);
@ -270,7 +270,7 @@ void GEOMToolsGUI_PublishDlg::buildTree(SalomeApp_DataObject* theItem) {
//If object hasn't "AttributeDrawable" => it visible
bool isDrawable = true;
_PTR(SObject) SO ( SalomeApp_Application::getStudy()->FindObjectID(qPrintable(theItem->entry())));
_PTR(SObject) SO ( SalomeApp_Application::getStudy()->FindObjectID(qUtf8Printable(theItem->entry())));
_PTR(GenericAttribute) anAttr;
if ( SO && SO->FindAttribute(anAttr, "AttributeDrawable") ) {
_PTR(AttributeDrawable) aDrw (anAttr);
@ -323,7 +323,7 @@ void GEOMToolsGUI_PublishDlg::clickOnApply() {
QTreeWidgetItem* item = toProcess[i];
if(item) {
QString entry = myEntryToItem.key(item);
_PTR(SObject) SO ( aStudy->FindObjectID(qPrintable(entry)) );
_PTR(SObject) SO ( aStudy->FindObjectID(qUtf8Printable(entry)) );
if(!SO) continue;
_PTR(AttributeDrawable) aDrw = aBuilder->FindOrCreateAttribute( SO, "AttributeDrawable" );
aDrw->SetDrawable( true );
@ -446,7 +446,7 @@ void GEOMToolsGUI_PublishDlg::onItemClicked(QTreeWidgetItem* theItem, int theCol
_PTR(Study) aStudy = appStudy->studyDS();
if ( !aStudy ) return;
QString entry = myEntryToItem.key( theItem );
_PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
_PTR(SObject) SO ( aStudy->FindObjectID( qUtf8Printable( entry ) ) );
if ( !SO ) return;
GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
if ( CORBA::is_nil( aGeomObject ) ) return;

View File

@ -347,7 +347,7 @@ void TSetPropertyEvent::Execute()
study->setObjectProperty( mgrId, myEntry, myProperty, myValue );
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.toLatin1().data(), "GEOM" );
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.toUtf8().data(), "GEOM" );
if ( window->isVisible( io ) ) displayer.Redisplay( io, myUpdateViewer );
}

View File

@ -387,7 +387,7 @@ bool GenerationGUI_FillingDlg::execute(ObjectList& objects)
aParameters << GroupPoints->SpinBox3->text();
aParameters << GroupPoints->SpinBox4->text();
aParameters << GroupPoints->SpinBox5->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj._retn());
}

View File

@ -676,7 +676,7 @@ bool GenerationGUI_PrismDlg::execute (ObjectList& objects)
if (!anObj->_is_nil() && !IsPreview()) {
aParameters << GroupVecH->SpinBox_DX->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
break;
case 1:
@ -709,7 +709,7 @@ bool GenerationGUI_PrismDlg::execute (ObjectList& objects)
aParameters << GroupDXDYDZ->SpinBox_DX->text();
aParameters << GroupDXDYDZ->SpinBox_DY->text();
aParameters << GroupDXDYDZ->SpinBox_DZ->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
break;
}

View File

@ -329,7 +329,7 @@ bool GenerationGUI_RevolDlg::execute (ObjectList& objects)
if (!IsPreview()) {
QStringList aParameters;
aParameters << GroupPoints->SpinBox_DX->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj._retn());
}

View File

@ -875,7 +875,7 @@ int GroupGUI_GroupDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMap
if (!appStudy) return 0;
_PTR(Study) aStudy = appStudy->studyDS();
_PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData()));
_PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData()));
GEOM::GEOM_Object_var aGeomObj =
GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObj));
TopoDS_Shape aShape;
@ -1098,7 +1098,7 @@ void GroupGUI_GroupDlg::activateSelection()
int index = aSubShapesMap.FindIndex(aSubShape);
QString anEntry = QString( "TEMP_" ) + anEntryBase + QString("_%1").arg(index);
Handle(SALOME_InteractiveObject) io =
new SALOME_InteractiveObject(anEntry.toLatin1(), "GEOM", "TEMP_IO");
new SALOME_InteractiveObject(anEntry.toUtf8(), "GEOM", "TEMP_IO");
if ( myGroupIdList.contains( index ) ) {
aDisplayer->SetColor( aCol );
}
@ -1259,7 +1259,7 @@ void GroupGUI_GroupDlg::highlightSubShapes()
_PTR(Study) aStudy = appStudy->studyDS();
CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
QString anEntry = aMainEntry.in();
_PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData()));
_PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData()));
_PTR(ChildIterator) anIt (aStudy->NewChildIterator(aSObj));
for (anIt->InitEx(true); anIt->More(); anIt->Next()) {
GEOM::GEOM_Object_var aChild = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(anIt->Value()));
@ -1285,7 +1285,7 @@ void GroupGUI_GroupDlg::highlightSubShapes()
if (anIds.Contains(anIndex)) {
aSelList.Append(anIO);
if (childsMap.contains (anIndex)) {
Handle(SALOME_InteractiveObject) tmpIO = new SALOME_InteractiveObject(childsMap.value(anIndex).toLatin1().constData(), "GEOM", "TEMP_IO");
Handle(SALOME_InteractiveObject) tmpIO = new SALOME_InteractiveObject(childsMap.value(anIndex).toUtf8().constData(), "GEOM", "TEMP_IO");
aSelList.Append(tmpIO);
}
}
@ -1392,7 +1392,7 @@ bool GroupGUI_GroupDlg::execute(ObjectList& objects)
_PTR(SObject) SO (study->studyDS()->FindObjectIOR(objIOR.toLatin1().constData()));
if (SO) {
_PTR(StudyBuilder) aBuilder (study->studyDS()->NewBuilder());
aBuilder->SetName(SO, getNewObjectName().toLatin1().constData());
aBuilder->SetName(SO, getNewObjectName().toUtf8().constData());
}
}
}
@ -1450,7 +1450,7 @@ void GroupGUI_GroupDlg::ClickOnOkFilter()
( myLessFilterCheck->isChecked() && !myGreaterFilterCheck->isChecked() && isLess ) ||
( myGreaterFilterCheck->isChecked() && !myLessFilterCheck->isChecked() && isGreater ) ) {
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject();
io->setEntry( anEntry.toLatin1().constData() );
io->setEntry( anEntry.toUtf8().constData() );
toSelect.Append(io);
}
}

View File

@ -354,7 +354,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
aDimensionStyle->MakeArrows3d( Standard_True );
anIO->SetDimensionAspect( aDimensionStyle );
anIO->SetDisplayUnits( aUnitsAngle.toLatin1().data() );
anIO->SetDisplayUnits( aUnitsAngle.toUtf8().data() );
if (aUnitsAngle == "rad")
anIO->SetDisplaySpecialSymbol(AIS_DSS_No);
@ -372,7 +372,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
anAngle *= 180. / M_PI;
anAngleLabel = "GEOM_MEASURE_ANGLE_DEG";
}
myGrp->TextLabel3->setText(tr(anAngleLabel.toLatin1().data()));
myGrp->TextLabel3->setText(tr(anAngleLabel.toUtf8().data()));
int aPrecision = resMgr->integerValue( "Geometry", "angle_precision", 6 );
myGrp->LineEdit3->setText(DlgRef::PrintDoubleValue(anAngle, aPrecision));

View File

@ -582,7 +582,7 @@ void GEOM_AISShape::drawField( const Handle(Prs3d_Presentation)& thePrs,
anAspectText3d->SetColor( myLabelColor );
aGroup->SetPrimitivesAspect( anAspectText3d );
aGroup->Text( aString.toLatin1().constData(), aVertex, 14 );
aGroup->Text( aString.toUtf8().constData(), aVertex, 14 );
}
}
else

View File

@ -799,7 +799,7 @@ void OperationGUI_ExtractionDlg::onListSelectionChanged()
// Collect only displayed sub-shapes for selection in the viewer.
QString anEntry = getSubShapeEntry(anIndex);
Handle(SALOME_InteractiveObject) anIO =
createIO(anEntry.toLatin1().data());
createIO(anEntry.toUtf8().data());
anIOList.Append(anIO);
}
@ -815,7 +815,7 @@ void OperationGUI_ExtractionDlg::onListSelectionChanged()
// Collect only displayed sub-shapes for selection in the viewer.
QString anEntry = getSubShapeEntry(anIndex);
Handle(SALOME_InteractiveObject) anIO =
createIO(anEntry.toLatin1().data());
createIO(anEntry.toUtf8().data());
anIOList.Append(anIO);
}
@ -1286,7 +1286,7 @@ void OperationGUI_ExtractionDlg::eraseSubShape(const int theId)
{
QString anEntry = getSubShapeEntry(theId);
Handle(SALOME_InteractiveObject) anIO =
createIO(anEntry.toLatin1().data());
createIO(anEntry.toUtf8().data());
getDisplayer()->Erase(anIO, false, false);
myMapDisplayedIDs.Remove(theId);

View File

@ -383,7 +383,7 @@ bool OperationGUI_ExtrudedFeatureDlg::execute (ObjectList& objects)
aParameters << myGroup->SpinBox_DX->text();
if (myGroup->PushButton3->isChecked())
aParameters << myGroup->SpinBox_DY->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj._retn());
}

View File

@ -702,7 +702,7 @@ bool OperationGUI_FilletDlg::execute (ObjectList& objects)
if (!anObj->_is_nil())
{
if (!IsPreview())
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back(anObj._retn());
}

View File

@ -415,7 +415,7 @@ bool PrimitiveGUI_BoxDlg::execute (ObjectList& objects)
aParameters << GroupDimensions->SpinBox_DX->text();
aParameters << GroupDimensions->SpinBox_DY->text();
aParameters << GroupDimensions->SpinBox_DZ->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
}

View File

@ -420,7 +420,7 @@ bool PrimitiveGUI_ConeDlg::execute (ObjectList& objects)
aParameters << GroupPoints->SpinBox_DX->text();
aParameters << GroupPoints->SpinBox_DY->text();
aParameters << GroupPoints->SpinBox_DZ->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
}
@ -433,7 +433,7 @@ bool PrimitiveGUI_ConeDlg::execute (ObjectList& objects)
aParameters << GroupDimensions->SpinBox_DX->text();
aParameters << GroupDimensions->SpinBox_DY->text();
aParameters << GroupDimensions->SpinBox_DZ->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;

View File

@ -446,7 +446,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects)
aParameters << GroupPoints->SpinBox_DX->text();
aParameters << GroupPoints->SpinBox_DY->text();
aParameters << GroupPoints->SpinBox_DZ->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
}
@ -457,7 +457,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects)
QStringList aParameters;
aParameters << GroupPoints->SpinBox_DX->text();
aParameters << GroupPoints->SpinBox_DY->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
}
@ -472,7 +472,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects)
aParameters << GroupDimensions->SpinBox_DX->text();
aParameters << GroupDimensions->SpinBox_DY->text();
aParameters << GroupDimensions->SpinBox_DZ->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
}
@ -483,7 +483,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects)
QStringList aParameters;
aParameters << GroupDimensions->SpinBox_DX->text();
aParameters << GroupDimensions->SpinBox_DY->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
}

View File

@ -501,7 +501,7 @@ bool PrimitiveGUI_DiskDlg::execute (ObjectList& objects)
if (!anObj->_is_nil() && !IsPreview())
{
aParameters << GroupDimensions->SpinBox_DX->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;
@ -510,7 +510,7 @@ bool PrimitiveGUI_DiskDlg::execute (ObjectList& objects)
if (!anObj->_is_nil() && !IsPreview())
{
aParameters << GroupPntVecR->SpinBox_DX->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;

View File

@ -453,7 +453,7 @@ bool PrimitiveGUI_FaceDlg::execute (ObjectList& objects)
{
aParameters << GroupDimensions->SpinBox_DX->text();
aParameters << GroupDimensions->SpinBox_DY->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;
@ -465,7 +465,7 @@ bool PrimitiveGUI_FaceDlg::execute (ObjectList& objects)
{
aParameters << GroupPlane->SpinBox_DX->text();
aParameters << GroupPlane->SpinBox_DY->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;

View File

@ -364,7 +364,7 @@ bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects )
{
QStringList aParameters;
aParameters << GroupPoints->SpinBox_DX->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
}
@ -377,7 +377,7 @@ bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects )
{
QStringList aParameters;
aParameters << GroupDimensions->SpinBox_DX->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;

View File

@ -404,7 +404,7 @@ bool PrimitiveGUI_TorusDlg::execute (ObjectList& objects)
QStringList aParameters;
aParameters << GroupPoints->SpinBox_DX->text();
aParameters << GroupPoints->SpinBox_DY->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
}
@ -416,7 +416,7 @@ bool PrimitiveGUI_TorusDlg::execute (ObjectList& objects)
QStringList aParameters;
aParameters << GroupDimensions->SpinBox_DX->text();
aParameters << GroupDimensions->SpinBox_DY->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;

View File

@ -525,7 +525,7 @@ bool RepairGUI_DivideEdgeDlg::execute( ObjectList& objects )
aParameters << "";
aParameters << myValEdt->text();
aParameters << "";
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
if ( !IsPreview() )
RepairGUI::ShowStatistics( anOper, this );

View File

@ -462,7 +462,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects)
{
QStringList aParameters;
aParameters << myTolEdt->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back(anObj._retn());
}
@ -521,7 +521,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects)
if (!IsPreview()) {
QStringList aParameters;
aParameters << myTolEdt2->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj._retn());
}
@ -640,7 +640,7 @@ bool RepairGUI_GlueDlg::onAcceptLocal()
if (aName.isEmpty())
aName = GEOMBase::GetDefaultName(getPrefix(*it));
}
addInStudy(*it, aName.toLatin1().data());
addInStudy(*it, aName.toUtf8().data());
display(*it, false);
}

View File

@ -145,7 +145,7 @@ RepairGUI_InspectObjectDlg::TreeWidgetItem::TreeWidgetItem
myShape( shape ),
myTolerance (theTolerance)
{
myIO = new SALOME_InteractiveObject( entry.toLatin1(), "GEOM", "TEMP_IO" );
myIO = new SALOME_InteractiveObject( entry.toUtf8(), "GEOM", "TEMP_IO" );
setFlags( flags() | Qt::ItemIsEditable );
}

View File

@ -304,7 +304,7 @@ bool RepairGUI_LimitToleranceDlg::execute(ObjectList& objects)
if (aResult) {
QStringList aParameters;
aParameters << myTolEdt->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
if ( !IsPreview() )
RepairGUI::ShowStatistics( anOper, this );
objects.push_back(anObj._retn());
@ -364,7 +364,7 @@ bool RepairGUI_LimitToleranceDlg::onAcceptLocal()
if (aName.isEmpty())
aName = GEOMBase::GetDefaultName(getPrefix(*it));
}
addInStudy(*it, aName.toLatin1().data());
addInStudy(*it, aName.toUtf8().data());
display(*it, false);
}

View File

@ -319,7 +319,7 @@ bool RepairGUI_SewingDlg::execute( ObjectList& objects )
{
QStringList aParameters;
aParameters << myTolEdt->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back( anObj._retn() );
}

View File

@ -703,7 +703,7 @@ bool RepairGUI_ShapeProcessDlg::execute( ObjectList& objects )
aParameters << QString( aParams[i] );
aParameters << getTexts( aParams );
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
RepairGUI::ShowStatistics( anOper, this );
}

View File

@ -223,7 +223,7 @@ void RepairGUI_SuppressFacesDlg::SelectionIntoArgument()
Handle(SALOME_InteractiveObject) anIO = anIter.Value();
QString anEntry = anIO->getEntry();
_PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toLatin1().constData()));
_PTR(SObject) aSObj (aStudy->FindObjectID(anEntry.toUtf8().constData()));
GEOM::GEOM_Object_var aGeomObj =
GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObj));
TopoDS_Shape aShape;

View File

@ -527,7 +527,7 @@ bool TransformationGUI_MultiRotationDlg::execute (ObjectList& objects)
if (!anObj->_is_nil()) {
if (!IsPreview())
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back(anObj._retn());
}

View File

@ -687,7 +687,7 @@ bool TransformationGUI_MultiTranslationDlg::execute (ObjectList& objects)
if (!anObj->_is_nil()) {
if (!IsPreview())
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back(anObj._retn());
}

View File

@ -271,7 +271,7 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects )
anObj = anOper->OffsetShapeCopy( myObjects[i].get(), GetOffset(), GetIsJoinByPipes() );
if ( !anObj->_is_nil() ) {
if(!IsPreview()) {
anObj->SetParameters(GroupPoints->SpinBox_DX->text().toLatin1().constData());
anObj->SetParameters(GroupPoints->SpinBox_DX->text().toUtf8().constData());
}
objects.push_back( anObj._retn() );
}

View File

@ -497,7 +497,7 @@ bool TransformationGUI_RotationDlg::execute (ObjectList& objects)
anObj = anOper->RotateCopy(myObjects[i].get(), myAxis.get(), GetAngle() * M_PI / 180.);
if (!anObj->_is_nil()) {
if(!IsPreview()) {
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj._retn());
}
@ -509,7 +509,7 @@ bool TransformationGUI_RotationDlg::execute (ObjectList& objects)
anObj = anOper->Rotate(myObjects[i].get(), myAxis.get(), GetAngle() * M_PI / 180.);
if (!anObj->_is_nil()) {
if(!IsPreview()) {
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
updateAttributes(anObj, aParameters);
}
objects.push_back(anObj._retn());

View File

@ -442,7 +442,7 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects)
anObj = anOper->ScaleShapeCopy(myObjects[i].get(), myPoint.get(), SpinBox_FX->value());
if (!anObj->_is_nil()) {
if(!IsPreview())
anObj->SetParameters(SpinBox_FX->text().toLatin1().constData());
anObj->SetParameters(SpinBox_FX->text().toUtf8().constData());
objects.push_back(anObj._retn());
}
}
@ -472,7 +472,7 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects)
aParameters<<SpinBox_FX->text();
aParameters<<SpinBox_FY->text();
aParameters<<SpinBox_FZ->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj._retn());
}

View File

@ -511,7 +511,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects)
anObj = anOper->TranslateDXDYDZCopy(myObjects[i].get(), dx, dy, dz);
if (!anObj->_is_nil()) {
if(!IsPreview())
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back(anObj._retn());
}
}
@ -522,7 +522,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects)
anObj = anOper->TranslateDXDYDZ(myObjects[i].get(), dx, dy, dz);
if (!anObj->_is_nil()) {
if(!IsPreview()) {
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
updateAttributes(anObj, aParameters);
}
objects.push_back(anObj._retn());
@ -567,7 +567,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects)
anObj = anOper->TranslateVectorDistance(myObjects[i].get(), myVector.get(), aDistance, toCreateCopy);
if (!anObj->_is_nil()) {
if(!IsPreview()) {
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
anObj->SetParameters(aParameters.join(":").toUtf8().constData());
if (!toCreateCopy)
updateAttributes(anObj, aParameters);
}

View File

@ -332,7 +332,7 @@ QString XAOPlugin_ImportDlg::addFieldInStudy( GEOM::GEOM_Field_ptr theField, GEO
GEOM::GEOM_FieldStep_ptr step = theField->GetStep(steps[i]);
QString stepName = (tr("XAOPLUGIN_STEP") + " %1 %2").arg( step->GetID() ).arg( step->GetStamp() );
SALOMEDS::SObject_wrap aSOField =
getGeomEngine()->AddInStudy( step, stepName.toLatin1().constData(), theField );
getGeomEngine()->AddInStudy( step, stepName.toUtf8().constData(), theField );
step->UnRegister();
}