]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/ParametersQtDialog.cxx
...
[cpPlugins.git] / lib / cpPlugins / ParametersQtDialog.cxx
index 7febd59e69a582f0de187a9fa2fac10bdd1fcd45..9650765676feeaf2e2b8dd9f234d9921dfe565c3 100644 (file)
@@ -92,6 +92,16 @@ updateParameters( )
   if( this->m_Manual )
     return;
 
+  // Check if an explicit re-execution button is needed
+  if( this->m_ProcessObject->GetCouldHaveExplicitReExecution( ) )
+  {
+    QCheckBox* v_bool =
+      this->findChild< QCheckBox* >( "___ExplicitReExecution___" );
+    if( v_bool != NULL )
+      this->m_ProcessObject->SetExplicitReExecution( v_bool->isChecked( ) );
+
+  } // fi
+
   // Put values
   auto parameters = this->m_ProcessObject->GetParameters( );
   auto& raw_params = parameters->GetRawParameters( );
@@ -186,6 +196,16 @@ updateView( )
   if( this->m_Manual )
     return;
 
+  // Check if an explicit re-execution button is needed
+  if( this->m_ProcessObject->GetCouldHaveExplicitReExecution( ) )
+  {
+    QCheckBox* v_bool =
+      this->findChild< QCheckBox* >( "___ExplicitReExecution___" );
+    if( v_bool != NULL )
+      v_bool->setChecked( this->m_ProcessObject->GetExplicitReExecution( ) );
+
+  } // fi
+
   // Put values
   auto parameters = this->m_ProcessObject->GetParameters( );
   auto& raw_params = parameters->GetRawParameters( );
@@ -323,6 +343,20 @@ _updateWidgets( )
     << "\"";
   this->m_Title->setText( title.str( ).c_str( ) );
 
+  // Check if an explicit re-execution button is needed
+  if( this->m_ProcessObject->GetCouldHaveExplicitReExecution( ) )
+  {
+    QCheckBox* v_bool = new QCheckBox( this );
+    v_bool->setObjectName( "___ExplicitReExecution___" );
+    v_bool->setText( "Explicit re-execution" );
+    v_bool->setChecked( this->m_ProcessObject->GetExplicitReExecution( ) );
+
+    QHBoxLayout* new_layout = new QHBoxLayout( );
+    new_layout->addWidget( v_bool );
+    this->m_ToolsLayout->addLayout( new_layout );
+
+  } // fi
+
   // Put values
   auto parameters = this->m_ProcessObject->GetParameters( );
   auto& raw_params = parameters->GetRawParameters( );