Salome HOME
Increment version: 7.4.0
[plugins/ghs3dplugin.git] / src / GUI / GHS3DPluginGUI_HypothesisCreator.cxx
index 04517b58e5ac029620ba4f60d9ab1e3611e7598e..b368961eab0e55488e999542c2aef3dbb0946269 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2004-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2004-2014  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -24,6 +24,7 @@
 //
 #include "GHS3DPluginGUI_HypothesisCreator.h"
 #include "GHS3DPluginGUI_Enums.h"
+#include "GHS3DPluginGUI_Dlg.h"
 
 #include <GeometryGUI.h>
 
@@ -409,71 +410,39 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame()
   QGridLayout* anAdvLayout = new QGridLayout( myAdvGroup );
   anAdvLayout->setSpacing( 6 );
   anAdvLayout->setMargin( 11 );
-  
-  myMaximumMemoryCheck = new QCheckBox( tr( "MAX_MEMORY_SIZE" ), myAdvGroup );
-  myMaximumMemorySpin = new QSpinBox( myAdvGroup );
-  myMaximumMemorySpin->setMinimum( 1 );
-  myMaximumMemorySpin->setMaximum( maxAvailableMemory() );
-  myMaximumMemorySpin->setSingleStep( 10 );
-  QLabel* aMegabyteLabel = new QLabel( tr( "MEGABYTE" ), myAdvGroup );
-
-  myInitialMemoryCheck = new QCheckBox( tr( "INIT_MEMORY_SIZE" ), myAdvGroup );
-  myInitialMemorySpin = new QSpinBox( myAdvGroup );
-  myInitialMemorySpin->setMinimum( 1 );
-  myInitialMemorySpin->setMaximum( maxAvailableMemory() );
-  myInitialMemorySpin->setSingleStep( 10 );
-  QLabel* aMegabyteLabel2 = new QLabel( tr( "MEGABYTE" ), myAdvGroup );
-
-  QLabel* aWorkinDirLabel = new QLabel( tr( "WORKING_DIR" ), myAdvGroup );
-  myWorkingDir = new QLineEdit( myAdvGroup );
-  //myWorkingDir->setReadOnly( true );
-  QPushButton* dirBtn = new QPushButton( tr( "SELECT_DIR" ), myAdvGroup );
-  dirBtn->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
-  
-  myKeepFiles = new QCheckBox( tr( "KEEP_WORKING_FILES" ), myAdvGroup );
+  myAdvWidget = new GHS3DPluginGUI_AdvWidget(myAdvGroup);
+  anAdvLayout->addWidget( myAdvWidget);
 
-  QLabel* aVerboseLevelLabel = new QLabel( tr( "VERBOSE_LEVEL" ), myAdvGroup );
-  myVerboseLevelSpin = new QSpinBox( myAdvGroup );
-  myVerboseLevelSpin->setMinimum( 0 );
-  myVerboseLevelSpin->setMaximum( 10 );
-  myVerboseLevelSpin->setSingleStep( 1 );
+  myAdvWidget->maxMemoryCheck->setText(tr( "MAX_MEMORY_SIZE" ));
+  myAdvWidget->initialMemoryCheck->setText(tr( "INIT_MEMORY_SIZE" ));
 
-  myToCreateNewNodesCheck = new QCheckBox( tr( "TO_ADD_NODES" ), myAdvGroup );
-  
-  myRemoveInitialCentralPointCheck = new QCheckBox( tr( "NO_INITIAL_CENTRAL_POINT" ), myAdvGroup );
+  myAdvWidget->maxMemorySpin->RangeStepAndValidator(20.0, 1e6, 10.0);
+  myAdvWidget->maxMemorySpin->setValue( 128.0 );
+
+  myAdvWidget->initialMemorySpin->RangeStepAndValidator(0.0, 1e6, 10.0);
+  myAdvWidget->initialMemorySpin->setValue( 100.0 );
+
+  myAdvWidget->initialMemoryLabel            ->setText (tr( "MEGABYTE" ));
+  myAdvWidget->maxMemoryLabel                ->setText (tr( "MEGABYTE" ));
   
