Skip to content
Snippets Groups Projects
Commit 44dc4fca authored by Julien Malik's avatar Julien Malik
Browse files

ENH: add EmptyParameterFactory

parent eb9642c3
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment