Salome HOME
Update copyright information
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Hypotheses.cxx
index adadbfb76cbf39b359f5578ead48150ace5323d5..be4bffe15eaaf610fb09e29f2f7baf3c07db3d44 100644 (file)
@@ -1,28 +1,29 @@
-// SMESH SMESHGUI : GUI for SMESH component
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-// Copyright (C) 2003  CEA
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-// 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. 
+//  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.
 //
-// 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 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.
 //
-// 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 
+//  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
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_Hypotheses.cxx
 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
-//
-
 // SMESH includes
+//
 #include "SMESHGUI_Hypotheses.h"
 
 #include "SMESHGUI.h"
@@ -152,7 +153,6 @@ bool SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_
     Dlg->setObjectName( theHypName );
     Dlg->setHIcon( icon() );
     Dlg->setType( type() );
-    Dlg->setMinimumSize( Dlg->minimumSizeHint().width(), Dlg->minimumSizeHint().height() );
     retrieveParams();
     Dlg->show();
     if ( !myEventLoop )
@@ -407,6 +407,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;
+}
+
 
 
 
@@ -438,25 +475,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() ) );
 }
@@ -531,7 +550,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 ),
@@ -544,7 +564,8 @@ HypothesisData::HypothesisData( const QString& theTypeName,
     OptionalHypos( theOptionalHypos ),
     InputTypes( theInputTypes ),
     OutputTypes( theOutputTypes ),
-    IsNeedGeometry( theIsNeedGeometry )
+    IsNeedGeometry( theIsNeedGeometry ),
+    IsSupportSubmeshes( supportSub )
 {
 }