Salome HOME
Updated copyright comment
[modules/homard.git] / src / HOMARDGUI / MonPursueIteration.cxx
index 6d98b287a08ed44f9d69738daf551492ca129613..561af779ab8a5b669e9e41dc673fb53bab4a2d02 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2011-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2011-2024  CEA, EDF
 //
 // 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
@@ -18,6 +18,7 @@
 //
 
 #include "MonPursueIteration.h"
+#include "HOMARD.hxx"
 
 #include <QFileDialog>
 #include <QMessageBox>
@@ -53,7 +54,7 @@ MonPursueIteration::MonPursueIteration ( bool modal, HOMARD::HOMARD_Gen_var myHo
   SetNewCaseName() ;
   _Type = 1 ;
   GBIterationintoCase->setVisible(0);
-  spinBoxNumber->setVisible(0);
+  SpinBoxNumber->setVisible(0);
 
   adjustSize();
   MESSAGE("Fin du constructeur de MonPursueIteration");
@@ -107,11 +108,7 @@ bool MonPursueIteration::PushOnApply()
       return false;
     }
   }
-#ifndef WIN32
-  if (chdir(aDirName.toStdString().c_str()) != 0)
-#else
-  if (_chdir(aDirName.toStdString().c_str()) != 0)
-#endif
+  if (CHDIR(aDirName.toStdString().c_str()) != 0)
   {
     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
                               QObject::tr("HOM_CASE_DIRECTORY_3") );
@@ -125,11 +122,7 @@ bool MonPursueIteration::PushOnApply()
                               QObject::tr("HOM_START_DIRECTORY_1") );
     return false;
   }
-#ifndef WIN32
-  if (chdir(aDirNameStart.toStdString().c_str()) != 0)
-#else
-  if (_chdir(aDirNameStart.toStdString().c_str()) != 0)
-#endif
+  if (CHDIR(aDirNameStart.toStdString().c_str()) != 0)
   {
     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
                               QObject::tr("HOM_START_DIRECTORY_3") );
@@ -138,7 +131,7 @@ bool MonPursueIteration::PushOnApply()
 
 // 3. Enregistrement du numero d'iteration
   int Number ;
-  if ( _Type == 3 ) { Number = spinBoxNumber->value() ; }
+  if ( _Type == 3 ) { Number = SpinBoxNumber->value() ; }
 
 // 4. Creation du cas
   QString _aCaseName=LECaseName->text().trimmed();
@@ -221,8 +214,8 @@ void MonPursueIteration::PushOnOK()
 void MonPursueIteration::PushOnHelp()
 //-------------------------------
 {
-  char* LanguageShort = myHomardGen->GetLanguageShort();
-  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""), QString(LanguageShort));
+  std::string LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""), QString(LanguageShort.c_str()));
 }
 // ---------------------------------
 void MonPursueIteration::SetNewCaseName()
@@ -238,9 +231,9 @@ void MonPursueIteration::SetNewCaseName()
     {
       if ( aCaseName == QString((MyCases)[i]))
       {
-          num += 1;
-          aCaseName = "";
-          break;
+        num ++ ;
+        aCaseName = "" ;
+        break ;
       }
    }
   }
@@ -266,7 +259,7 @@ void MonPursueIteration::FromIteration()
 // ------------------------------------------------------------------------
 {
   GBIterationintoCase->setVisible(0);
-  spinBoxNumber->setVisible(0);
+  SpinBoxNumber->setVisible(0);
   _Type = 1 ;
   adjustSize();
 }
@@ -281,7 +274,7 @@ void MonPursueIteration::FromCase()
 void MonPursueIteration::CaseLastIteration()
 // ------------------------------------------------------------------------
 {
-  spinBoxNumber->setVisible(0);
+  SpinBoxNumber->setVisible(0);
   _Type = 2 ;
   adjustSize();
 }
@@ -289,7 +282,7 @@ void MonPursueIteration::CaseLastIteration()
 void MonPursueIteration::CaseNIteration()
 // ------------------------------------------------------------------------
 {
-  spinBoxNumber->setVisible(1);
+  SpinBoxNumber->setVisible(1);
   _Type = 3 ;
   adjustSize();
 }