diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameterFactory.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameterFactory.cxx index 96cfff77b132477be309c1da3b029ce3c14d366a..d035fc16aab207082d2414af83e64fa7b8ad84f4 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameterFactory.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetEmptyParameterFactory.cxx @@ -16,6 +16,7 @@ =========================================================================*/ #include "otbWrapperQtWidgetEmptyParameterFactory.h" +#include "otbWrapperEmptyParameter.h" namespace otb { @@ -34,7 +35,30 @@ QtWidgetEmptyParameterFactory::~QtWidgetEmptyParameterFactory() QWidget* QtWidgetEmptyParameterFactory::CreateQtWidget( Parameter* param ) { + // Try to cast to int parameter + EmptyParameter * emptyParam = dynamic_cast<EmptyParameter *>(param); + // Check if dynamic cast succeeds + if(!emptyParam) + { + return 0; + } + + // Set up input text edit + QHBoxLayout *hLayout = new QHBoxLayout; + hLayout->setSpacing(0); + hLayout->setContentsMargins(0,0,0,0); + + QCheckBox* checkbox = new QCheckBox; + checkbox->setToolTip(emptyParam->GetDescription()); + + QString optionID(emptyParam->GetName()); + hLayout->addWidget(checkbox); + hLayout->addStretch(); + + QGroupBox *paramHGroup = new QGroupBox; + paramHGroup->setLayout(hLayout); + return paramHGroup; }