+ 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);
+
+ item.myName = tr( "EXTRUSION_METHOD" );
+ p.append( item );
+ StdMeshersGUI_RadioButtonsGrpWdg* methodWdg = new StdMeshersGUI_RadioButtonsGrpWdg("");
+ methodWdg->setButtonLabels ( QStringList()
+ << tr("EXTMETH_SURF_OFFSET_SMOOTH")
+ << tr("EXTMETH_FACE_OFFSET")
+ << tr("EXTMETH_NODE_OFFSET"),
+ QStringList()
+ << tr("ICON_EXTMETH_SURF_OFFSET_SMOOTH")
+ << tr("ICON_EXTMETH_FACE_OFFSET")
+ << tr("ICON_EXTMETH_NODE_OFFSET"));
+ methodWdg->setChecked( (int) h->GetMethod() );
+ customWidgets()->append( methodWdg );
+
+ 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->SetGeomShapeEntry( aSubEntry, aMainEntry );
+ if ( idsWg->SetListOfIDs( h->GetFaces() ))
+ {
+ idsWg->ShowPreview( true );
+ }
+ else
+ {
+ SUIT_MessageBox::warning( dlg(),tr( "SMESH_WRN_WARNING" ),tr( "BAD_FACES_WARNING" ));
+ idsWg->setEnabled( false );
+ }
+ 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->SetGeomShapeEntry( aSubEntry, aMainEntry );
+ if ( idsWg->SetListOfIDs( h->GetEdges() ))
+ {
+ idsWg->ShowPreview( true );
+ }
+ else
+ {
+ SUIT_MessageBox::warning( dlg(),tr( "SMESH_WRN_WARNING" ),tr( "BAD_EDGES_WARNING" ));
+ idsWg->setEnabled( false );
+ }
+ customWidgets()->append ( idsWg );
+ }
+ }