1 // Copyright (C) 2009 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _BL_CREATEJOBWIZARD_HXX_
21 #define _BL_CREATEJOBWIZARD_HXX_
25 #include "BL_Traces.hxx"
26 #include "BL_JobsManager_QT.hxx"
27 #include "BL_SALOMEServices.hxx"
35 class CreateJobWizard: virtual public QWizard
40 CreateJobWizard(BL::JobsManager_QT * jobs_manager, BL::SALOMEServices * salome_services);
41 virtual ~CreateJobWizard();
43 void setFilesList(QListWidget * input_files_list, QListWidget * output_files_list);
50 QLineEdit * _nameLineEdit;
51 BL::JobsManager_QT * _jobs_manager;
52 QListWidget * _input_files_list;
53 QListWidget * _output_files_list;
59 std::string yacs_file;
63 std::string batch_directory;
64 std::string expected_during_time;
65 std::string expected_memory;
68 std::string result_directory;
69 std::list<std::string> input_files_list;
70 std::list<std::string> output_files_list;
72 std::string machine_choosed;
77 enum {Page_JobName, Page_YACSSchema, Page_BatchParameters, Page_Files,
78 Page_Command_Main_Definitions, Page_Machine, Page_Conclusion};
80 class JobNamePage: virtual public QWizardPage
83 JobNamePage(QWidget * parent, BL::JobsManager_QT * jobs_manager);
84 virtual ~JobNamePage();
86 virtual bool validatePage();
87 virtual int nextId() const ;
90 BL::JobsManager_QT * _jobs_manager;
91 QRadioButton * _yacs_schema_button;
95 class CommandMainPage: virtual public QWizardPage
98 CommandMainPage(QWidget * parent);
99 virtual ~CommandMainPage();
101 virtual bool validatePage();
102 virtual int nextId() const ;
105 class ConclusionPage: virtual public QWizardPage
108 ConclusionPage(QWidget * parent);
109 virtual ~ConclusionPage();
111 virtual bool validatePage();
112 virtual int nextId() const ;
116 class YACSSchemaPage: virtual public QWizardPage
121 YACSSchemaPage(QWidget * parent);
122 virtual ~YACSSchemaPage();
124 virtual bool validatePage();
125 virtual int nextId() const ;
131 QPushButton * _yacs_file_button;
132 QLineEdit * _yacs_file_text;
135 class BatchParametersPage: virtual public QWizardPage
140 BatchParametersPage(QWidget * parent);
141 virtual ~BatchParametersPage();
143 virtual bool validatePage();
144 virtual int nextId() const;
147 class FilesPage: virtual public QWizardPage
152 FilesPage(BL::CreateJobWizard * parent);
153 virtual ~FilesPage();
155 virtual int nextId() const;
156 virtual bool validatePage();
159 void choose_input_files();
160 void remove_input_files();
161 void input_itemSelectionChanged();
163 void add_output_file();
164 void remove_output_files();
165 void output_itemSelectionChanged();
168 QPushButton * _input_files_button;
169 QPushButton * _remove_input_files_button;
170 QListWidget * _input_files_list;
172 QPushButton * _output_files_button;
173 QPushButton * _remove_output_files_button;
174 QListWidget * _output_files_list;
177 class MachinePage: virtual public QWizardPage
182 MachinePage(BL::CreateJobWizard * parent, BL::SALOMEServices * salome_services);
183 virtual ~MachinePage();
185 virtual int nextId() const;
186 virtual bool validatePage();
189 void machine_itemSelectionChanged();
192 QListWidget * _machine_list;
193 QLineEdit * _machine_choosed;
194 BL::SALOMEServices * _salome_services;