Salome HOME
bos #32737 Allow to choose between MG-Tetra and MG-Tetra_HPC multithread
[plugins/ghs3dplugin.git] / src / GUI / GHS3DPluginGUI_AdvWidget.cxx
index b2dc3a15c0c63f604fe3737a242266379f398a92..e70781f946be6f53064488a8fbe5b7c0f628ab1a 100644 (file)
@@ -135,3 +135,23 @@ void GHS3DPluginGUI_AdvWidget::itemChanged(QTreeWidgetItem * tblRow, int column)
     myOptionTable->blockSignals( false );
   }
 }
+
+void GHS3DPluginGUI_AdvWidget::EnableAdvancedOptions( bool isMGTetra )
+{
+  int iRow = 0, nbRows = myOptionTable->topLevelItemCount();
+  // hard coded: register all possible options here
+  std::vector<std::string>_commonOptions = { "split_overconstrained_tetrahedra" };
+  std::vector<std::string>::iterator tk;
+  for ( ; iRow < nbRows; ++iRow )
+  {
+    // Have to allow advanced option for MGTetra HPC to work
+    tk = std::find( _commonOptions.begin(), 
+                    _commonOptions.end(),  
+                    myOptionTable->topLevelItem( iRow )->data( NAME_COL, PARAM_NAME ).toString().toStdString() 
+                  );
+
+    if ( tk == _commonOptions.end() ) 
+      myOptionTable->topLevelItem( iRow )->setDisabled( !isMGTetra );
+  
+  }
+}
\ No newline at end of file