+//=======================================================================
+// function : FunctionPreview
+// purpose :
+//=======================================================================
+void SMESHGUI_aParameterDlg::FunctionPreview( const SMESHGUI_aParameterPtr p, QWidget* w )
+{
+ if( !w || !w->isShown() )
+ return;
+
+ SMESHGUI_strParameter* str_param = dynamic_cast<SMESHGUI_strParameter*>( p.operator->() );
+ SMESHGUI_tableParameter* tab_param = dynamic_cast<SMESHGUI_tableParameter*>( p.operator->() );
+ SMESHGUI_boolParameter* bool_param = dynamic_cast<SMESHGUI_boolParameter*>( p.operator->() );
+ if( str_param && str_param->needPreview() )
+ {
+ QString val; str_param->GetNewText( val );
+ if( !val.isNull() )
+ myPreview->setParams( val );
+ }
+ else if( tab_param && tab_param->needPreview() )
+ {
+ SMESH::double_array d;
+ tab_param->data( d );
+ myPreview->setParams( d );
+ }
+ else if( bool_param && bool_param->needPreview() )
+ {
+ int exp=0;
+ bool_param->GetNewInt( exp );
+ myPreview->setIsExp( exp );
+ }
+}
+