-  myBoundaryRecoveryCheck = new QCheckBox( tr( "RECOVERY_VERSION" ), myAdvGroup );
+  myAdvWidget->workingDirectoryLabel         ->setText (tr( "WORKING_DIR" ));
+  myAdvWidget->workingDirectoryPushButton    ->setText (tr( "SELECT_DIR" ));
+  myAdvWidget->keepWorkingFilesCheck         ->setText (tr( "KEEP_WORKING_FILES" ));
+  myAdvWidget->verboseLevelLabel             ->setText (tr( "VERBOSE_LEVEL" ));
+  myAdvWidget->removeLogOnSuccessCheck       ->setText (tr( "REMOVE_LOG_ON_SUCCESS" ));
+  myAdvWidget->logInFileCheck                ->setText (tr( "LOG_IN_FILE" ));
   
-  myFEMCorrectionCheck = new QCheckBox( tr( "FEM_CORRECTION" ), myAdvGroup );
+  myAdvWidget->memoryGroupBox                ->setTitle(tr( "MEMORY_GROUP_TITLE" ));
+  myAdvWidget->logGroupBox                   ->setTitle(tr( "LOG_GROUP_TITLE" ));
+  myAdvWidget->advancedMeshingGroupBox       ->setTitle(tr( "ADVANCED_MESHING_GROUP_TITLE" ));
   
-  QLabel* myGradationLabel = new QLabel( tr( "GHS3D_GRADATION" ), myAdvGroup );
-  myGradation = new SMESHGUI_SpinBox(myAdvGroup);
-  myGradation->RangeStepAndValidator(1.05, 5.0, 0.05, "length_precision");
-
-  QLabel* aTextOptionLabel = new QLabel( tr( "TEXT_OPTION" ), myAdvGroup );
-  myTextOption = new QLineEdit( myAdvGroup );
-
-  row = 0;
-  anAdvLayout->addWidget( myMaximumMemoryCheck,             row, 0, 1, 1 );
-  anAdvLayout->addWidget( myMaximumMemorySpin,              row, 1, 1, 1 );
-  anAdvLayout->addWidget( aMegabyteLabel,                   row++, 2, 1, 1 );
-  anAdvLayout->addWidget( myInitialMemoryCheck,             row, 0, 1, 1 );
-  anAdvLayout->addWidget( myInitialMemorySpin,              row, 1, 1, 1 );
-  anAdvLayout->addWidget( aMegabyteLabel2,                  row++, 2, 1, 1 );
-  anAdvLayout->addWidget( aWorkinDirLabel,                  row, 0, 1, 1 );
-  anAdvLayout->addWidget( myWorkingDir,                     row, 1, 1, 2 );
-  anAdvLayout->addWidget( dirBtn,                           row++, 3, 1, 1 );
-  anAdvLayout->addWidget( myKeepFiles,                      row++, 0, 1, 4 );
-  anAdvLayout->addWidget( aVerboseLevelLabel,               row, 0, 1, 1 );
-  anAdvLayout->addWidget( myVerboseLevelSpin,               row++, 1, 1, 2 );
-  anAdvLayout->addWidget( myToCreateNewNodesCheck,          row++, 0, 1, 4 );
-  anAdvLayout->addWidget( myRemoveInitialCentralPointCheck, row++, 0, 1, 4 );
-  anAdvLayout->addWidget( myBoundaryRecoveryCheck,          row++, 0, 1, 4 );
-  anAdvLayout->addWidget( myFEMCorrectionCheck,             row++, 0, 1, 4 );
-  anAdvLayout->addWidget( myGradationLabel,                 row, 0, 1, 1 );
-  anAdvLayout->addWidget( myGradation,                      row++, 1, 1, 2 );
-  anAdvLayout->addWidget( aTextOptionLabel,                 row, 0, 1, 1 );
-  anAdvLayout->addWidget( myTextOption,                     row++, 1, 1, 2 );
+  myAdvWidget->createNewNodesCheck           ->setText (tr( "TO_ADD_NODES" ));
+  myAdvWidget->removeInitialCentralPointCheck->setText (tr( "NO_INITIAL_CENTRAL_POINT" ));
+  myAdvWidget->boundaryRecoveryCheck         ->setText (tr( "RECOVERY_VERSION" ));
+  myAdvWidget->FEMCorrectionCheck            ->setText (tr( "FEM_CORRECTION" ));
+  myAdvWidget->gradationLabel                ->setText (tr( "GHS3D_GRADATION" ));
+  myAdvWidget->gradationSpinBox->RangeStepAndValidator(1.05, 5.0, 0.05, "length_precision");
+  myAdvWidget->textOptionLabel->setText(tr( "TEXT_OPTION" ));
 
   // Enforced vertices parameters
   myEnfGroup = new QWidget();
