From ccc1724bfc069769e572d0a445cf31d15d142b19 Mon Sep 17 00:00:00 2001 From: ribes Date: Wed, 18 Nov 2009 10:27:37 +0000 Subject: [PATCH] maximum_during_time to maximum_duration --- src/engine/BL_Job.cxx | 6 ++-- src/engine/BL_Job.hxx | 2 +- src/engine/BL_SALOMEServices.cxx | 2 +- src/genericgui/BL_CreateJobWizard.cxx | 52 +++++++++++++-------------- src/genericgui/BL_CreateJobWizard.hxx | 2 +- src/genericgui/BL_JobTab.cxx | 4 +-- src/genericgui/BL_JobsManager_QT.cxx | 4 +-- src/genericgui/Makefile.am | 2 +- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/engine/BL_Job.cxx b/src/engine/BL_Job.cxx index 7aab92f..2d22f93 100644 --- a/src/engine/BL_Job.cxx +++ b/src/engine/BL_Job.cxx @@ -27,7 +27,7 @@ BL::Job::Job() _command = ""; _env_file = ""; _batch_params.batch_directory = ""; - _batch_params.maximum_during_time = ""; + _batch_params.maximum_duration = ""; _batch_params.expected_memory = ""; _batch_params.nb_proc = 0; _files_params.result_directory = ""; @@ -46,7 +46,7 @@ BL::Job::Job(const std::string & name) _command = ""; _env_file = ""; _batch_params.batch_directory = ""; - _batch_params.maximum_during_time = ""; + _batch_params.maximum_duration = ""; _batch_params.expected_memory = ""; _batch_params.nb_proc = 0; _files_params.result_directory = ""; @@ -124,7 +124,7 @@ void BL::Job::setBatchParameters(BL::Job::BatchParam & param) { _batch_params.batch_directory = param.batch_directory; - _batch_params.maximum_during_time = param.maximum_during_time; + _batch_params.maximum_duration = param.maximum_duration; _batch_params.expected_memory = param.expected_memory; _batch_params.nb_proc = param.nb_proc; } diff --git a/src/engine/BL_Job.hxx b/src/engine/BL_Job.hxx index 7d99b8f..3ea4658 100644 --- a/src/engine/BL_Job.hxx +++ b/src/engine/BL_Job.hxx @@ -52,7 +52,7 @@ namespace BL{ struct BatchParam { std::string batch_directory; - std::string maximum_during_time; + std::string maximum_duration; std::string expected_memory; int nb_proc; }; diff --git a/src/engine/BL_SALOMEServices.cxx b/src/engine/BL_SALOMEServices.cxx index 21d24b2..7a053b8 100644 --- a/src/engine/BL_SALOMEServices.cxx +++ b/src/engine/BL_SALOMEServices.cxx @@ -129,7 +129,7 @@ BL::SALOMEServices::create_job(BL::Job * job) job_parameters->work_directory = CORBA::string_dup(cpp_batch_params.batch_directory.c_str()); // Resource - job_parameters->maximum_during_time = CORBA::string_dup(cpp_batch_params.maximum_during_time.c_str()); + job_parameters->maximum_duration = CORBA::string_dup(cpp_batch_params.maximum_duration.c_str()); job_parameters->resource_required.hostname = CORBA::string_dup(job->getMachine().c_str()); job_parameters->resource_required.nb_node = cpp_batch_params.nb_proc; job_parameters->queue = CORBA::string_dup(job->getBatchQueue().c_str()); diff --git a/src/genericgui/BL_CreateJobWizard.cxx b/src/genericgui/BL_CreateJobWizard.cxx index bee52f0..6347db1 100644 --- a/src/genericgui/BL_CreateJobWizard.cxx +++ b/src/genericgui/BL_CreateJobWizard.cxx @@ -31,7 +31,7 @@ BL::CreateJobWizard::CreateJobWizard(BL::JobsManager_QT * jobs_manager, BL::SALO command = ""; env_file = ""; batch_directory = ""; - maximum_during_time = ""; + maximum_duration = ""; expected_memory = ""; nb_proc = 1; @@ -94,15 +94,15 @@ BL::CreateJobWizard::end(int result) QString time_hour; QString time_min; - if (field("during_time_hour").toInt() < 10) - time_hour = "0" + field("during_time_hour").toString(); + if (field("duration_hour").toInt() < 10) + time_hour = "0" + field("duration_hour").toString(); else - time_hour = field("during_time_hour").toString(); - if (field("during_time_min").toInt() < 10) - time_min = "0" + field("during_time_min").toString(); + time_hour = field("duration_hour").toString(); + if (field("duration_min").toInt() < 10) + time_min = "0" + field("duration_min").toString(); else - time_min = field("during_time_min").toString(); - maximum_during_time = time_hour.toStdString() + ":" + time_min.toStdString() + ":00"; + time_min = field("duration_min").toString(); + maximum_duration = time_hour.toStdString() + ":" + time_min.toStdString() + ":00"; QString mem = field("mem_value").toString(); int mem_type_i = field("mem_type").toInt(); @@ -382,17 +382,17 @@ BL::BatchParametersPage::BatchParametersPage(QWidget * parent) registerField("batch_directory", line_directory); // exected during time - QLabel * label_during_time = new QLabel("Maximum during time: "); - QSpinBox * spin_during_time_hour = new QSpinBox(this); - QLabel * label_during_time_hour = new QLabel("Hours"); - spin_during_time_hour->setMinimum(0); - spin_during_time_hour->setMaximum(1000000); - registerField("during_time_hour", spin_during_time_hour); - QSpinBox * spin_during_time_min = new QSpinBox(this); - QLabel * label_during_time_min = new QLabel("Minutes"); - spin_during_time_min->setMinimum(0); - spin_during_time_min->setMaximum(59); - registerField("during_time_min", spin_during_time_min); + QLabel * label_duration = new QLabel("Maximum during time: "); + QSpinBox * spin_duration_hour = new QSpinBox(this); + QLabel * label_duration_hour = new QLabel("Hours"); + spin_duration_hour->setMinimum(0); + spin_duration_hour->setMaximum(1000000); + registerField("duration_hour", spin_duration_hour); + QSpinBox * spin_duration_min = new QSpinBox(this); + QLabel * label_duration_min = new QLabel("Minutes"); + spin_duration_min->setMinimum(0); + spin_duration_min->setMaximum(59); + registerField("duration_min", spin_duration_min); // memory QLabel * label_memory = new QLabel("Memory per nodes expected: "); @@ -416,11 +416,11 @@ BL::BatchParametersPage::BatchParametersPage(QWidget * parent) QGridLayout *layout = new QGridLayout; layout->addWidget(label_directory, 0, 0); layout->addWidget(line_directory, 0, 1, 1, -1); - layout->addWidget(label_during_time, 1, 0); - layout->addWidget(spin_during_time_hour, 1, 1); - layout->addWidget(label_during_time_hour, 1, 2); - layout->addWidget(spin_during_time_min, 1, 3); - layout->addWidget(label_during_time_min, 1, 4); + layout->addWidget(label_duration, 1, 0); + layout->addWidget(spin_duration_hour, 1, 1); + layout->addWidget(label_duration_hour, 1, 2); + layout->addWidget(spin_duration_min, 1, 3); + layout->addWidget(label_duration_min, 1, 4); layout->addWidget(label_memory, 2, 0); layout->addWidget(spin_memory, 2, 1); layout->addWidget(combo_memory, 2, 2); @@ -445,8 +445,8 @@ BL::BatchParametersPage::validatePage() return false; } - int time_hour = field("during_time_hour").toInt(); - int time_min = field("during_time_min").toInt(); + int time_hour = field("duration_hour").toInt(); + int time_min = field("duration_min").toInt(); if (time_hour == 0 and time_min == 0) { QMessageBox::warning(NULL, "Time Error", "Please enter an expected during time"); diff --git a/src/genericgui/BL_CreateJobWizard.hxx b/src/genericgui/BL_CreateJobWizard.hxx index f19c116..c2a5022 100644 --- a/src/genericgui/BL_CreateJobWizard.hxx +++ b/src/genericgui/BL_CreateJobWizard.hxx @@ -62,7 +62,7 @@ namespace BL{ std::string env_file; std::string batch_directory; - std::string maximum_during_time; + std::string maximum_duration; std::string expected_memory; int nb_proc; diff --git a/src/genericgui/BL_JobTab.cxx b/src/genericgui/BL_JobTab.cxx index d08d6df..3be18ad 100644 --- a/src/genericgui/BL_JobTab.cxx +++ b/src/genericgui/BL_JobTab.cxx @@ -84,7 +84,7 @@ BL::JobTab::createJobSummaryTab() QLabel * job_rd_label = new QLabel("Result directory:"); _job_rd_label_value = new QLabel(""); - QLabel * job_mdt_label = new QLabel("Maximum during time:"); + QLabel * job_mdt_label = new QLabel("Maximum duration:"); _job_mdt_label_value = new QLabel(""); QLabel * job_em_label = new QLabel("Expected memory:"); _job_em_label_value = new QLabel(""); @@ -189,7 +189,7 @@ BL::JobTab::job_selected(const QModelIndex & index) _job_bd_label_value->setText(QString(batch_params.batch_directory.c_str())); _job_rd_label_value->setText(QString(files_params.result_directory.c_str())); - _job_mdt_label_value->setText(QString(batch_params.maximum_during_time.c_str())); + _job_mdt_label_value->setText(QString(batch_params.maximum_duration.c_str())); _job_em_label_value->setText(QString(batch_params.expected_memory.c_str())); _job_nop_label_value->setText(QVariant(batch_params.nb_proc).toString()); diff --git a/src/genericgui/BL_JobsManager_QT.cxx b/src/genericgui/BL_JobsManager_QT.cxx index 471a9af..0684cda 100644 --- a/src/genericgui/BL_JobsManager_QT.cxx +++ b/src/genericgui/BL_JobsManager_QT.cxx @@ -163,7 +163,7 @@ BL::JobsManager_QT::create_job_wizard() new_job->setYACSFile(wizard.yacs_file); BL::Job::BatchParam param; param.batch_directory = wizard.batch_directory; - param.maximum_during_time = wizard.maximum_during_time; + param.maximum_duration = wizard.maximum_duration; param.expected_memory = wizard.expected_memory; param.nb_proc = wizard.nb_proc; new_job->setBatchParameters(param); @@ -183,7 +183,7 @@ BL::JobsManager_QT::create_job_wizard() new_job->setEnvFile(wizard.env_file); BL::Job::BatchParam param; param.batch_directory = wizard.batch_directory; - param.maximum_during_time = wizard.maximum_during_time; + param.maximum_duration = wizard.maximum_duration; param.expected_memory = wizard.expected_memory; param.nb_proc = wizard.nb_proc; new_job->setBatchParameters(param); diff --git a/src/genericgui/Makefile.am b/src/genericgui/Makefile.am index c039365..e0e69f3 100644 --- a/src/genericgui/Makefile.am +++ b/src/genericgui/Makefile.am @@ -45,7 +45,7 @@ libBL_GenericGui_la_CXXFLAGS = $(qt4_cppflags) \ libBL_GenericGui_la_LDFLAGS = $(qt4_ldflags) -libBL_GenericGui_la_LIBADD = -lQtGui -lQtCore -lQtWebKit \ +libBL_GenericGui_la_LIBADD = -lQtGui -lQtCore \ $(top_builddir)/src/bases/libBL_Bases.la \ $(top_builddir)/src/engine/libBL_Engine.la -- 2.39.2