add posibility to use a unit schema other then the system schema to represent a quantity

This commit is contained in:
wmayer
2019-12-21 13:35:14 +01:00
parent 980c6ab227
commit e1b7ef10c7
5 changed files with 61 additions and 6 deletions

View File

@@ -213,6 +213,11 @@ QString Quantity::getUserString(double& factor, QString& unitString) const
return Base::UnitsApi::schemaTranslate(*this, factor, unitString);
}
QString Quantity::getUserString(UnitsSchema* schema, double &factor, QString &unitString) const
{
return schema->schemaTranslate(*this, factor, unitString);
}
/// true if it has a number without a unit
bool Quantity::isDimensionless(void)const
{