@@ -533,17 +502,17 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame()
 //   myGlobalGroupName = new QCheckBox(tr("GHS3D_ENF_VER_GROUPS"), myEnfGroup);
 //   myGlobalGroupName->setChecked(false);
   
-  QGroupBox* GroupBox = new QGroupBox( myEnfGroup );
-  QLabel* info = new QLabel( GroupBox );
-  info->setText( tr( "GHS3D_ENF_VER_INFO" ) );
-  info->setWordWrap( true );
-  QVBoxLayout* GroupBoxVLayout = new QVBoxLayout( GroupBox );
-  GroupBoxVLayout->setSpacing( 6 );
-  GroupBoxVLayout->setMargin( 11 );
-  GroupBoxVLayout->addWidget( info );
+  // QGroupBox* GroupBox = new QGroupBox( myEnfGroup );
+  // QLabel* info = new QLabel( GroupBox );
+  // info->setText( tr( "GHS3D_ENF_VER_INFO" ) );
+  // info->setWordWrap( true );
+  // QVBoxLayout* GroupBoxVLayout = new QVBoxLayout( GroupBox );
+  // GroupBoxVLayout->setSpacing( 6 );
+  // GroupBoxVLayout->setMargin( 11 );
+  // GroupBoxVLayout->addWidget( info );
   
 
-  anEnfLayout->addWidget(GroupBox,                  ENF_VER_WARNING, 0, 1, 2 );
+  //anEnfLayout->addWidget(GroupBox,                  ENF_VER_WARNING, 0, 1, 2 );
   anEnfLayout->addWidget(myEnforcedTableWidget,     ENF_VER_VERTEX, 0, ENF_VER_NB_LINES, 1);
   
   QGridLayout* anEnfLayout2 = new QGridLayout(myEnfGroup);
@@ -612,16 +581,16 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame()
 //   addEnfMeshButton->setEnabled(false);
   removeEnfMeshButton = new QPushButton(tr("GHS3D_ENF_REMOVE"),myEnfMeshGroup);
     
-  QGroupBox* GroupBox2 = new QGroupBox( myEnfMeshGroup );
-  QLabel* info2 = new QLabel( GroupBox2 );
-  info2->setText( tr( "GHS3D_ENF_MESH_INFO" ) );
-  info2->setWordWrap( true );
-  QVBoxLayout* GroupBox2VLayout = new QVBoxLayout( GroupBox2 );
-  GroupBox2VLayout->setSpacing( 6 );
-  GroupBox2VLayout->setMargin( 11 );
-  GroupBox2VLayout->addWidget( info2 );
+  // QGroupBox* GroupBox2 = new QGroupBox( myEnfMeshGroup );
+  // QLabel* info2 = new QLabel( GroupBox2 );
+  // info2->setText( tr( "GHS3D_ENF_MESH_INFO" ) );
+  // info2->setWordWrap( true );
+  // QVBoxLayout* GroupBox2VLayout = new QVBoxLayout( GroupBox2 );
+  // GroupBox2VLayout->setSpacing( 6 );
+  // GroupBox2VLayout->setMargin( 11 );
+  // GroupBox2VLayout->addWidget( info2 );
   
-  anEnfMeshLayout->addWidget( GroupBox2,                ENF_MESH_WARNING, 0, 1, 2 );
+  // anEnfMeshLayout->addWidget( GroupBox2,                ENF_MESH_WARNING, 0, 1, 2 );
   anEnfMeshLayout->addWidget(myEnforcedMeshTableWidget, ENF_MESH_MESH, 0, ENF_MESH_NB_LINES , 1);
   
   QGridLayout* anEnfMeshLayout2 = new QGridLayout(myEnfMeshGroup);
