Salome HOME
Update copyrights 2014.
[modules/jobmanager.git] / src / genericgui / BL_CreateJobWizard.hxx
index b1f5c67d581d79376d0faca0da696f469d074a9a..28f1585eb4136b1c8741399e5abda9e88c76eab6 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2009-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2014  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
@@ -38,6 +38,7 @@ namespace BL{
 
   class JobsManager_QT;
   class JobNamePage;
+  class BatchParametersPage;
   class CreateJobWizard: public QWizard
   {
     Q_OBJECT
@@ -54,13 +55,12 @@ namespace BL{
       void end(int result);
 
     private:
-      //Page Name
-      QLineEdit * _nameLineEdit;
       BL::JobsManager_QT * _jobs_manager;
       QListWidget * _input_files_list;
       QListWidget * _output_files_list;
 
       BL::JobNamePage * _job_name_page;
+      BL::BatchParametersPage * _batch_parameters_page;
       BL::SALOMEServices * _salome_services;
 
     public:
@@ -75,17 +75,18 @@ namespace BL{
 
       std::string batch_directory;
 
-         // For COORM
-         std::string coorm_batch_directory;
+      // For COORM
+      std::string coorm_batch_directory;
 
-         std::string maximum_duration;
-      std::string expected_memory;
+      std::string maximum_duration;
+      unsigned long mem_limit;
+      BL::Job::MemReqType mem_req_type;
       int nb_proc;
       bool exclusive;
 
-         // Parameters for COORM
-         std::string launcher_file;
-         std::string launcher_args;
+      // Parameters for COORM
+      std::string launcher_file;
+      std::string launcher_args;
 
       std::string result_directory;
       std::list<std::string> input_files_list;
@@ -104,7 +105,7 @@ namespace BL{
             Page_Command_Main_Definitions,
             Page_PythonSalome_Main_Definitions,
             Page_BatchParameters,
-                       Page_COORM_BatchParameters,
+            Page_COORM_BatchParameters,
             Page_Files,
             Page_Resource,
             Page_Conclusion};
@@ -154,15 +155,25 @@ namespace BL{
     Q_OBJECT
 
     public:
-      BatchParametersPage(QWidget * parent);
+      enum MemUnit {MB, GB};
+
+      BatchParametersPage(QWidget * parent, BL::SALOMEServices * salome_services);
       virtual ~BatchParametersPage();
 
-      virtual bool validatePage();
+      virtual void initializePage();
       virtual int nextId() const;
       virtual void cleanupPage();
 
+      MemUnit getMemUnit() const;
+      void setMemUnit(MemUnit mem_unit);
+
+      BL::Job::MemReqType getMemReqType() const;
+      void setMemReqType(BL::Job::MemReqType mem_req_type);
+
     private:
       Ui::ResourceRequirementsWizardPage * ui;
+      BL::SALOMEServices * _salome_services;
+      std::string resource_choosed;
   };
 
   // For COORM
@@ -198,7 +209,7 @@ namespace BL{
 
       virtual void initializePage();
       virtual int nextId() const;
-      virtual bool validatePage();
+      virtual bool isComplete() const;
       virtual void cleanupPage() {}
 
     public slots: