bool MOParameters::setValue(QString name,QVariant value) { MOParameter* param = this->findItem(name); if(param) return param->setFieldValue(MOParameter::VALUE,value); else return false; }
void MOParameters::setGroup(QString group,QStringList indexes) { for(int i=0;i<indexes.size();i++) { MOParameter *param = this->findItem(indexes.at(i)); if(param) param->setFieldValue(MOParameter::GROUP,group); } }
void WidgetParameters::onValueChanged() { QWidget* widgetChanged = dynamic_cast<QWidget*>(sender()); // update value MOParameter* param = _mapValueWidgets.key(widgetChanged,NULL); if(param) param->setFieldValue(MOParameter::VALUE,getValue(widgetChanged)); // update enabled widgets if(widgetChanged) updateEnabled(); }