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)
{
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:
{
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;
}
}
if (aParameters.count() > 0)
- anObj[0]->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj[0]->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj[0]._retn());
{
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)
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;
}
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(),
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(),
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(),
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());
}
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;
if ( !anObj->_is_nil() ) {
if ( !IsPreview() )
- anObj->SetParameters(getSizeAsString().toLatin1().constData());
+ anObj->SetParameters(getSizeAsString().toUtf8().constData());
objects.push_back( anObj._retn() );
}
return res;
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) {
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;
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
{
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() );
}
}
QStringList aParameters;
aParameters << "" << "";
aParameters << mySpinBox[SpinBox1]->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;
aParameters << mySpinBox[SpinBox2U]->text();
aParameters << "" << "";
aParameters << mySpinBox[SpinBox2V]->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;
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;
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;
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 {
// 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());
}
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 );
}
}
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;
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) {
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);
// }
}
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 );
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();
}
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());
}
}
}
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();
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() );
}
}
if( !IsPreview() ) {
QStringList aCurrentParameters = myParameters;
aCurrentParameters << aParameters;
- anObj->SetParameters(aCurrentParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aCurrentParameters.join(":").toUtf8().constData());
}
objects.push_back( anObj._retn() );
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;
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;
( 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);
}
/* 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 : */
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" ),
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() );
}
}
}
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 );
}
}
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);
}
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 );
}
}
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() ));
}
}
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());
}
aName = GEOMBase::GetDefaultName( getPrefix( obj ) );
}
}
- anEntryList << addInStudy( obj, aName.toLatin1().constData() );
+ anEntryList << addInStudy( obj, aName.toUtf8().constData() );
// updateView=false
if( isDisplayResult() )
display( obj, false );
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;
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" ) );
}
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 );
}
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 );
}
{
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
{
// 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();
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 );
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 );
}
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;
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;
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;
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;
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;
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;
//=================================================================================
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 );
}
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 );
}
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 );
}
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
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
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
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);
}
}
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() );
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() );
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"))
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);
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() );
}
}
}
// 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 );
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 ) )
{
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") ) {
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);
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 ) {
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 ) );
// ... 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
}
// ... 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
_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 );
}
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);
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 );
}
}
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;
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);
//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);
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 );
_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;
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 );
}
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());
}
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:
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;
}
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());
}
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;
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 );
}
_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()));
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);
}
}
_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());
}
}
}
( 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);
}
}
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);
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));
anAspectText3d->SetColor( myLabelColor );
aGroup->SetPrimitivesAspect( anAspectText3d );
- aGroup->Text( aString.toLatin1().constData(), aVertex, 14 );
+ aGroup->Text( aString.toUtf8().constData(), aVertex, 14 );
}
}
else
// 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);
}
// 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);
}
{
QString anEntry = getSubShapeEntry(theId);
Handle(SALOME_InteractiveObject) anIO =
- createIO(anEntry.toLatin1().data());
+ createIO(anEntry.toUtf8().data());
getDisplayer()->Erase(anIO, false, false);
myMapDisplayedIDs.Remove(theId);
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());
}
if (!anObj->_is_nil())
{
if (!IsPreview())
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back(anObj._retn());
}
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;
}
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;
}
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;
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;
}
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;
}
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;
}
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;
}
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;
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;
{
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;
{
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;
{
QStringList aParameters;
aParameters << GroupPoints->SpinBox_DX->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
}
{
QStringList aParameters;
aParameters << GroupDimensions->SpinBox_DX->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
res = true;
break;
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;
}
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;
aParameters << "";
aParameters << myValEdt->text();
aParameters << "";
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
if ( !IsPreview() )
RepairGUI::ShowStatistics( anOper, this );
{
QStringList aParameters;
aParameters << myTolEdt->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back(anObj._retn());
}
if (!IsPreview()) {
QStringList aParameters;
aParameters << myTolEdt2->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back(anObj._retn());
}
if (aName.isEmpty())
aName = GEOMBase::GetDefaultName(getPrefix(*it));
}
- addInStudy(*it, aName.toLatin1().data());
+ addInStudy(*it, aName.toUtf8().data());
display(*it, false);
}
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 );
}
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());
if (aName.isEmpty())
aName = GEOMBase::GetDefaultName(getPrefix(*it));
}
- addInStudy(*it, aName.toLatin1().data());
+ addInStudy(*it, aName.toUtf8().data());
display(*it, false);
}
{
QStringList aParameters;
aParameters << myTolEdt->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
objects.push_back( anObj._retn() );
}
aParameters << QString( aParams[i] );
aParameters << getTexts( aParams );
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
RepairGUI::ShowStatistics( anOper, this );
}
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;
if (!anObj->_is_nil()) {
if (!IsPreview())
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back(anObj._retn());
}
if (!anObj->_is_nil()) {
if (!IsPreview())
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
objects.push_back(anObj._retn());
}
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() );
}
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());
}
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());
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());
}
}
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());
}
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());
}
}
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());
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);
}
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();
}