@@ -645,11 +614,14 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame()
   tab->setCurrentIndex( STD_TAB );
 
   // connections
-  connect( myToMeshHolesCheck,      SIGNAL( toggled( bool ) ), this, SLOT( onToMeshHoles(bool)));
-  connect( myMaximumMemoryCheck,    SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) );
-  connect( myInitialMemoryCheck,    SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) );
-  connect( myBoundaryRecoveryCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) );
-  connect( dirBtn,                  SIGNAL( clicked() ),       this, SLOT( onDirBtnClicked() ) );
+  //connect( myToMeshHolesCheck,      SIGNAL( toggled( bool ) ), this, SLOT( onToMeshHoles(bool)));
+  connect( myAdvWidget->maxMemoryCheck,             SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) );
+  connect( myAdvWidget->initialMemoryCheck,         SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) );
+  connect( myAdvWidget->boundaryRecoveryCheck,      SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) );
+  connect( myAdvWidget->logInFileCheck,             SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) );
+  connect( myAdvWidget->keepWorkingFilesCheck,      SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) );
+  connect( myAdvWidget->workingDirectoryPushButton, SIGNAL( clicked() ),       this, SLOT( onDirBtnClicked() ) );
+  
   connect( myEnforcedTableWidget,   SIGNAL( itemClicked(QTableWidgetItem *)), this, SLOT( synchronizeCoords() ) );
   connect( myEnforcedTableWidget,   SIGNAL( itemChanged(QTableWidgetItem *)), this, SLOT( updateEnforcedVertexValues(QTableWidgetItem *) ) );
   connect( myEnforcedTableWidget,   SIGNAL( itemSelectionChanged() ),         this, SLOT( synchronizeCoords() ) );
