+ else if( hypType()=="ImportSource1D" )
+ {
+ StdMeshers::StdMeshers_ImportSource1D_var h =
+ StdMeshers::StdMeshers_ImportSource1D::_narrow( hyp );
+
+ SMESH::string_array_var groupEntries = h->GetSourceEdges();
+ CORBA::Boolean toCopyMesh, toCopyGroups;
+ h->GetCopySourceMesh(toCopyMesh, toCopyGroups);
+
+ item.myName = tr( "SMESH_SOURCE_EDGES" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::GROUP_EDGE ),
+ groupEntries));
+
+ item.myName = tr( "SMESH_COPY_MESH" ); p.append( item );
+ QCheckBox* aQCheckBox = new QCheckBox(dlg());
+ aQCheckBox->setChecked( toCopyMesh );
+ connect( aQCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( onValueChanged() ));
+ customWidgets()->append( aQCheckBox );
+
+ item.myName = tr( "SMESH_TO_COPY_GROUPS" ); p.append( item );
+ aQCheckBox = new QCheckBox(dlg());
+ aQCheckBox->setChecked( toCopyGroups );
+ aQCheckBox->setEnabled( toCopyMesh );
+ customWidgets()->append( aQCheckBox );
+ }
+ else if( hypType()=="ImportSource2D" )
+ {
+ StdMeshers::StdMeshers_ImportSource2D_var h =
+ StdMeshers::StdMeshers_ImportSource2D::_narrow( hyp );
+
+ SMESH::string_array_var groupEntries = h->GetSourceFaces();
+ CORBA::Boolean toCopyMesh, toCopyGroups;
+ h->GetCopySourceMesh(toCopyMesh, toCopyGroups);
+
+ item.myName = tr( "SMESH_SOURCE_FACES" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::GROUP_FACE ),
+ groupEntries));
+
+ item.myName = tr( "SMESH_COPY_MESH" ); p.append( item );
+ QCheckBox* aQCheckBox = new QCheckBox(dlg());
+ aQCheckBox->setChecked( toCopyMesh );
+ connect( aQCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( onValueChanged() ));
+ customWidgets()->append( aQCheckBox );
+
+ item.myName = tr( "SMESH_COPY_GROUPS" ); p.append( item );
+ aQCheckBox = new QCheckBox(dlg());
+ aQCheckBox->setChecked( toCopyGroups );
+ aQCheckBox->setEnabled( toCopyMesh );
+ customWidgets()->append( aQCheckBox );
+ }
+ else if( hypType()=="ViscousLayers" )
+ {
+ StdMeshers::StdMeshers_ViscousLayers_var h =
+ StdMeshers::StdMeshers_ViscousLayers::_narrow( hyp );
+
+ item.myName = tr( "SMESH_TOTAL_THICKNESS" );
+ if(!initVariableName( hyp, item, "SetTotalThickness" ))
+ item.myValue = h->GetTotalThickness();
+ p.append( item );
+ customWidgets()->append (0);
+
+ item.myName = tr( "SMESH_NUMBER_OF_LAYERS" );
+ if(!initVariableName( hyp, item, "SetNumberLayers" ))
+ item.myValue = h->GetNumberLayers();
+ p.append( item );
+ customWidgets()->append (0);
+
+ item.myName = tr( "SMESH_STRETCH_FACTOR" );
+ if(!initVariableName( hyp, item, "SetStretchFactor" ))
+ item.myValue = h->GetStretchFactor();
+ p.append( item );
+ customWidgets()->append (0);
+
+ QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
+ QString aSubEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
+ if ( !aMainEntry.isEmpty() )
+ {
+ item.myName = tr( "TO_IGNORE_FACES_OR_NOT" );
+ p.append( item );
+
+ StdMeshersGUI_RadioButtonsGrpWdg* ignoreWdg = new StdMeshersGUI_RadioButtonsGrpWdg("");
+ ignoreWdg->setButtonLabels ( QStringList()
+ << tr("NOT_TO_IGNORE_FACES")
+ << tr("TO_IGNORE_FACES") );
+ ignoreWdg->setChecked( h->GetIsToIgnoreFaces() );
+ connect(ignoreWdg->getButtonGroup(),SIGNAL(buttonClicked(int)),this,SLOT(onValueChanged()));
+ customWidgets()->append( ignoreWdg );
+
+ item.myName =
+ tr( h->GetIsToIgnoreFaces() ? "SMESH_FACES_WO_LAYERS" : "SMESH_FACES_WITH_LAYERS" );
+ p.append( item );
+
+ StdMeshersGUI_SubShapeSelectorWdg* idsWg =
+ new StdMeshersGUI_SubShapeSelectorWdg(0,TopAbs_FACE);
+
+ idsWg->SetMainShapeEntry( aMainEntry );
+ idsWg->SetGeomShapeEntry( aSubEntry.isEmpty() ? aMainEntry : aSubEntry );
+ idsWg->SetListOfIDs( h->GetFaces() );
+ idsWg->showPreview( true );
+ customWidgets()->append ( idsWg );
+ }
+ }
+ else if( hypType()=="ViscousLayers2D" )
+ {
+ StdMeshers::StdMeshers_ViscousLayers2D_var h =
+ StdMeshers::StdMeshers_ViscousLayers2D::_narrow( hyp );
+
+ item.myName = tr( "SMESH_TOTAL_THICKNESS" );
+ if(!initVariableName( hyp, item, "SetTotalThickness" ))
+ item.myValue = h->GetTotalThickness();
+ p.append( item );
+ customWidgets()->append (0);
+
+ item.myName = tr( "SMESH_NUMBER_OF_LAYERS" );
+ if(!initVariableName( hyp, item, "SetNumberLayers" ))
+ item.myValue = h->GetNumberLayers();
+ p.append( item );
+ customWidgets()->append (0);
+
+ item.myName = tr( "SMESH_STRETCH_FACTOR" );
+ if(!initVariableName( hyp, item, "SetStretchFactor" ))
+ item.myValue = h->GetStretchFactor();
+ p.append( item );
+ customWidgets()->append (0);
+
+ QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
+ QString aSubEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
+ if ( !aMainEntry.isEmpty() )
+ {
+ item.myName = tr("TO_IGNORE_EDGES_OR_NOT");
+ p.append( item );
+
+ StdMeshersGUI_RadioButtonsGrpWdg* ignoreWdg = new StdMeshersGUI_RadioButtonsGrpWdg("");
+ ignoreWdg->setButtonLabels ( QStringList()
+ << tr("NOT_TO_IGNORE_EDGES")
+ << tr("TO_IGNORE_EDGES") );
+ ignoreWdg->setChecked( h->GetIsToIgnoreEdges() );
+ connect(ignoreWdg->getButtonGroup(),SIGNAL(buttonClicked(int)),this,SLOT(onValueChanged()));
+ customWidgets()->append( ignoreWdg );
+
+ item.myName =
+ tr( h->GetIsToIgnoreEdges() ? "SMESH_EDGES_WO_LAYERS" : "SMESH_EDGES_WITH_LAYERS" );
+ p.append( item );
+
+ StdMeshersGUI_SubShapeSelectorWdg* idsWg =
+ new StdMeshersGUI_SubShapeSelectorWdg(0,TopAbs_EDGE);
+
+ idsWg->SetMainShapeEntry( aMainEntry );
+ idsWg->SetGeomShapeEntry( aSubEntry.isEmpty() ? aMainEntry : aSubEntry );
+ idsWg->SetListOfIDs( h->GetEdges() );
+ idsWg->showPreview( true );
+ customWidgets()->append ( idsWg );
+ }
+ }
+ // else if (hypType() == "QuadrangleParams")
+ // {
+ // StdMeshers::StdMeshers_QuadrangleParams_var h =
+ // StdMeshers::StdMeshers_QuadrangleParams::_narrow(hyp);
+
+ // item.myName = tr("SMESH_BASE_VERTEX");
+ // p.append(item);
+
+ // StdMeshersGUI_SubShapeSelectorWdg* aDirectionWidget =
+ // new StdMeshersGUI_SubShapeSelectorWdg(0, TopAbs_VERTEX);
+ // aDirectionWidget->SetMaxSize(1);
+ // QString anEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
+ // QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
+ // if (anEntry == "")
+ // anEntry = h->GetObjectEntry();
+ // aDirectionWidget->SetGeomShapeEntry(anEntry);
+ // aDirectionWidget->SetMainShapeEntry(aMainEntry);
+ // if (!isCreation()) {
+ // SMESH::long_array_var aVec = new SMESH::long_array;
+ // int vertID = h->GetTriaVertex();
+ // if (vertID > 0) {
+ // aVec->length(1);
+ // aVec[0] = vertID;
+ // aDirectionWidget->SetListOfIDs(aVec);
+ // }
+ // }
+ // aDirectionWidget->showPreview(true);
+
+ // item.myName = tr("SMESH_QUAD_TYPE");
+ // p.append(item);
+
+ // StdMeshersGUI_QuadrangleParamWdg* aTypeWidget =
+ // new StdMeshersGUI_QuadrangleParamWdg();
+ // if (!isCreation()) {
+ // aTypeWidget->SetType(int(h->GetQuadType()));
+ // }
+
+ // customWidgets()->append(aDirectionWidget);
+ // customWidgets()->append(aTypeWidget);
+ // }