]> SALOME platform Git repositories - modules/jobmanager.git/commitdiff
Salome HOME
- Bug in files list
authorribes <ribes>
Fri, 22 Jan 2010 16:02:33 +0000 (16:02 +0000)
committerribes <ribes>
Fri, 22 Jan 2010 16:02:33 +0000 (16:02 +0000)
- Improvement of Job Wizard

src/genericgui/BL_CreateJobWizard.cxx
src/genericgui/BL_CreateJobWizard.hxx
src/genericgui/BL_JobTab.cxx

index 189b41921a5918cebcf09bf2fe4c4095541ea7be..eed2df291e1e0f6aa9f1140e4aaebd9ae1c9fcc3 100644 (file)
@@ -420,7 +420,7 @@ BL::BatchParametersPage::BatchParametersPage(QWidget * parent)
   main_layout->addWidget(label);
 
   // batch_directory
-  QLabel * label_directory = new QLabel("Batch directory: ");
+  QLabel * label_directory = new QLabel("Remote work directory: ");
   QLineEdit * line_directory = new QLineEdit(this);
   registerField("batch_directory", line_directory);
 
@@ -554,16 +554,17 @@ BL::FilesPage::FilesPage(BL::CreateJobWizard * parent)
   connect(_output_files_list, SIGNAL(itemSelectionChanged()), this, SLOT(output_itemSelectionChanged()));
 
   // Results Directory
-  QLabel * label_result_directory = new QLabel("Result directory: ");
-  QLineEdit * result_directory = new QLineEdit(this);
-  registerField("result_directory", result_directory);
+  QPushButton * button_result = new QPushButton("Local Result directory");
+  connect(button_result, SIGNAL(clicked()), this, SLOT(choose_local_directory()));
+  _result_directory = new QLineEdit(this);
+  registerField("result_directory", _result_directory);
 
   QGridLayout * output_box = new QGridLayout;
   output_box->addWidget(_output_files_button, 0, 0);
   output_box->addWidget(_remove_output_files_button, 0, 1);
   output_box->addWidget(_output_files_list, 1, 0, 1, -1);
-  output_box->addWidget(label_result_directory, 2, 0);
-  output_box->addWidget(result_directory, 2, 1, 1, -1);
+  output_box->addWidget(button_result, 2, 0);
+  output_box->addWidget(_result_directory, 2, 1, 1, -1);
   output_group_box->setLayout(output_box);
 
   QVBoxLayout * main_layout = new QVBoxLayout;
@@ -621,6 +622,18 @@ BL::FilesPage::choose_input_files()
   }
 }
 
+void
+BL::FilesPage::choose_local_directory()
+{
+  QString dir = QFileDialog::getExistingDirectory(this, tr("Choose local result directory"),
+                                                 "",
+                                                 QFileDialog::ShowDirsOnly
+                                                 | QFileDialog::DontResolveSymlinks);
+
+  if (dir != "")
+    _result_directory->setText(dir);
+}
+
 void 
 BL::FilesPage::remove_input_files()
 {
index 609c1ebf50b9d0f86f20f0854f42af147de4b56f..76ede8e5b87da549ed6cc2700a62cadd80a18ca7 100644 (file)
@@ -141,6 +141,7 @@ namespace BL{
       void choose_input_files();
       void remove_input_files();
       void input_itemSelectionChanged();
+      void choose_local_directory();
 
       void add_output_file();
       void remove_output_files();
@@ -150,6 +151,7 @@ namespace BL{
       QPushButton * _input_files_button;
       QPushButton * _remove_input_files_button;
       QListWidget * _input_files_list;
+      QLineEdit * _result_directory;
 
       QPushButton * _output_files_button;
       QPushButton * _remove_output_files_button;
index 5c8cab4561530707221f4c27721a14813a9f4b5a..f73de5811aa124679bf99b0530b4de4721343a1b 100644 (file)
@@ -192,6 +192,8 @@ BL::JobTab::job_selected(const QModelIndex & index)
     _job_em_label_value->setText(QString(batch_params.expected_memory.c_str()));
     _job_nop_label_value->setText(QVariant(batch_params.nb_proc).toString());
 
+    _input_files_list->clear();
+    _output_files_list->clear();
     std::list<std::string>::iterator it;
     for (it = files_params.input_files_list.begin(); it != files_params.input_files_list.end(); it++)
     {