From 1afa5aa8496f8f803920843db4ca49d33a403571 Mon Sep 17 00:00:00 2001
From: Otmane Lahlou <otmane.lahlou@c-s.fr>
Date: Mon, 19 Sep 2011 16:44:56 +0200
Subject: [PATCH] ENH : connect the parameters with the slot UpdateGUI

---
 .../Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.cxx | 7 +------
 Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h  | 1 -
 Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.cxx  | 7 +------
 Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h    | 1 -
 4 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.cxx
index a01953cfec..714d39d855 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.cxx
@@ -67,7 +67,7 @@ void QtWidgetFloatParameter::DoCreateWidget()
 
   connect( m_QDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(SetValue(double)) );
   connect( m_QDoubleSpinBox, SIGNAL(valueChanged(double)), GetModel(), SLOT(NotifyUpdate()) );
-  connect( GetModel(), SIGNAL(UpdateGui()), this, SLOT(SetUpdateGui() ) );
+  connect( GetModel(), SIGNAL(UpdateGui()), this, SLOT(UpdateGUI() ) );
 
   m_QHBoxLayout->addWidget(m_QDoubleSpinBox);
   m_QHBoxLayout->addStretch();
@@ -76,11 +76,6 @@ void QtWidgetFloatParameter::DoCreateWidget()
 
 }
 
-void QtWidgetFloatParameter::SetUpdateGui()
-{
-  this->DoUpdateGUI();
-}
-
 void QtWidgetFloatParameter::SetValue(double value)
 {
   m_FloatParam->SetValue( static_cast<float>(value) );
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h
index 71d944a801..6864f01733 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h
@@ -39,7 +39,6 @@ public:
 
 protected slots:
   void SetValue( double value );
-  void SetUpdateGui();
 
 private:
   QtWidgetFloatParameter(const QtWidgetFloatParameter&); //purposely not implemented
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.cxx
index e4e51e4144..c081e53356 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.cxx
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.cxx
@@ -45,7 +45,7 @@ void QtWidgetIntParameter::DoCreateWidget()
 
   connect( m_QSpinBox, SIGNAL(valueChanged(int)), this, SLOT(SetValue(int)) );
   connect( m_QSpinBox, SIGNAL(valueChanged(int)), GetModel(), SLOT(NotifyUpdate()) );
-  connect( GetModel(), SIGNAL(UpdateGui()), this, SLOT(SetUpdateGui() ) );
+  connect( GetModel(), SIGNAL(UpdateGui()), this, SLOT(UpdateGUI() ) );
 
   m_QHBoxLayout->addWidget(m_QSpinBox);
   m_QHBoxLayout->addStretch();
@@ -53,11 +53,6 @@ void QtWidgetIntParameter::DoCreateWidget()
   this->setLayout(m_QHBoxLayout);
 }
 
-void QtWidgetIntParameter::SetUpdateGui()
-{
-  this->DoUpdateGUI();
-}
-
 void QtWidgetIntParameter::DoUpdateGUI()
 {
   bool signalsBlocked = m_QSpinBox->blockSignals( true );
diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h
index 9d38604896..b4090c4a4e 100644
--- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h
+++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h
@@ -40,7 +40,6 @@ public:
 
 protected slots:
   void SetValue( int value );
-  void SetUpdateGui();
 
 private:
   QtWidgetIntParameter(const QtWidgetIntParameter&); //purposely not implemented
-- 
GitLab