Salome HOME
Dump Python Extension
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Hypotheses.cxx
index b073f08158197d5d3a72e6b6fdc35810d6c3f82f..11500d302878a98b07a1930db7e77db2c82b3d94 100644 (file)
 #include <utilities.h>
 
 // SALOME GUI includes
-#include <QtxIntSpinBox.h>
 #include <SUIT_Session.h>
 #include <SUIT_MessageBox.h>
 #include <SUIT_ResourceMgr.h>
 #include <LightApp_Application.h>
+#include <SalomeApp_IntSpinBox.h>
 
 // Qt includes
 #include <QFrame>
@@ -152,7 +152,6 @@ bool SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_
     Dlg->setObjectName( theHypName );
     Dlg->setHIcon( icon() );
     Dlg->setType( type() );
-    Dlg->setMinimumSize( 300, Dlg->minimumSizeHint().height() );
     retrieveParams();
     Dlg->show();
     if ( !myEventLoop )
@@ -207,7 +206,7 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
       {
       case QVariant::Int:
         {
-          QtxIntSpinBox* sb = new QtxIntSpinBox( GroupC1 );
+          SalomeApp_IntSpinBox* sb = new SalomeApp_IntSpinBox( GroupC1 );
          sb->setObjectName( (*anIt).myName );
           attuneStdWidget( sb, i );
           sb->setValue( (*anIt).myValue.toInt() );
@@ -270,9 +269,9 @@ bool SMESHGUI_GenericHypothesisCreator::getStdParamFromDlg( ListOfStdParams& par
   for( ; anIt!=aLast; anIt++ )
   {
     item.myName = (*anIt)->objectName();
-    if( (*anIt)->inherits( "QtxIntSpinBox" ) )
+    if( (*anIt)->inherits( "SalomeApp_IntSpinBox" ) )
     {
-      QtxIntSpinBox* sb = ( QtxIntSpinBox* )( *anIt );
+      SalomeApp_IntSpinBox* sb = ( SalomeApp_IntSpinBox* )( *anIt );
       item.myValue = sb->value();
       params.append( item );
     }
@@ -407,6 +406,31 @@ 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
+    aHelpFileName = "";
+  return aHelpFileName;
+}
+
 
 
 
@@ -438,25 +462,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 +537,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 +551,8 @@ HypothesisData::HypothesisData( const QString& theTypeName,
     OptionalHypos( theOptionalHypos ),
     InputTypes( theInputTypes ),
     OutputTypes( theOutputTypes ),
-    IsNeedGeometry( theIsNeedGeometry )
+    IsNeedGeometry( theIsNeedGeometry ),
+    IsSupportSubmeshes( supportSub )
 {
 }