예제 #1
0
void Parameters::set(const QString &pName, const QString &pValue)
{
  MetricMap::iterator it = _values.find(pName);
  if (it != _values.end())
  {
    if (it.value() == pValue)
      return;
    else
      it.value() = pValue;
  }
  else
    _values[pName] = pValue;

  _set(pName, pValue);
}
예제 #2
0
QString Parameters::value(const QString &pName)
{
  MetricMap::iterator it = _values.find(pName);
  if (it == _values.end())
    return QString::null;
  else
    return it.value();
}
예제 #3
0
QString Parameters::parent(const QString &pValue)
{
  for (MetricMap::iterator it = _values.begin(); it != _values.end(); it++)
    if (it.value() == pValue)
      return it.key();

  return QString::null;
}
예제 #4
0
void Parametersenc::set(const QString &pName, int pValue)
{
  MetricMap::iterator it = _values.find(pName);
  if ( (it != _values.end()) && (it.value().toInt() == pValue) )
    return;

  _set(pName, pValue);
}
예제 #5
0
void Parametersenc::set(const QString &pName, bool pValue)
{
  MetricMap::iterator it = _values.find(pName);
  if ( (it != _values.end()) && (it.value() == ((pValue) ? "t" : "f")) )
    return;

  _set(pName, ((pValue) ? QString("t") : QString("f")));
}
예제 #6
0
bool Parameters::boolean(const QString &pName)
{
  MetricMap::iterator it = _values.find(pName);
  if (it == _values.end())
    return FALSE;
  else if (it.value() == "t")
    return TRUE;

  return FALSE;
}