mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-14 02:30:35 +05:00
Unicode support
This commit is contained in:
parent
1ad455b491
commit
1f08af47cc
@ -435,7 +435,7 @@ EntityGUI_FieldDlg::StepTable::StepTable (int stepID, int dataType,
|
||||
if ( vals->length() == nbRows * nbComps )
|
||||
for ( int iV = 0, iR = 0; iR < nbRows; ++iR )
|
||||
for ( int iC = 1; iC < nbColumns; ++iC )
|
||||
setItem( iR, iC, new QTableWidgetItem( vals[ iV++ ].in() ));
|
||||
setItem( iR, iC, new QTableWidgetItem( QString::fromUtf8( vals[ iV++ ].in() ) ) );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1012,13 +1012,13 @@ void EntityGUI_FieldDlg::Init()
|
||||
myIsCreation = false;
|
||||
|
||||
CORBA::String_var fName = myField->GetName();
|
||||
myMainFrame->ResultName->setText( fName.in() );
|
||||
myMainFrame->ResultName->setText( QString::fromUtf8( fName.in() ) );
|
||||
|
||||
myShape = myField->GetShape();
|
||||
CORBA::String_var sName;
|
||||
if ( !myShape->_is_nil() )
|
||||
sName = myShape->GetName();
|
||||
myShapeName->setText( sName.in() ? sName.in() : "");
|
||||
myShapeName->setText( QString::fromUtf8( sName.in() ? sName.in() : "" ) );
|
||||
|
||||
myTypeCombo->setCurrentIndex( myField->GetDataType() );
|
||||
|
||||
@ -1414,7 +1414,7 @@ void EntityGUI_FieldDlg::showCurStep()
|
||||
{
|
||||
GEOM::string_array_var compNames = myField->GetComponents();
|
||||
for ( int iC = 0; iC < compNames->length(); ++iC )
|
||||
headers << compNames[ iC ].in();
|
||||
headers << QString::fromUtf8( compNames[ iC ].in() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2751,7 +2751,7 @@ void GEOM_Displayer::readFieldStepInfo( GEOM::GEOM_FieldStep_var theGeomFieldSte
|
||||
{
|
||||
GEOM::string_array_var aValues = aGeomStringFieldStep->GetValues();
|
||||
for( size_t i = 0, n = aValues->length(); i < n; i++ )
|
||||
aFieldStepData << QString( aValues[i] );
|
||||
aFieldStepData << QString::fromUtf8( aValues[i].in() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1996,8 +1996,8 @@ void GeometryGUI::updateCreationInfo()
|
||||
|
||||
QString plugin_name;
|
||||
for ( size_t i = 0; i < info->params.length(); ++i ) {
|
||||
myCreationInfoWdg->addParam( info->params[i].name.in(),
|
||||
info->params[i].value.in() );
|
||||
myCreationInfoWdg->addParam( QString::fromUtf8( info->params[i].name.in() ),
|
||||
QString::fromUtf8( info->params[i].value.in() ) );
|
||||
QString value = info->params[i].name.in();
|
||||
if( value == PLUGIN_NAME ) {
|
||||
plugin_name = info->params[i].value.in();
|
||||
|
@ -112,15 +112,11 @@ GEOM::string_array* GEOM_Field_i::GetComponents()
|
||||
if ( !comps.IsNull() )
|
||||
{
|
||||
compArr->length( comps->Length() );
|
||||
std::string entry;
|
||||
int i, i0, nb;
|
||||
for ( i = i0 = comps->Lower(), nb = comps->Upper(); i <= nb; ++i )
|
||||
{
|
||||
const TCollection_ExtendedString& anEntry = comps->Value( i );
|
||||
entry.resize( anEntry.LengthOfCString() );
|
||||
char* pstr = &entry[0];
|
||||
anEntry.ToUTF8CString( pstr );
|
||||
compArr[ i-i0 ] = CORBA::string_dup( entry.c_str() );
|
||||
compArr[ i-i0 ] = CORBA::string_dup( TCollection_AsciiString( anEntry ).ToCString() );
|
||||
}
|
||||
}
|
||||
return compArr._retn();
|
||||
@ -494,15 +490,11 @@ GEOM::string_array* GEOM_StringFieldStep_i::GetValues()
|
||||
if ( !values.IsNull() )
|
||||
{
|
||||
resArray->length( values->Length() );
|
||||
std::string entry;
|
||||
int i, i0, nb;
|
||||
for ( i = i0 = values->Lower(), nb = values->Upper(); i <= nb; ++i )
|
||||
{
|
||||
const TCollection_ExtendedString& anEntry = values->Value( i );
|
||||
entry.resize( anEntry.LengthOfCString() );
|
||||
char* pstr = &entry[0];
|
||||
anEntry.ToUTF8CString( pstr );
|
||||
resArray[ i-i0 ] = CORBA::string_dup( entry.c_str() );
|
||||
resArray[ i-i0 ] = CORBA::string_dup( TCollection_AsciiString( anEntry ).ToCString() );
|
||||
}
|
||||
}
|
||||
return resArray._retn();
|
||||
|
@ -241,7 +241,7 @@ void XAOPlugin_ExportDlg::processObject()
|
||||
{
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
item->setData(Qt::UserRole, QVariant(i));
|
||||
item->setText(fields[i]->GetName());
|
||||
item->setText(QString::fromUtf8(fields[i]->GetName()));
|
||||
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
|
||||
item->setCheckState(Qt::Checked);
|
||||
lstFields->addItem(item);
|
||||
@ -450,7 +450,7 @@ bool XAOPlugin_ExportDlg::execute()
|
||||
// call engine function
|
||||
GEOM::IXAOOperations_var aXAOOp = GEOM::IXAOOperations::_narrow( getOperation() );
|
||||
res = aXAOOp->ExportXAO(m_mainObj, groups, fields,
|
||||
author.toStdString().c_str(),
|
||||
fileName.toStdString().c_str());
|
||||
author.toUtf8().data(),
|
||||
fileName.toUtf8().data());
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user