- EffectsParameterList(): QList < EffectParameter >() {}
- bool hasParam(const QString &name) const {
- for (int i = 0; i < size(); ++i)
- if (at(i).name() == name) return true;
- return false;
- }
- 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) {
- if (at(i).name() == name) return at(i).value();
- }
- return defaultValue;
- }
- void addParam(const QString &name, const QString &value) {
- if (name.isEmpty()) return;
- append(EffectParameter(name, value));
- }
- void removeParam(const QString &name) {
- for (int i = 0; i < size(); ++i)
- if (at(i).name() == name) {
- removeAt(i);
- break;
- }
- }
+ EffectsParameterList();
+ bool hasParam(const QString &name) const;
+ void setParamValue(const QString &name, const QString &value);
+
+ QString paramValue(const QString &name, const QString &defaultValue = QString()) const;
+ void addParam(const QString &name, const QString &value);
+ void removeParam(const QString &name);