+
+//=================================================================================
+// function : onValueChanged()
+// purpose :
+//=================================================================================
+void StdMeshersGUI_CreateHypothesisDlg::onValueChanged()
+{
+ if( sender()->inherits( "QWidget" ) )
+ {
+ QWidget* w = ( QWidget* )sender();
+
+ SMESHGUI_aParameterPtr param;
+
+ ParameterMap::const_iterator anIt = myParamMap.begin(),
+ aLast = myParamMap.end();
+ for( ; anIt!=aLast; anIt++ )
+ if( anIt.data().editor == w )
+ {
+ param = anIt.key();
+ param->TakeValue( w );
+ UpdateShown( param );
+ break;
+ }
+ }
+}
+
+//=================================================================================
+// function : UpdateShown()
+// purpose :
+//=================================================================================
+void StdMeshersGUI_CreateHypothesisDlg::UpdateShown( const SMESHGUI_aParameterPtr param )
+{
+ SMESHGUI_dependParameter* depPar = dynamic_cast<SMESHGUI_enumParameter*>( param.get() );
+ if( !depPar )
+ depPar = dynamic_cast<SMESHGUI_boolParameter*>( param.get() );
+
+ if( !depPar )
+ return;
+
+ SMESHGUI_dependParameter::ShownMap& map = depPar->shownMap();
+ if( map.isEmpty() )
+ return;
+
+ int val;
+ depPar->TakeValue( myParamMap[ param ].editor );
+ depPar->GetNewInt( val );
+
+ bool hasValue = map.contains( val );
+
+ ParameterMap::const_iterator anIt = myParamMap.begin(),
+ aLast = myParamMap.end();
+ for( ; anIt!=aLast; anIt++ )
+ {
+ bool shown = hasValue && map[ val ].contains( (*anIt).order );
+ (*anIt).editor->setShown( shown );
+ (*anIt).label->setShown( shown );
+ }
+}