@@ -1387,32 +1359,40 @@ void GHS3DPluginGUI_HypothesisCreator::onRemoveEnforcedVertex()
 
 void GHS3DPluginGUI_HypothesisCreator::onToMeshHoles(bool isOn)
 {
-  myToMakeGroupsOfDomains->setEnabled( isOn );
-  if ( !isOn )
-    myToMakeGroupsOfDomains->setChecked( false );
+  // myToMakeGroupsOfDomains->setEnabled( isOn );
+  // if ( !isOn )
+  //   myToMakeGroupsOfDomains->setChecked( false );
 }
 
 void GHS3DPluginGUI_HypothesisCreator::onDirBtnClicked()
 {
-  QString dir = SUIT_FileDlg::getExistingDirectory( dlg(), myWorkingDir->text(), QString() );
+  QString dir = SUIT_FileDlg::getExistingDirectory( dlg(), myAdvWidget->workingDirectoryLineEdit->text(), QString() );
   if ( !dir.isEmpty() )
-    myWorkingDir->setText( dir );
+    myAdvWidget->workingDirectoryLineEdit->setText( dir );
 }
 
 void GHS3DPluginGUI_HypothesisCreator::updateWidgets()
 {
-  myToMakeGroupsOfDomains->setEnabled( myToMeshHolesCheck->isChecked() );
-  myMaximumMemorySpin->setEnabled( myMaximumMemoryCheck->isChecked() );
-  myInitialMemoryCheck->setEnabled( !myBoundaryRecoveryCheck->isChecked() );
-  myInitialMemorySpin->setEnabled( myInitialMemoryCheck->isChecked() && !myBoundaryRecoveryCheck->isChecked() );
-  myOptimizationLevelCombo->setEnabled( !myBoundaryRecoveryCheck->isChecked() );
+  //myToMakeGroupsOfDomains->setEnabled( myToMeshHolesCheck->isChecked() );
+  myAdvWidget->maxMemorySpin->setEnabled( myAdvWidget->maxMemoryCheck->isChecked() );
+  myAdvWidget->initialMemoryCheck->setEnabled( !myAdvWidget->boundaryRecoveryCheck->isChecked() );
+  myAdvWidget->initialMemorySpin->setEnabled( myAdvWidget->initialMemoryCheck->isChecked() && !myAdvWidget->boundaryRecoveryCheck->isChecked() );
+  myOptimizationLevelCombo->setEnabled( !myAdvWidget->boundaryRecoveryCheck->isChecked() );
+  if ( sender() == myAdvWidget->logInFileCheck ||
+       sender() == myAdvWidget->keepWorkingFilesCheck )
+  {
+    bool logFileRemovable = myAdvWidget->logInFileCheck->isChecked() &&
+                            !myAdvWidget->keepWorkingFilesCheck->isChecked();
+                             
+    myAdvWidget->removeLogOnSuccessCheck->setEnabled( logFileRemovable );
+  }
 }
 
 bool GHS3DPluginGUI_HypothesisCreator::checkParams(QString& msg) const
 {
   MESSAGE("GHS3DPluginGUI_HypothesisCreator::checkParams");
 
-  if ( !QFileInfo( myWorkingDir->text().trimmed() ).isWritable() ) {
+  if ( !QFileInfo( myAdvWidget->workingDirectoryLineEdit->text().trimmed() ).isWritable() ) {
     SUIT_MessageBox::warning( dlg(),
                               tr( "SMESH_WRN_WARNING" ),
                               tr( "GHS3D_PERMISSION_DENIED" ) );
@@ -1432,24 +1412,26 @@ void GHS3DPluginGUI_HypothesisCreator::retrieveParams() const
   if ( myName )
     myName->setText( data.myName );
   
-  myToMeshHolesCheck               ->setChecked    ( data.myToMeshHoles );
-  myToMakeGroupsOfDomains          ->setChecked    ( data.myToMakeGroupsOfDomains );
-  myOptimizationLevelCombo         ->setCurrentIndex( data.myOptimizationLevel );
-  myMaximumMemoryCheck             ->setChecked    ( data.myMaximumMemory > 0 );
-  myMaximumMemorySpin              ->setValue      ( qMax( data.myMaximumMemory,
-                                                           myMaximumMemorySpin->minimum() ));
-  myInitialMemoryCheck             ->setChecked    ( data.myInitialMemory > 0 );
-  myInitialMemorySpin              ->setValue      ( qMax( data.myInitialMemory,
-                                                           myInitialMemorySpin->minimum() ));
-  myWorkingDir                     ->setText       ( data.myWorkingDir );
-  myKeepFiles                      ->setChecked    ( data.myKeepFiles );
-  myVerboseLevelSpin               ->setValue      ( data.myVerboseLevel );
-  myToCreateNewNodesCheck          ->setChecked    ( data.myToCreateNewNodes );
-  myRemoveInitialCentralPointCheck ->setChecked    ( data.myRemoveInitialCentralPoint );
-  myBoundaryRecoveryCheck          ->setChecked    ( data.myBoundaryRecovery );
-  myFEMCorrectionCheck             ->setChecked    ( data.myFEMCorrection );
-  myGradation                      ->setValue      ( data.myGradation );
-  myTextOption                     ->setText       ( data.myTextOption );
+  myToMeshHolesCheck                          ->setChecked    ( data.myToMeshHoles );
+  myToMakeGroupsOfDomains                     ->setChecked    ( data.myToMakeGroupsOfDomains );
+  myOptimizationLevelCombo                    ->setCurrentIndex( data.myOptimizationLevel );
+  myAdvWidget->maxMemoryCheck                 ->setChecked    ( data.myMaximumMemory > 0 );
+  myAdvWidget->maxMemorySpin                  ->setValue      ( qMax( data.myMaximumMemory,
+                                                                      myAdvWidget->maxMemorySpin->minimum() ));
+  myAdvWidget->initialMemoryCheck             ->setChecked    ( data.myInitialMemory > 0 );
+  myAdvWidget->initialMemorySpin              ->setValue      ( qMax( data.myInitialMemory,
+                                                                      myAdvWidget->initialMemorySpin->minimum() ));
+  myAdvWidget->workingDirectoryLineEdit       ->setText       ( data.myWorkingDir );
+  myAdvWidget->keepWorkingFilesCheck           ->setChecked    ( data.myKeepFiles );
+  myAdvWidget->verboseLevelSpin               ->setValue      ( data.myVerboseLevel );
+  myAdvWidget->createNewNodesCheck            ->setChecked    ( data.myToCreateNewNodes );
+  myAdvWidget->removeInitialCentralPointCheck ->setChecked    ( data.myRemoveInitialCentralPoint );
+  myAdvWidget->boundaryRecoveryCheck          ->setChecked    ( data.myBoundaryRecovery );
+  myAdvWidget->FEMCorrectionCheck             ->setChecked    ( data.myFEMCorrection );
+  myAdvWidget->gradationSpinBox               ->setValue      ( data.myGradation );
+  myAdvWidget->textOptionLineEdit             ->setText       ( data.myTextOption );
+  myAdvWidget->logInFileCheck                 ->setChecked    ( !data.myLogInStandardOutput );
+  myAdvWidget->removeLogOnSuccessCheck        ->setChecked    ( data.myRemoveLogOnSuccess );
 
   TEnfVertexList::const_iterator it;
   int rowCount = 0;
@@ -1678,7 +1660,7 @@ bool GHS3DPluginGUI_HypothesisCreator::readParamsFromHypo( GHS3DHypothesisData&
   h_data.myName = isCreation() && data ? hypName() : "";
 
   h_data.myToMeshHoles                = h->GetToMeshHoles();
-  h_data.myToMakeGroupsOfDomains      = h->GetToMeshHoles() && h->GetToMakeGroupsOfDomains();
+  h_data.myToMakeGroupsOfDomains      = /*h->GetToMeshHoles() &&*/ h->GetToMakeGroupsOfDomains();
   h_data.myMaximumMemory              = h->GetMaximumMemory();
   h_data.myInitialMemory              = h->GetInitialMemory();
   h_data.myInitialMemory              = h->GetInitialMemory();
@@ -1692,6 +1674,8 @@ bool GHS3DPluginGUI_HypothesisCreator::readParamsFromHypo( GHS3DHypothesisData&
   h_data.myFEMCorrection              = h->GetFEMCorrection();
   h_data.myGradation                  = h->GetGradation();
   h_data.myTextOption                 = h->GetTextOption();
+  h_data.myLogInStandardOutput        = h->GetStandardOutputLog();
+  h_data.myRemoveLogOnSuccess         = h->GetRemoveLogOnSuccess();
   
   GHS3DPlugin::GHS3DEnforcedVertexList_var vertices = h->GetEnforcedVertices();
   MESSAGE("vertices->length(): " << vertices->length());
@@ -1762,24 +1746,28 @@ bool GHS3DPluginGUI_HypothesisCreator::storeParamsToHypo( const GHS3DHypothesisD
       h->SetInitialMemory    ( h_data.myInitialMemory     );
     if ( h->GetOptimizationLevel() != h_data.myOptimizationLevel )
       h->SetOptimizationLevel( h_data.myOptimizationLevel );
-    if ( h->GetKeepFiles() != h_data.myKeepFiles )
+    if ( h->GetKeepFiles() != h_data.myKeepFiles         )
       h->SetKeepFiles        ( h_data.myKeepFiles         );
     if ( h->GetWorkingDirectory() != h_data.myWorkingDir )
       h->SetWorkingDirectory ( h_data.myWorkingDir.toLatin1().constData() );
-    if ( h->GetVerboseLevel() != h_data.myVerboseLevel )
-      h->SetVerboseLevel     ( h_data.myVerboseLevel );
+    if ( h->GetVerboseLevel() != h_data.myVerboseLevel   )
+      h->SetVerboseLevel     ( h_data.myVerboseLevel      );
     if ( h->GetToCreateNewNodes() != h_data.myToCreateNewNodes )
-      h->SetToCreateNewNodes( h_data.myToCreateNewNodes );
+      h->SetToCreateNewNodes( h_data.myToCreateNewNodes   );
     if ( h->GetToRemoveCentralPoint() != h_data.myRemoveInitialCentralPoint )
       h->SetToRemoveCentralPoint( h_data.myRemoveInitialCentralPoint );
     if ( h->GetToUseBoundaryRecoveryVersion() != h_data.myBoundaryRecovery )
       h->SetToUseBoundaryRecoveryVersion( h_data.myBoundaryRecovery );
     if ( h->GetFEMCorrection() != h_data.myFEMCorrection )
-      h->SetFEMCorrection( h_data.myFEMCorrection );
-    if ( h->GetGradation() != h_data.myGradation )
-      h->SetGradation     ( h_data.myGradation );
-    if ( h->GetTextOption() != h_data.myTextOption )
+      h->SetFEMCorrection    ( h_data.myFEMCorrection     );
+    if ( h->GetGradation() != h_data.myGradation         )
+      h->SetGradation        ( h_data.myGradation         );
+    if ( h->GetTextOption() != h_data.myTextOption       )
       h->SetTextOption       ( h_data.myTextOption.toLatin1().constData() );
+    if ( h->GetStandardOutputLog() != h_data.myLogInStandardOutput   )
+      h->SetStandardOutputLog( h_data.myLogInStandardOutput  );
+     if ( h->GetRemoveLogOnSuccess() != h_data.myRemoveLogOnSuccess   )
+      h->SetRemoveLogOnSuccess( h_data.myRemoveLogOnSuccess  );
     
     // Enforced vertices
     int nbVertex = (int) h_data.myEnforcedVertices.size();
@@ -1868,18 +1856,20 @@ bool GHS3DPluginGUI_HypothesisCreator::readParamsFromWidgets( GHS3DHypothesisDat
   h_data.myName                       = myName ? myName->text() : "";
   h_data.myToMeshHoles                = myToMeshHolesCheck->isChecked();
   h_data.myToMakeGroupsOfDomains      = myToMakeGroupsOfDomains->isChecked();
-  h_data.myMaximumMemory              = myMaximumMemoryCheck->isChecked() ? myMaximumMemorySpin->value() : -1;
-  h_data.myInitialMemory              = myInitialMemoryCheck->isChecked() ? myInitialMemorySpin->value() : -1;
+  h_data.myMaximumMemory              = myAdvWidget->maxMemoryCheck->isChecked() ? myAdvWidget->maxMemorySpin->value() : -1;
+  h_data.myInitialMemory              = myAdvWidget->initialMemoryCheck->isChecked() ? myAdvWidget->initialMemorySpin->value() : -1;
   h_data.myOptimizationLevel          = myOptimizationLevelCombo->currentIndex();
-  h_data.myKeepFiles                  = myKeepFiles->isChecked();
-  h_data.myWorkingDir                 = myWorkingDir->text().trimmed();
-  h_data.myVerboseLevel               = myVerboseLevelSpin->value();
-  h_data.myToCreateNewNodes           = myToCreateNewNodesCheck->isChecked();
-  h_data.myRemoveInitialCentralPoint  = myRemoveInitialCentralPointCheck->isChecked();
-  h_data.myBoundaryRecovery           = myBoundaryRecoveryCheck->isChecked();
-  h_data.myFEMCorrection              = myFEMCorrectionCheck->isChecked();
-  h_data.myGradation                  = myGradation->value();
-  h_data.myTextOption                 = myTextOption->text();
+  h_data.myKeepFiles                  = myAdvWidget->keepWorkingFilesCheck->isChecked();
+  h_data.myWorkingDir                 = myAdvWidget->workingDirectoryLineEdit->text().trimmed();
+  h_data.myVerboseLevel               = myAdvWidget->verboseLevelSpin->value();
+  h_data.myToCreateNewNodes           = myAdvWidget->createNewNodesCheck->isChecked();
+  h_data.myRemoveInitialCentralPoint  = myAdvWidget->removeInitialCentralPointCheck->isChecked();
+  h_data.myBoundaryRecovery           = myAdvWidget->boundaryRecoveryCheck->isChecked();
+  h_data.myFEMCorrection              = myAdvWidget->FEMCorrectionCheck->isChecked();
+  h_data.myGradation                  = myAdvWidget->gradationSpinBox->value();
+  h_data.myTextOption                 = myAdvWidget->textOptionLineEdit->text();
+  h_data.myLogInStandardOutput        = !myAdvWidget->logInFileCheck->isChecked();
+  h_data.myRemoveLogOnSuccess         = myAdvWidget->removeLogOnSuccessCheck->isChecked();
   
   // Enforced vertices
   h_data.myEnforcedVertices.clear();