File indexing completed on 2024-05-12 04:52:38
0001 // SPDX-FileCopyrightText: Till Theato <root@ttill.de> 0002 // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0003 0004 var update = new Object(); 0005 0006 update["sensitivity"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 5.); })); 0007 update["thresholdBrightness"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 765.); })); 0008 update["thresholdDifference"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 255.); })); 0009 update["thresholdDiffSum"] = update["thresholdBrightness"]; 0010 update["saturation"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 4.); })); 0011 update["lowerOverexposure"] = new Array(new Array(0.2, function(v, d) { return this.upd1(v, d, 10.); })); 0012 0013 function upd1(value, isDowngrade, factor) { 0014 var valueList = value.split(';'); 0015 var locale = new QLocale(); 0016 for (var i = 0; i < valueList.length; ++i) { 0017 var current = valueList[i].split('='); 0018 valueList[i] = current[0] + '=' + locale.toString(isDowngrade ? current[1] * factor : current[1] / factor); 0019 } 0020 return valueList.join(';'); 0021 }