diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx index 6834692d89761b08b6ee0b8f0aea17f9d12eb61a..dd4b7d66a033a4816bf94976817b6929488a77fd 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx @@ -23,8 +23,7 @@ namespace Wrapper { QtWidgetEmptyParameter::QtWidgetEmptyParameter(EmptyParameter* emptyParam, QtWidgetModel* m) - : QtWidgetParameterBase(m), - m_EmptyParam(emptyParam) + : QtWidgetParameterBase(emptyParam, m) { } @@ -40,34 +39,18 @@ void QtWidgetEmptyParameter::DoUpdateGUI() void QtWidgetEmptyParameter::DoCreateWidget() { // Set up input text edit - m_QHBoxLayout = new QHBoxLayout; - m_QHBoxLayout->setSpacing(0); - m_QHBoxLayout->setContentsMargins(0, 0, 0, 0); + QHBoxLayout *hLayout = new QHBoxLayout; + hLayout->setSpacing(0); + hLayout->setContentsMargins(0,0,0,0); - m_QCheckBox = new QCheckBox; - m_QCheckBox->setToolTip(m_EmptyParam->GetDescription()); - connect(m_QCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetValue(int))); + //QCheckBox* checkbox = new QCheckBox; + //checkbox->setToolTip(emptyParam->GetDescription()); - QString optionID(m_EmptyParam->GetName()); - m_QHBoxLayout->addWidget(m_QCheckBox); - m_QHBoxLayout->addStretch(); + //QString optionID(emptyParam->GetName()); + //hLayout->addWidget(checkbox); + hLayout->addStretch(); - this->setLayout(m_QHBoxLayout); -} - -void QtWidgetEmptyParameter::SetValue( int value ) -{ - switch(value) - { - case Qt::Unchecked: - m_EmptyParam->SetValue(false); - break; - case Qt::PartiallyChecked: - break; - case Qt::Checked: - m_EmptyParam->SetValue(true); - break; - } + this->setLayout(hLayout); } } diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h index 18eee1c0c411933ebe63bf90cc83b1761490df9a..3c7f5b336662f0134d7106f28ad57230c2370ad6 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h @@ -38,9 +38,6 @@ public: QtWidgetEmptyParameter(EmptyParameter*, QtWidgetModel*); virtual ~QtWidgetEmptyParameter(); -protected slots: - void SetValue( int value ); - private: QtWidgetEmptyParameter(const QtWidgetEmptyParameter&); //purposely not implemented void operator=(const QtWidgetEmptyParameter&); //purposely not implemented @@ -48,10 +45,6 @@ private: virtual void DoCreateWidget(); virtual void DoUpdateGUI(); - - QHBoxLayout * m_QHBoxLayout; - QCheckBox * m_QCheckBox; - EmptyParameter::Pointer m_EmptyParam; };