You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
694 B
C++

#include "FITKWidgetBool.h"
#include "FITKAbstractEasyParam.h"
#include "FITKParamBool.h"
namespace Core
{
FITKWidgetBool::FITKWidgetBool(FITKAbstractEasyParam * data, QWidget * parent) :
QCheckBox(parent)
{
_value = dynamic_cast<FITKParamBool*>(data);
init();
connect(this, SIGNAL(stateChanged(int)), this, SLOT(slotDataChange()));
}
FITKWidgetBool::~FITKWidgetBool()
{
}
void FITKWidgetBool::init()
{
if (_value == nullptr)return;
setChecked(_value->getValue());
}
void FITKWidgetBool::slotDataChange()
{
if (_value == nullptr)return;
_value->setValue(isChecked());
}
}