diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.cxx index 043d5233e886ab63c0475a3f27361a12a99f447f..f6488a28272a1f142351f4296ed41832c581c5e3 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.cxx @@ -49,9 +49,18 @@ void QtWidgetChoiceParameter::CreateWidget() combobox->addItem( key, QVariant(key) ); } + connect( combobox, SIGNAL(currentIndexChanged(int)), this, SLOT(SetValue(int)) ); + hLayout->addWidget(combobox); this->setLayout(hLayout); } +void QtWidgetChoiceParameter::SetValue(int value) +{ + std::cout << "QtWidgetChoiceParameter::SetValue " << value << std::endl; + m_ChoiceParam->SetValue( value ); +} + + } } diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.h index bf01f945907117fbe11235594d2456fe94b0e647..1b211abf17627b8135dced4e024695cfea87c948 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.h +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetChoiceParameter.h @@ -36,6 +36,9 @@ public: QtWidgetChoiceParameter(ChoiceParameter*); virtual ~QtWidgetChoiceParameter(); +protected slots: + void SetValue( int value ); + private: QtWidgetChoiceParameter(const QtWidgetChoiceParameter&); //purposely not implemented void operator=(const QtWidgetChoiceParameter&); //purposely not implemented diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx index e67476649c092af20462c58812b07366337e7f74..762195acd0f9b988842dbca2a1e7fbaf068e1a13 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx @@ -29,11 +29,11 @@ QtWidgetEmptyParameter::QtWidgetEmptyParameter(EmptyParameter* emptyParam) hLayout->setSpacing(0); hLayout->setContentsMargins(0,0,0,0); - QCheckBox* checkbox = new QCheckBox; - checkbox->setToolTip(emptyParam->GetDescription()); + //QCheckBox* checkbox = new QCheckBox; + //checkbox->setToolTip(emptyParam->GetDescription()); //QString optionID(emptyParam->GetName()); - hLayout->addWidget(checkbox); + //hLayout->addWidget(checkbox); hLayout->addStretch(); this->setLayout(hLayout); diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.cxx index 69ee40019831fe1880f080dd1cd5a94cabd70c9a..a8307e5de6efe8d4961e517fded41efe9b1a868d 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.cxx @@ -23,6 +23,7 @@ namespace Wrapper { QtWidgetFloatParameter::QtWidgetFloatParameter(FloatParameter* floatParam) + : m_FloatParam(floatParam) { // Set up input text edit QHBoxLayout *hLayout = new QHBoxLayout; @@ -34,6 +35,7 @@ QtWidgetFloatParameter::QtWidgetFloatParameter(FloatParameter* floatParam) input->setRange(floatParam->GetMinimumValue(), floatParam->GetMaximumValue()); input->setToolTip(floatParam->GetDescription()); + connect( input, SIGNAL(valueChanged(double)), this, SLOT(SetValue(double)) ); //QString optionID(floatParam->GetName()); hLayout->addWidget(input); @@ -46,5 +48,11 @@ QtWidgetFloatParameter::~QtWidgetFloatParameter() { } +void QtWidgetFloatParameter::SetValue(double value) +{ + std::cout << "QtWidgetFloatParameter::SetValue " << value << std::endl; + m_FloatParam->SetValue( static_cast<float>(value) ); +} + } } diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h index 15f3100640dadcdfc5dddbcd87dd7ebac57c4ae9..ee1af1952e1d20dedcbf3948eec7a0a4d97a8176 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetFloatParameter.h @@ -37,6 +37,9 @@ public: QtWidgetFloatParameter(FloatParameter*); virtual ~QtWidgetFloatParameter(); +protected slots: + void SetValue( double value ); + private: QtWidgetFloatParameter(const QtWidgetFloatParameter&); //purposely not implemented void operator=(const QtWidgetFloatParameter&); //purposely not implemented diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.cxx index 53b97ce0ad2ea1e3479941e287ce6a7f35782970..f9c344df50ca12d9f4ede12cd1bf456be298c857 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.cxx @@ -34,6 +34,8 @@ QtWidgetIntParameter::QtWidgetIntParameter(IntParameter* param) input->setRange(param->GetMinimumValue(), param->GetMaximumValue()); input->setToolTip(param->GetDescription()); + connect( input, SIGNAL(valueChanged(int)), this, SLOT(SetValue(int)) ); + hLayout->addWidget(input); hLayout->addStretch(); @@ -44,5 +46,11 @@ QtWidgetIntParameter::~QtWidgetIntParameter() { } +void QtWidgetIntParameter::SetValue(int value) +{ + std::cout << "QtWidgetIntParameter::SetValue " << value << std::endl; + m_IntParam->SetValue(value); +} + } } diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h index e7c7bc132f54c33c9696c6335cbb65e283b9bd83..15043e8ce2cb706e66e165e9527c99c90d46dbd4 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetIntParameter.h @@ -37,6 +37,9 @@ public: QtWidgetIntParameter(IntParameter*); virtual ~QtWidgetIntParameter(); +protected slots: + void SetValue( int value ); + private: QtWidgetIntParameter(const QtWidgetIntParameter&); //purposely not implemented void operator=(const QtWidgetIntParameter&); //purposely not implemented