]> SALOME platform Git repositories - modules/yacs.git/blobdiff - src/genericgui/FormAdvParamContainer.cxx
Salome HOME
Workload manager: more tests and other improvements.
[modules/yacs.git] / src / genericgui / FormAdvParamContainer.cxx
index c88a2790190f54c23bd11389d66038b71fbc4f38..935828299a945e3bb8f0551398060cc8e7a6f6f0 100644 (file)
@@ -64,6 +64,7 @@ FormAdvParamContainer::FormAdvParamContainer(std::map<std::string, std::string>&
   connect(sb_procNode, SIGNAL(valueChanged(const QString&)), this, SLOT(onModifyProcs(const QString&)));
   connect(sb_nbprocpar, SIGNAL(valueChanged(const QString&)), this, SLOT(onModifyProcPar(const QString&)));
   connect(sb_nbproc, SIGNAL(valueChanged(const QString&)), this, SLOT(onModifyProcRes(const QString&)));
+  connect(ch_pycache,SIGNAL(stateChanged(int)),this,SLOT(onModifyUsePyCache(int)));
 }
 
 FormAdvParamContainer::~FormAdvParamContainer()
@@ -113,6 +114,11 @@ void FormAdvParamContainer::FillPanel(const std::string& resource, YACS::ENGINE:
   else
     le_workdir->setText("");
 
+  if(_container)
+    ch_pycache->setCheckState(_container->isUsingPythonCache()?Qt::Checked:Qt::Unchecked);
+  else
+    ch_pycache->setCheckState(Qt::Unchecked);
+
   if(_properties.count("container_name"))
     le_contname->setText(_properties["container_name"].c_str());
   else
@@ -532,3 +538,20 @@ void FormAdvParamContainer::onModifyResourceList(const QString &text)
   if (properties["resource_list"] != text.toStdString())
     onModified();
 }
+
+void FormAdvParamContainer::onModifyUsePyCache(int val)
+{
+  if (!_container)
+    return;
+  bool val2(false);
+  if(val==Qt::Unchecked)
+    val2=false;
+  if(val==Qt::Checked)
+    val2=true;
+  bool prop = _container->isUsingPythonCache();
+  int prop2((int)val2);
+  std::ostringstream oss; oss << prop2;
+  _container->usePythonCache(val2);
+  if(prop!=val2)
+    onModified();
+}