From 4e01052ccdad7c2ff31214d281caaed80b6bac10 Mon Sep 17 00:00:00 2001 From: Otmane Lahlou <otmane.lahlou@c-s.fr> Date: Thu, 22 Sep 2011 17:14:17 +0200 Subject: [PATCH] ENH: empty parameter support (WIP) --- .../otbWrapperQtWidgetEmptyParameter.cxx | 21 ++++++++++--------- .../otbWrapperQtWidgetEmptyParameter.h | 4 ++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx index 8437971e81..22b2f0363f 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.cxx @@ -23,7 +23,8 @@ namespace Wrapper { QtWidgetEmptyParameter::QtWidgetEmptyParameter(EmptyParameter* emptyParam, QtWidgetModel* m) -: QtWidgetParameterBase(m) + : QtWidgetParameterBase(m), + m_EmptyParam(emptyParam) { } @@ -39,18 +40,18 @@ void QtWidgetEmptyParameter::DoUpdateGUI() void QtWidgetEmptyParameter::DoCreateWidget() { // Set up input text edit - QHBoxLayout *hLayout = new QHBoxLayout; - hLayout->setSpacing(0); - hLayout->setContentsMargins(0, 0, 0, 0); + m_QHBoxLayout = new QHBoxLayout; + m_QHBoxLayout->setSpacing(0); + m_QHBoxLayout->setContentsMargins(0, 0, 0, 0); - //QCheckBox* checkbox = new QCheckBox; - //checkbox->setToolTip(emptyParam->GetDescription()); + m_QCheckBox = new QCheckBox; + m_QCheckBox->setToolTip(m_EmptyParam->GetDescription()); - //QString optionID(emptyParam->GetName()); - //hLayout->addWidget(checkbox); - hLayout->addStretch(); + QString optionID(m_EmptyParam->GetName()); + m_QHBoxLayout->addWidget(m_QCheckBox); + m_QHBoxLayout->addStretch(); - this->setLayout(hLayout); + this->setLayout(m_QHBoxLayout); } } diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h index 3c7f5b3366..d733bc868f 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameter.h @@ -45,6 +45,10 @@ private: virtual void DoCreateWidget(); virtual void DoUpdateGUI(); + + QHBoxLayout * m_QHBoxLayout; + QCheckBox * m_QCheckBox; + EmptyParameter::Pointer m_EmptyParam; }; -- GitLab