#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(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; } }