QHBoxLayout *hLayout;
QLineEdit *editLine;
- hLayout = new QHBoxLayout();
- label = new QLabel(tr("Job name:"));
- editLine = new QLineEdit();
- editLine->setText(_model.job_name().c_str());
- hLayout->addWidget(label);
- hLayout->addWidget(editLine);
- mainLayout->addLayout(hLayout);
- connect(editLine, SIGNAL(textChanged(const QString &)),
- this, SLOT(updateJobName(const QString&)));
-
hLayout = new QHBoxLayout();
label = new QLabel(tr("Remote work directory:"));
editLine = new QLineEdit();
this, SLOT(updateLocalDirectory(const QString&)));
connect(localdirButton,SIGNAL(clicked()),this, SLOT(onChoseLocaldir()));
+ hLayout = new QHBoxLayout();
+ label = new QLabel(tr("Preprocessing script for the frontal:"));
+ _preprocScriptEdit = new QLineEdit();
+ _preprocScriptEdit->setText(_model.pre_command().c_str());
+ QPushButton* preprocButton = new QPushButton("...");
+ hLayout->addWidget(label);
+ hLayout->addWidget(_preprocScriptEdit);
+ hLayout->addWidget(preprocButton);
+ mainLayout->addLayout(hLayout);
+ connect(_preprocScriptEdit, SIGNAL(textChanged(const QString &)),
+ this, SLOT(updatePreprocessingScript(const QString&)));
+ connect(preprocButton,SIGNAL(clicked()),
+ this, SLOT(onChosePreprocessingScript()));
QGroupBox * inputFilesBox = new QGroupBox;
inputFilesBox->setTitle(tr("Additional input files:"));
{
}
-void PathsConfigWidget::updateJobName(const QString& value)
-{
- _model.job_name(value.toStdString());
-}
-
void PathsConfigWidget::updateWorkingDirectory(const QString& value)
{
_model.work_directory(value.toStdString());
_model.result_directory(value.toStdString());
}
+void PathsConfigWidget::updatePreprocessingScript(const QString& value)
+{
+ _model.pre_command(value.toStdString());
+}
+
void PathsConfigWidget::onChoseLocaldir()
{
QString dir;
}
}
+void PathsConfigWidget::onChosePreprocessingScript()
+{
+ QString file;
+ file = QFileDialog::getOpenFileName(this,
+ tr("Choose a script file"),
+ "");
+
+ if (file != "")
+ {
+ _model.pre_command(file.toStdString());
+ _preprocScriptEdit->setText(file);
+ }
+}
+
void PathsConfigWidget::inputSelectionChanged()
{
bool canRemove = (_inputFilesList->selectedItems().size() > 0);
virtual ~PathsConfigWidget();
public slots:
- void updateJobName(const QString& value);
void updateWorkingDirectory(const QString& value);
void updateLocalDirectory(const QString& value);
+ void updatePreprocessingScript(const QString& value);
void onChoseLocaldir();
+ void onChosePreprocessingScript();
void inputSelectionChanged();
void addInputFiles();
void removeInputFiles();
private:
ydefx::JobParametersProxy& _model;
QLineEdit * _localdirEdit;
+ QLineEdit * _preprocScriptEdit;
QListWidget * _inputFilesList;
QPushButton *_removeInputFilesButton;
};
connect(nb_branchesEdit, SIGNAL(valueChanged(int)),
this, SLOT(updateNbBranches(int)));
+ hLayout = new QHBoxLayout();
+ QLabel *label = new QLabel(tr("Job name:"));
+ QLineEdit *editLine = new QLineEdit();
+ editLine->setText(_model.job_name().c_str());
+ hLayout->addWidget(label);
+ hLayout->addWidget(editLine);
+ mainLayout->addLayout(hLayout);
+ connect(editLine, SIGNAL(textChanged(const QString &)),
+ this, SLOT(updateJobName(const QString&)));
+
mainLayout->addStretch();
setWidget(mainWidget);
setWidgetResizable (true);
{
}
+void QuickConfigWidget::updateJobName(const QString& value)
+{
+ _model.job_name(value.toStdString());
+}
+
void QuickConfigWidget::updateResource(const QString& value)
{
_model.configureResource(value.toStdString());