QString Parameters::value(const QString &pName) { MetricMap::iterator it = _values.find(pName); if (it == _values.end()) return QString::null; else return it.data(); }
QString Parameters::parent(const QString &pValue) { for (MetricMap::iterator it = _values.begin(); it != _values.end(); it++) if (it.data() == pValue) return it.key(); return QString::null; }
void Parameters::set(const QString &pName, int pValue) { MetricMap::iterator it = _values.find(pName); if ( (it != _values.end()) && (it.data().toInt() == pValue) ) return; _set(pName, pValue); }
void Parameters::set(const QString &pName, bool pValue) { MetricMap::iterator it = _values.find(pName); if ( (it != _values.end()) && (it.data() == ((pValue) ? "t" : "f")) ) return; _set(pName, ((pValue) ? QString("t") : QString("f"))); }
bool Parameters::boolean(const QString &pName) { MetricMap::iterator it = _values.find(pName); if (it == _values.end()) return FALSE; else if (it.data() == "t") return TRUE; return FALSE; }
void Parameters::set(const QString &pName, const QString &pValue) { MetricMap::iterator it = _values.find(pName); if (it != _values.end()) { if (it.data() == pValue) return; else _values.replace(pName, pValue); } else _values[pName] = pValue; _set(pName, pValue); }