| 134 | } |
| 135 | |
| 136 | std::string Quantity::getString() { |
| 137 | std::string s; |
| 138 | std::string label = getLabel(); |
| 139 | std::string valueString = getDisplayValueString() + getUnit(); |
| 140 | s += label; |
| 141 | if (label != "" && valueString != "") |
| 142 | s += ": "; |
| 143 | s += valueString; |
| 144 | return s; |
| 145 | } |
| 146 | |
| 147 | void Quantity::reset() { |
| 148 | setValue(getDefaultValue()); |