Salome HOME
Fix bug preventing to change the type of a cloned job
[modules/jobmanager.git] / src / genericgui / BL_CreateJobWizard.hxx
index e7ead5bef8fc01c69c27ba6e5c47cdcc4233a178..b9d37604db2221e4c81bed5e8afc08421aaac1b4 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
@@ -32,6 +32,7 @@
 namespace Ui {
   class ResourceRequirementsWizardPage;
   class FilesWizardPage;
+  class AdvancedParametersWizardPage;
 }
 
 namespace BL{
@@ -66,6 +67,7 @@ namespace BL{
     public:
       // Results
       std::string job_name;
+      enum {YACS, COMMAND, PYTHON_SALOME} job_type;
 
       std::string yacs_file;
       std::string command;
@@ -79,7 +81,7 @@ namespace BL{
       std::string coorm_batch_directory;
 
       std::string maximum_duration;
-      unsigned long mem_limit;
+      long mem_limit;
       BL::Job::MemReqType mem_req_type;
       int nb_proc;
       bool exclusive;
@@ -94,6 +96,8 @@ namespace BL{
 
       std::string resource_choosed;
       std::string batch_queue;
+      std::string wckey;
+      std::string extra_params;
 
       bool start_job;
       int dump_yacs_state;
@@ -108,6 +112,7 @@ namespace BL{
             Page_COORM_BatchParameters,
             Page_Files,
             Page_Resource,
+            Page_Advanced,
             Page_Conclusion};
   };
 
@@ -133,9 +138,6 @@ namespace BL{
       QLabel * _explanation;
 
     public:
-      QRadioButton * _yacs_schema_button;
-      QRadioButton * _command_button;
-      QRadioButton * _python_salome_button;
       bool _check_name;
   };
 
@@ -170,6 +172,10 @@ namespace BL{
       BL::Job::MemReqType getMemReqType() const;
       void setMemReqType(BL::Job::MemReqType mem_req_type);
 
+    public slots:
+      void timeChanged();
+      void memChanged();
+
     private:
       Ui::ResourceRequirementsWizardPage * ui;
       BL::SALOMEServices * _salome_services;
@@ -316,6 +322,23 @@ namespace BL{
       QLineEdit * _line_PythonSalome;
       QLineEdit * _line_env_file;
   };
+
+  class AdvancedParametersPage: public QWizardPage
+  {
+    Q_OBJECT
+
+    public:
+      AdvancedParametersPage(BL::CreateJobWizard * parent);
+      virtual ~AdvancedParametersPage();
+
+      virtual int nextId() const;
+      virtual void cleanupPage() {}
+
+    private:
+      Ui::AdvancedParametersWizardPage * ui;
+
+  };
+
 }
 
 #endif