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.
60 lines
1.3 KiB
C++
60 lines
1.3 KiB
C++
#include "FITKParamCombox.h"
|
|
|
|
namespace Core
|
|
{
|
|
FITKParamCombox::FITKParamCombox()
|
|
{
|
|
|
|
}
|
|
|
|
FITKParamCombox::~FITKParamCombox()
|
|
{
|
|
|
|
}
|
|
|
|
FITKAbstractEasyParam::FITKEasyParamType FITKParamCombox::getParamType()
|
|
{
|
|
return FITKAbstractEasyParam::FITKEasyParamType::FEPCombox;
|
|
}
|
|
|
|
void FITKParamCombox::copyParaData(FITKAbstractEasyParam* data)
|
|
{
|
|
//判断同一类型数据对象
|
|
if (!data || data->getParamType() != this->getParamType())return;
|
|
FITKParamCombox* oldData = dynamic_cast<FITKParamCombox*>(data);
|
|
if (!oldData)return;
|
|
//设置名称
|
|
this->setDataObjectName(data->getDataObjectName());
|
|
//拷贝参数
|
|
this->_value = oldData->_value;
|
|
this->_index = oldData->_index;
|
|
}
|
|
|
|
void FITKParamCombox::setValue(QStringList value)
|
|
{
|
|
_value = value;
|
|
}
|
|
QStringList FITKParamCombox::getValue()
|
|
{
|
|
return _value;
|
|
}
|
|
|
|
QString FITKParamCombox::getCurrentValue()
|
|
{
|
|
if (_value.size() <= _index || _index < 0)return QString();
|
|
return _value.at(_index);
|
|
}
|
|
|
|
void FITKParamCombox::setIndex(int index)
|
|
{
|
|
if (_value.size() <= index || index < 0)return;
|
|
_index = index;
|
|
emit sigDataChange();
|
|
}
|
|
int FITKParamCombox::getIndex()
|
|
{
|
|
return _index;
|
|
}
|
|
}
|
|
|