+ return ok;
+}
+
+void SMESHGUI_GenericHypothesisCreator::onReject()
+{
+}
+
+QString SMESHGUI_GenericHypothesisCreator::helpPage() const
+{
+ QString aHypType = hypType();
+ QString aHelpFileName = "";
+ if ( aHypType == "LocalLength" )
+ aHelpFileName = "1d_meshing_hypo.html#average-length-anchor";
+ else if ( aHypType == "MaxLength" )
+ aHelpFileName = "1d_meshing_hypo.html#max-length-anchor";
+ else if ( aHypType == "Arithmetic1D")
+ aHelpFileName = "1d_meshing_hypo.html#arithmetic-1d-anchor";
+ else if ( aHypType == "GeometricProgression")
+ aHelpFileName = "1d_meshing_hypo.html#geometric-1d-anchor";
+ else if ( aHypType == "FixedPoints1D")
+ aHelpFileName = "1d_meshing_hypo.html#fixed-points-1d-anchor";
+ else if ( aHypType == "MaxElementArea")
+ aHelpFileName = "2d_meshing_hypo.html#max-element-area-anchor";
+ else if ( aHypType == "MaxElementVolume")
+ aHelpFileName = "max_element_volume_hypo.html";
+ else if ( aHypType == "StartEndLength")
+ aHelpFileName = "1d_meshing_hypo.html#start-and-end-length-anchor";
+ else if ( aHypType == "Deflection1D")
+ aHelpFileName = "1d_meshing_hypo.html#deflection-1d-anchor";
+ else if ( aHypType == "Adaptive1D")
+ aHelpFileName = "1d_meshing_hypo.html#adaptive-1d-anchor";
+ else if ( aHypType == "AutomaticLength")
+ aHelpFileName = "1d_meshing_hypo.html#automatic-length-anchor";
+ else if ( aHypType == "NumberOfSegments")
+ aHelpFileName = "1d_meshing_hypo.html#number-of-segments-anchor";
+ else if ( aHypType == "ProjectionSource1D")
+ aHelpFileName = "projection_algos.html";
+ else if ( aHypType == "ProjectionSource2D")
+ aHelpFileName = "projection_algos.html";
+ else if ( aHypType == "ProjectionSource3D")
+ aHelpFileName = "projection_algos.html";
+ else if ( aHypType == "NumberOfLayers")
+ aHelpFileName = "radial_prism_algo.html";
+ else if ( aHypType == "NumberOfLayers2D")
+ aHelpFileName = "radial_quadrangle_1D2D_algo.html";
+ else if ( aHypType == "LayerDistribution")
+ aHelpFileName = "radial_prism_algo.html";
+ else if ( aHypType == "LayerDistribution2D")
+ aHelpFileName = "radial_quadrangle_1D2D_algo.html";
+ else if ( aHypType == "SegmentLengthAroundVertex")
+ aHelpFileName = "segments_around_vertex_algo.html";
+ else if ( aHypType == "QuadrangleParams")
+ aHelpFileName = "2d_meshing_hypo.html#hypo-quad-params-anchor";
+ else if ( aHypType == "ViscousLayers")
+ aHelpFileName = "additional_hypo.html#viscous-layers-anchor";
+ else if ( aHypType == "ViscousLayers2D")
+ aHelpFileName = "additional_hypo.html#viscous-layers-anchor";
+ else if ( aHypType == "ImportSource1D" || aHypType == "ImportSource2D")
+ aHelpFileName = "use_existing_algos.html";
+ return aHelpFileName;
+}
+
+SMESHGUI_HypothesisDlg::SMESHGUI_HypothesisDlg( SMESHGUI_GenericHypothesisCreator* creator, QWidget* parent )
+: QtxDialog( parent, false, true ),
+ myCreator( creator )
+{
+ setAttribute(Qt::WA_DeleteOnClose, true);
+ // setMinimumSize( 300, height() );
+// setFixedSize( 300, height() );
+ QVBoxLayout* topLayout = new QVBoxLayout( mainFrame() );
+ topLayout->setMargin( 0 );
+ topLayout->setSpacing( 0 );
+
+ QFrame* titFrame = new QFrame( mainFrame() );
+ QHBoxLayout* titLay = new QHBoxLayout( titFrame );
+ titLay->setMargin( 0 );
+ titLay->setSpacing( SPACING );
+
+ myIconLabel = new QLabel( titFrame );
+ myIconLabel->setScaledContents( false );
+ myIconLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ myTypeLabel = new QLabel( titFrame );
+ if( creator )
+ myTypeLabel->setText( creator->hypType() );
+
+ titLay->addWidget( myIconLabel, 0 );
+ titLay->addWidget( myTypeLabel, 0 );
+ titLay->addStretch( 1 );
+
+ topLayout->addWidget( titFrame, 0 );
+
+ myHelpFileName = creator->helpPage();
+
+ connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
+}
+
+SMESHGUI_HypothesisDlg::~SMESHGUI_HypothesisDlg()
+{
+ delete myCreator;
+}
+
+void SMESHGUI_HypothesisDlg::setCustomFrame( QFrame* f )
+{
+ if( f )