Salome HOME
IPAL21120 SIGSEGV on Meshing attached Compound with Automatic Hexadralization
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Hypotheses.cxx
index 2078b02c7bb0de3b410ae0f4a891cc4bd3d82bdc..5365754f2034e47f6b96835b15f25f6a6fb1dd27 100644 (file)
@@ -1,23 +1,24 @@
-// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
 //
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-
 #include "SMESHGUI_Hypotheses.h"
 #include "SMESHGUI.h"
 #include "SMESHGUI_HypothesesUtils.h"
@@ -385,7 +386,42 @@ 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;
+}
 
 
 SMESHGUI_HypothesisDlg::SMESHGUI_HypothesisDlg( SMESHGUI_GenericHypothesisCreator* creator, QWidget* parent )
@@ -412,25 +448,7 @@ SMESHGUI_HypothesisDlg::SMESHGUI_HypothesisDlg( SMESHGUI_GenericHypothesisCreato
 
   myLayout->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() ) );
 }