If the internal valueMap can map the value to text, text and value will be returned. Otherwise just the value as QString will be returned.
| 233 | // If the internal valueMap can map the value to text, text and value will be returned. |
| 234 | // Otherwise just the value as QString will be returned. |
| 235 | QString StatisticsType::getValueTxt(int val) const |
| 236 | { |
| 237 | if (valMap.count(val) > 0) |
| 238 | { |
| 239 | // A text for this value van be shown. |
| 240 | return QString("%1 (%2)").arg(valMap.at(val)).arg(val); |
| 241 | } |
| 242 | return QString("%1").arg(val); |
| 243 | } |
| 244 | |
| 245 | void StatisticsType::setMappingValues(std::vector<QString> values) |
| 246 | { |
no test coverage detected