#include "baseItemPropertyProxy.h" #include "graphicsItem/functionModelItem/graphicsFunctionModelItem.h" #include "graphicsDataModel/fixedPortsModel.h" #include "baseProperty.h" BaseItemPropertyProxy::BaseItemPropertyProxy(GraphicsFunctionModelItem* pItem) : BasePropertyProxy(pItem) ,_pItem(pItem) ,_pControl(nullptr) { _pControl= _pItem->getHandle(); } BaseItemPropertyProxy::~BaseItemPropertyProxy() { } QString BaseItemPropertyProxy::getName() const { return _pItem->getName(); } void BaseItemPropertyProxy::setName(QString str) { } QMap BaseItemPropertyProxy::getMap() { QUuid uid = _pItem->getProperty()->uuid(); QMap map; if(_pControl){ auto pPara = _pControl->getMonitorPara(); auto lstInfo = pPara.value(uid); if(!lstInfo.isEmpty()){ for(auto &info:lstInfo){ if(info.bSelected) map[info.sName] = info.mapValue.size()?info.mapValue.last():0; //取最新的值 } } } return map; } void BaseItemPropertyProxy::setMap(QMap) { //todo:接口修改参量 }