Salome HOME
0020045: EDF 852 SMESH: Documention of Projection algorithms
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Hypotheses.cxx
index a790cf126a6f44922141983d7b10cfa8039ecf00..bc2765def472d818f3d640926e549d849955d7b8 100644 (file)
@@ -406,6 +406,43 @@ void SMESHGUI_GenericHypothesisCreator::onReject()
 {
 }
 
+QString SMESHGUI_GenericHypothesisCreator::helpPage() const
+{
+  QString aHypType = hypType();
+  QString aHelpFileName;
+  if ( aHypType == "LocalLength" )
+    aHelpFileName = "a1d_meshing_hypo_page.html#average_length_anchor";
+  else if ( aHypType == "Arithmetic1D")
+    aHelpFileName = "a1d_meshing_hypo_page.html#arithmetic_1d_anchor";
+  else if ( aHypType == "MaxElementArea")
+    aHelpFileName = "a2d_meshing_hypo_page.html#max_element_area_anchor";
+  else if ( aHypType == "MaxElementVolume")
+    aHelpFileName = "max_element_volume_hypo_page.html";
+  else if ( aHypType == "StartEndLength")
+    aHelpFileName = "a1d_meshing_hypo_page.html#start_and_end_length_anchor";
+  else if ( aHypType == "Deflection1D")
+    aHelpFileName = "a1d_meshing_hypo_page.html#deflection_1d_anchor";
+  else if ( aHypType == "AutomaticLength")
+    aHelpFileName = "a1d_meshing_hypo_page.html#automatic_length_anchor";
+  else if ( aHypType == "NumberOfSegments")
+    aHelpFileName = "a1d_meshing_hypo_page.html#number_of_segments_anchor";
+  else if ( aHypType == "ProjectionSource1D")
+    aHelpFileName = "projection_algos_page.html";
+  else if ( aHypType == "ProjectionSource2D")
+    aHelpFileName = "projection_algos_page.html";
+  else if ( aHypType == "ProjectionSource3D")
+    aHelpFileName = "projection_algos_page.html";
+  else if ( aHypType == "NumberOfLayers")
+    aHelpFileName = "radial_prism_algo_page.html";
+  else if ( aHypType == "LayerDistribution")
+    aHelpFileName = "radial_prism_algo_page.html";
+  else if ( aHypType == "SegmentLengthAroundVertex")
+    aHelpFileName = "segments_around_vertex_algo.html";
+  else
+    aHelpFileName = "";
+  return aHelpFileName;
+}
+
 
 
 
@@ -437,25 +474,7 @@ SMESHGUI_HypothesisDlg::SMESHGUI_HypothesisDlg( SMESHGUI_GenericHypothesisCreato
 
   topLayout->addWidget( titFrame, 0 );
 
-  QString aHypType = creator->hypType();
-  if ( aHypType == "LocalLength" )
-    myHelpFileName = "a1d_meshing_hypo_page.html#average_length_anchor";
-  else if ( aHypType == "Arithmetic1D")
-    myHelpFileName = "a1d_meshing_hypo_page.html#arithmetic_1d_anchor";
-  else if ( aHypType == "MaxElementArea")
-    myHelpFileName = "a2d_meshing_hypo_page.html#max_element_area_anchor";
-  else if ( aHypType == "MaxElementVolume")
-    myHelpFileName = "max_element_volume_hypo_page.html";
-  else if ( aHypType == "StartEndLength")
-    myHelpFileName = "a1d_meshing_hypo_page.html#start_and_end_length_anchor";
-  else if ( aHypType == "Deflection1D")
-    myHelpFileName = "a1d_meshing_hypo_page.html#deflection_1d_anchor";
-  else if ( aHypType == "AutomaticLength")
-    myHelpFileName = "a1d_meshing_hypo_page.html#automatic_length_anchor";
-  else if ( aHypType == "NumberOfSegments")
-    myHelpFileName = "a1d_meshing_hypo_page.html#number_of_segments_anchor";
-  else
-    myHelpFileName = "";
+  myHelpFileName = creator->helpPage();
 
   connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) );
 }
@@ -469,7 +488,7 @@ void SMESHGUI_HypothesisDlg::setCustomFrame( QFrame* f )
   if( f )
   {
     f->setParent( mainFrame() );
-    qobject_cast<QVBoxLayout*>( layout() )->insertWidget( 1, f, 1 );
+    qobject_cast<QVBoxLayout*>( mainFrame()->layout() )->insertWidget( 1, f, 1 );
   }
 }
 
@@ -530,7 +549,8 @@ HypothesisData::HypothesisData( const QString& theTypeName,
                                const QStringList& theOptionalHypos,
                                const QStringList& theInputTypes,
                                const QStringList& theOutputTypes,
-                               const bool theIsNeedGeometry )
+                               const bool theIsNeedGeometry,
+                                const bool supportSub)
   : TypeName( theTypeName ),
     PluginName( thePluginName ),
     ServerLibName( theServerLibName ),
@@ -543,7 +563,8 @@ HypothesisData::HypothesisData( const QString& theTypeName,
     OptionalHypos( theOptionalHypos ),
     InputTypes( theInputTypes ),
     OutputTypes( theOutputTypes ),
-    IsNeedGeometry( theIsNeedGeometry )
+    IsNeedGeometry( theIsNeedGeometry ),
+    IsSupportSubmeshes( supportSub )
 {
 }