- QString paramValue(const QString &name, QString defaultValue = QString()) const {
- for (int i = 0; i < size(); i++) {
+ void setParamValue(const QString &name, const QString &value) {
+ bool found = false;
+ for (int i = 0; i < size(); ++i)
+ if (at(i).name() == name) {
+ // update value
+ replace(i, EffectParameter(name, value));
+ found = true;
+ }
+ if (!found) addParam(name, value);
+ }
+
+ QString paramValue(const QString &name, const QString &defaultValue = QString()) const {
+ for (int i = 0; i < size(); ++i) {