2 function update(serviceVersion, effectVersion, effectString) {
3 var locale = new QLocale();
4 var doc = new QDomDocument();
5 doc.setContent(effectString);
6 for (var node = doc.documentElement().firstChild(); !node.isNull(); node = node.nextSibling()) {
7 var effectparam = node.toElement();
8 if (effectparam.attribute("name") == "Channel" || effectparam.attribute("name") == "Histogram position") {
9 if (serviceVersion < effectVersion) {
11 if (effectVersion > 0.1) {
12 effectparam.firstChild().toText().setData(locale.toString(effectparam.text() * 10));
16 if (effectVersion < 0.2) {
17 effectparam.firstChild().toText().setData(locale.toString(effectparam.text() / 10.));
22 return doc.toString();