Base: make UnitsApi::toNumber method of Quantity

This static method takes Quantity as a parameter, so make it
method of Quantity directly.
This commit is contained in:
Ladislav Michl
2025-04-06 22:38:01 +02:00
parent 81e1321b32
commit 51aaaaff45
6 changed files with 41 additions and 58 deletions

View File

@@ -160,6 +160,9 @@ public:
std::string
toString(const QuantityFormat& format = QuantityFormat(QuantityFormat::Default)) const;
std::string
toNumber(const QuantityFormat& format = QuantityFormat(QuantityFormat::Default)) const;
std::string getUserString() const;
/// transfer to user preferred unit/potence
std::string getUserString(double& factor, std::string& unitString) const;