Salome HOME
Copyright update 2022
[modules/homard.git] / src / HOMARDGUI / MonEditHypothesis.cxx
index eeab17920d3a9576cac37642615d6e6f888009e8..363d0aceb8e20f7dc5ccd6a4b2b31580a22a32d7 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2011-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2011-2022  CEA/DEN, EDF R&D
 //
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -103,8 +103,8 @@ void MonEditHypothesis::InitValEdit()
   int NivMax = aHypothesis->GetNivMax();
   double DiamMin = aHypothesis->GetDiamMin();
   int AdapInit = aHypothesis->GetAdapInit();
-  int LevelOutput = aHypothesis->GetLevelOutput();
-  if ( NivMax > 0 || DiamMin > 0 || AdapInit != 0 || LevelOutput != 0 )
+  int ExtraOutput = aHypothesis->GetExtraOutput();
+  if ( NivMax > 0 || DiamMin > 0 || AdapInit != 0 || ExtraOutput != 1 )
   { GBAdvancedOptions->setVisible(1);
     if ( NivMax > 0 )
     { SpinBoxNivMax->setValue(NivMax);
@@ -131,14 +131,36 @@ void MonEditHypothesis::InitValEdit()
     else
     { GBAdapInit->setVisible(0) ;
     }
-    if ( LevelOutput != 0 )
+    if ( ExtraOutput % 2 == 0 )
     {
-      CBLevelOutput->setChecked(true);
-      CBLevelOutput->setEnabled(false);
+      CBOutputLevel->setChecked(true);
+      CBOutputLevel->setEnabled(false);
     }
-    else
-    { CBLevelOutput->setVisible(0) ;
+    else { CBOutputLevel->setVisible(0) ; }
+    if ( ExtraOutput % 3 == 0 )
+    {
+      CBOutputQuality->setChecked(true);
+      CBOutputQuality->setEnabled(false);
+    }
+    else { CBOutputQuality->setVisible(0) ; }
+    if ( ExtraOutput % 5 == 0 )
+    {
+      CBOutputDiameter->setChecked(true);
+      CBOutputDiameter->setEnabled(false);
+    }
+    else { CBOutputDiameter->setVisible(0) ; }
+    if ( ExtraOutput % 7 == 0 )
+    {
+      CBOutputParent->setChecked(true);
+      CBOutputParent->setEnabled(false);
+    }
+    else { CBOutputParent->setVisible(0) ; }
+    if ( ExtraOutput % 11 == 0 )
+    {
+      CBOutputVoisins->setChecked(true);
+      CBOutputVoisins->setEnabled(false);
     }
+    else { CBOutputVoisins->setVisible(0) ; }
   }
   else
   { GBAdvancedOptions->setVisible(0); }
@@ -434,7 +456,7 @@ void MonEditHypothesis::SetFiltrage()
 {
   if (CBGroupe->isChecked())
   {
-    MonEditListGroup *aDlg = new MonEditListGroup(this, NULL, TRUE, HOMARD::HOMARD_Gen::_duplicate(myHomardGen),_aCaseName, _aListeGroupes) ;
+    MonEditListGroup *aDlg = new MonEditListGroup(this, NULL, true, HOMARD::HOMARD_Gen::_duplicate(myHomardGen),_aCaseName, _aListeGroupes) ;
     aDlg->show();
   }
 }