Remove JoinObjectParameters() function

This commit is contained in:
vsr 2009-09-30 08:10:20 +00:00
parent 96313c9c5d
commit 00ee13aec2
17 changed files with 36 additions and 47 deletions

View File

@ -1294,16 +1294,6 @@ SalomeApp_Study* SMESHGUI::activeStudy()
return NULL; return NULL;
} }
//=============================================================================
/*!
*
*/
//=============================================================================
char* SMESHGUI::JoinObjectParameters(const QStringList& theParametersList)
{
return theParametersList.join(":").toLatin1().data();
}
//============================================================================= //=============================================================================
/*! /*!
* *

View File

@ -70,7 +70,6 @@ public :
static SUIT_ResourceMgr* resourceMgr(); static SUIT_ResourceMgr* resourceMgr();
static SUIT_Desktop* desktop(); static SUIT_Desktop* desktop();
static SalomeApp_Study* activeStudy(); static SalomeApp_Study* activeStudy();
static char* JoinObjectParameters(const QStringList& theParametersList);
bool isActiveStudyLocked(); bool isActiveStudyLocked();

View File

@ -309,7 +309,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
CheckBoxMerge->isChecked(), CheckBoxMerge->isChecked(),
SpinBoxTol->GetValue()); SpinBoxTol->GetValue());
aCompoundMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) ); aCompoundMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text() ); SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text() );
mySMESHGUI->updateObjBrowser(); mySMESHGUI->updateObjBrowser();

View File

@ -621,7 +621,7 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply()
if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK ) if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK )
myMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) ); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
//wc.stop(); //wc.stop();
wc.suspend(); wc.suspend();

View File

@ -558,7 +558,7 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply()
aMeshEditor->ExtrusionSweep(myElementsId.inout(), aVector, aNbSteps); aMeshEditor->ExtrusionSweep(myElementsId.inout(), aVector, aNbSteps);
} }
myMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) ); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
} catch (...) { } catch (...) {
} }

View File

@ -414,7 +414,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
aParameters << myDlg->myX->text(); aParameters << myDlg->myX->text();
aParameters << myDlg->myY->text(); aParameters << myDlg->myY->text();
aParameters << myDlg->myZ->text(); aParameters << myDlg->myZ->text();
aMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) ); aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
myDlg->myId->setText(""); myDlg->myId->setText("");

View File

@ -482,7 +482,7 @@ bool SMESHGUI_MeshPatternDlg::onApply()
aParameters << myNode1->text(); aParameters << myNode1->text();
if(myType == Type_3d ) if(myType == Type_3d )
aParameters << myNode2->text(); aParameters << myNode2->text();
myMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) ); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
} else { // Applying a pattern to geometrical object } else { // Applying a pattern to geometrical object
if (myType == Type_2d) if (myType == Type_2d)

View File

@ -346,7 +346,7 @@ bool SMESHGUI_MoveNodesDlg::onApply()
aParameters << myX->text(); aParameters << myX->text();
aParameters << myY->text(); aParameters << myY->text();
aParameters << myZ->text(); aParameters << myZ->text();
aMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) ); aMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
} catch (...) { } catch (...) {
} }

View File

@ -1198,7 +1198,7 @@ bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito
if( ok ) { if( ok ) {
QStringList aParameters; QStringList aParameters;
aParameters << myMaxAngleSpin->text(); aParameters << myMaxAngleSpin->text();
myMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) ); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
} }
return ok; return ok;
} }

View File

@ -95,7 +95,7 @@ namespace SMESH
_PTR(SObject) aSobj = SMESH::FindSObject( theMesh ); _PTR(SObject) aSobj = SMESH::FindSObject( theMesh );
SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor(); SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor();
aMeshEditor->AddNode( x, y, z ); aMeshEditor->AddNode( x, y, z );
theMesh->SetParameters( SMESHGUI::JoinObjectParameters(theParameters) ); theMesh->SetParameters( theParameters.join(":").toLatin1().constData() );
_PTR(Study) aStudy = GetActiveStudyDocument(); _PTR(Study) aStudy = GetActiveStudyDocument();
CORBA::Long anId = aStudy->StudyId(); CORBA::Long anId = aStudy->StudyId();
if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( anId, aSobj->GetID().c_str() ) ) { if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( anId, aSobj->GetID().c_str() ) ) {

View File

@ -544,7 +544,7 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
aMeshEditor->RotationSweep(anElementsId.inout(), anAxis, anAngle, aNbSteps, aTolerance); aMeshEditor->RotationSweep(anElementsId.inout(), anAxis, anAngle, aNbSteps, aTolerance);
} }
myMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) ); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
} catch (...) { } catch (...) {
} }

View File

@ -415,7 +415,7 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
else else
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, false); aMeshEditor->Rotate(anElementsId, anAxis, anAngle, false);
if( !myMesh->_is_nil()) if( !myMesh->_is_nil())
myMesh->SetParameters(SMESHGUI::JoinObjectParameters(aParameters)); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break; break;
case COPY_ELEMS_BUTTON: case COPY_ELEMS_BUTTON:
if ( makeGroups ) { if ( makeGroups ) {
@ -432,7 +432,7 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true); aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true);
} }
if( !myMesh->_is_nil()) if( !myMesh->_is_nil())
myMesh->SetParameters(SMESHGUI::JoinObjectParameters(aParameters)); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break; break;
case MAKE_MESH_BUTTON: case MAKE_MESH_BUTTON:
SMESH::SMESH_Mesh_var mesh; SMESH::SMESH_Mesh_var mesh;
@ -443,7 +443,7 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups, mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups,
LineEditNewMesh->text().toLatin1().data()); LineEditNewMesh->text().toLatin1().data());
if( !mesh->_is_nil()) if( !mesh->_is_nil())
mesh->SetParameters(SMESHGUI::JoinObjectParameters(aParameters)); mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
} }
} catch (...) { } catch (...) {
} }

View File

@ -380,7 +380,7 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply()
anIterationLimit, aMaxAspectRatio, aMethod); anIterationLimit, aMaxAspectRatio, aMethod);
} }
myMesh->SetParameters( SMESHGUI::JoinObjectParameters(aParameters) ); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
} catch (...) { } catch (...) {
} }

View File

@ -500,7 +500,7 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false ); aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
if( !myMesh->_is_nil()) if( !myMesh->_is_nil())
myMesh->SetParameters(SMESHGUI::JoinObjectParameters(aParameters)); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break; break;
} }
case COPY_ELEMS_BUTTON: { case COPY_ELEMS_BUTTON: {
@ -518,7 +518,7 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, true); aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, true);
} }
if( !myMesh->_is_nil()) if( !myMesh->_is_nil())
myMesh->SetParameters(SMESHGUI::JoinObjectParameters(aParameters)); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break; break;
} }
case MAKE_MESH_BUTTON: { case MAKE_MESH_BUTTON: {
@ -530,7 +530,7 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups, mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
LineEditNewMesh->text().toLatin1().data()); LineEditNewMesh->text().toLatin1().data());
if( !mesh->_is_nil()) if( !mesh->_is_nil())
mesh->SetParameters(SMESHGUI::JoinObjectParameters(aParameters)); mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break; break;
} }
} }

View File

@ -488,7 +488,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
else else
aMeshEditor->Translate(anElementsId, aVector, false); aMeshEditor->Translate(anElementsId, aVector, false);
if( !myMesh->_is_nil()) if( !myMesh->_is_nil())
myMesh->SetParameters(SMESHGUI::JoinObjectParameters(aParameters)); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break; break;
case COPY_ELEMS_BUTTON: case COPY_ELEMS_BUTTON:
if ( makeGroups ) { if ( makeGroups ) {
@ -505,7 +505,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
aMeshEditor->Translate(anElementsId, aVector, true); aMeshEditor->Translate(anElementsId, aVector, true);
} }
if( !myMesh->_is_nil()) if( !myMesh->_is_nil())
myMesh->SetParameters(SMESHGUI::JoinObjectParameters(aParameters)); myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break; break;
case MAKE_MESH_BUTTON: case MAKE_MESH_BUTTON:
SMESH::SMESH_Mesh_var mesh; SMESH::SMESH_Mesh_var mesh;
@ -516,7 +516,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups, mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups,
LineEditNewMesh->text().toLatin1().data()); LineEditNewMesh->text().toLatin1().data());
if( !mesh->_is_nil()) if( !mesh->_is_nil())
mesh->SetParameters(SMESHGUI::JoinObjectParameters(aParameters)); mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
} }
} catch (...) { } catch (...) {
} }

View File

@ -379,7 +379,7 @@ bool StdMeshersGUI_NbSegmentsCreator::storeParamsToHypo( const NbSegmentsHypothe
//the function will be checked with old conversion mode, so that it may occurs //the function will be checked with old conversion mode, so that it may occurs
//unexpected errors for user //unexpected errors for user
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
} }
catch(const SALOME::SALOME_Exception& ex) catch(const SALOME::SALOME_Exception& ex)
{ {

View File

@ -415,9 +415,9 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
StdMeshers::StdMeshers_LocalLength::_narrow( hypothesis() ); StdMeshers::StdMeshers_LocalLength::_narrow( hypothesis() );
h->SetLength( params[0].myValue.toDouble() ); h->SetLength( params[0].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
h->SetPrecision( params[1].myValue.toDouble() ); h->SetPrecision( params[1].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
} }
else if( hypType()=="MaxLength" ) else if( hypType()=="MaxLength" )
{ {
@ -425,7 +425,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
StdMeshers::StdMeshers_MaxLength::_narrow( hypothesis() ); StdMeshers::StdMeshers_MaxLength::_narrow( hypothesis() );
h->SetLength( params[0].myValue.toDouble() ); h->SetLength( params[0].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
h->SetUsePreestimatedLength( widget< QCheckBox >( 1 )->isChecked() ); h->SetUsePreestimatedLength( widget< QCheckBox >( 1 )->isChecked() );
if ( !h->HavePreestimatedLength() && !h->_is_equivalent( initParamsHypothesis() )) { if ( !h->HavePreestimatedLength() && !h->_is_equivalent( initParamsHypothesis() )) {
StdMeshers::StdMeshers_MaxLength_var hInit = StdMeshers::StdMeshers_MaxLength_var hInit =
@ -439,7 +439,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
StdMeshers::StdMeshers_SegmentLengthAroundVertex::_narrow( hypothesis() ); StdMeshers::StdMeshers_SegmentLengthAroundVertex::_narrow( hypothesis() );
h->SetLength( params[0].myValue.toDouble() ); h->SetLength( params[0].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
} }
else if( hypType()=="Arithmetic1D" ) else if( hypType()=="Arithmetic1D" )
{ {
@ -450,9 +450,9 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 ); widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 );
h->SetStartLength( params[0].myValue.toDouble() ); h->SetStartLength( params[0].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
h->SetEndLength( params[1].myValue.toDouble() ); h->SetEndLength( params[1].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
if (w) { if (w) {
h->SetReversedEdges( w->GetListOfIDs() ); h->SetReversedEdges( w->GetListOfIDs() );
h->SetObjectEntry( w->GetMainShapeEntry() ); h->SetObjectEntry( w->GetMainShapeEntry() );
@ -470,7 +470,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
widget< StdMeshersGUI_SubShapeSelectorWdg >( 1 ); widget< StdMeshersGUI_SubShapeSelectorWdg >( 1 );
if (w1) { if (w1) {
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
h->SetPoints( w1->GetListOfPoints() ); h->SetPoints( w1->GetListOfPoints() );
h->SetNbSegments( w1->GetListOfSegments() ); h->SetNbSegments( w1->GetListOfSegments() );
} }
@ -483,7 +483,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
{ {
StdMeshers::StdMeshers_MaxElementArea_var h = StdMeshers::StdMeshers_MaxElementArea_var h =
StdMeshers::StdMeshers_MaxElementArea::_narrow( hypothesis() ); StdMeshers::StdMeshers_MaxElementArea::_narrow( hypothesis() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
h->SetMaxElementArea( params[0].myValue.toDouble() ); h->SetMaxElementArea( params[0].myValue.toDouble() );
} }
else if( hypType()=="MaxElementVolume" ) else if( hypType()=="MaxElementVolume" )
@ -492,7 +492,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
StdMeshers::StdMeshers_MaxElementVolume::_narrow( hypothesis() ); StdMeshers::StdMeshers_MaxElementVolume::_narrow( hypothesis() );
h->SetMaxElementVolume( params[0].myValue.toDouble() ); h->SetMaxElementVolume( params[0].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
} }
else if( hypType()=="StartEndLength" ) else if( hypType()=="StartEndLength" )
{ {
@ -503,9 +503,9 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 ); widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 );
h->SetStartLength( params[0].myValue.toDouble() ); h->SetStartLength( params[0].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
h->SetEndLength( params[1].myValue.toDouble() ); h->SetEndLength( params[1].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
if (w) { if (w) {
h->SetReversedEdges( w->GetListOfIDs() ); h->SetReversedEdges( w->GetListOfIDs() );
h->SetObjectEntry( w->GetMainShapeEntry() ); h->SetObjectEntry( w->GetMainShapeEntry() );
@ -515,7 +515,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
{ {
StdMeshers::StdMeshers_Deflection1D_var h = StdMeshers::StdMeshers_Deflection1D_var h =
StdMeshers::StdMeshers_Deflection1D::_narrow( hypothesis() ); StdMeshers::StdMeshers_Deflection1D::_narrow( hypothesis() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
h->SetDeflection( params[0].myValue.toDouble() ); h->SetDeflection( params[0].myValue.toDouble() );
} }
else if( hypType()=="AutomaticLength" ) else if( hypType()=="AutomaticLength" )
@ -531,7 +531,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
StdMeshers::StdMeshers_NumberOfLayers::_narrow( hypothesis() ); StdMeshers::StdMeshers_NumberOfLayers::_narrow( hypothesis() );
h->SetNumberOfLayers( params[0].myValue.toInt() ); h->SetNumberOfLayers( params[0].myValue.toInt() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
} }
else if( hypType()=="LayerDistribution" ) else if( hypType()=="LayerDistribution" )
{ {
@ -550,7 +550,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
StdMeshers::StdMeshers_NumberOfLayers2D::_narrow( hypothesis() ); StdMeshers::StdMeshers_NumberOfLayers2D::_narrow( hypothesis() );
h->SetNumberOfLayers( params[0].myValue.toInt() ); h->SetNumberOfLayers( params[0].myValue.toInt() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList)); h->SetParameters(aVariablesList.join(":").toLatin1().constData());
} }
else if( hypType()=="LayerDistribution2D" ) else if( hypType()=="LayerDistribution2D" )
{ {
@ -878,7 +878,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
aLastVarsList.append(QString(aParameters[i].in())); aLastVarsList.append(QString(aParameters[i].in()));
if(!aLastVarsList.isEmpty()) if(!aLastVarsList.isEmpty())
h->GetLayerDistribution()->SetLastParameters(SMESHGUI::JoinObjectParameters(aLastVarsList)); h->GetLayerDistribution()->SetLastParameters(aLastVarsList.join(":").toLatin1().constData());
customWidgets()->append customWidgets()->append
( new StdMeshersGUI_LayerDistributionParamWdg( h->GetLayerDistribution(), hypName(), dlg())); ( new StdMeshersGUI_LayerDistributionParamWdg( h->GetLayerDistribution(), hypName(), dlg()));
@ -904,7 +904,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
aLastVarsList.append(QString(aParameters[i].in())); aLastVarsList.append(QString(aParameters[i].in()));
if(!aLastVarsList.isEmpty()) if(!aLastVarsList.isEmpty())
h->GetLayerDistribution()->SetLastParameters(SMESHGUI::JoinObjectParameters(aLastVarsList)); h->GetLayerDistribution()->SetLastParameters(aLastVarsList.join(":").toLatin1().constData());
customWidgets()->append customWidgets()->append
( new StdMeshersGUI_LayerDistributionParamWdg( h->GetLayerDistribution(), hypName(), dlg())); ( new StdMeshersGUI_LayerDistributionParamWdg( h->GetLayerDistribution(), hypName(), dlg()));