Skip to content
Snippets Groups Projects
Commit e7284bbe authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH : backout changes in revision 6167f6fdbc74 and add the pointer needed in...

ENH : backout changes in revision 6167f6fdbc74 and add the pointer needed in the QtParameterBase constructor
parent ef8d76cb
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
......@@ -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;
};
......
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