The UnitSchema class. More...
#include <UnitsSchemaMKS.h>
Public Member Functions | |
void | setSchemaUnits (void) |
if called set all the units of the units schema | |
QString | toStrWithUserPrefs (QuantityType t, double Value) |
return one string with the formated value/unit pair. | |
void | toStrWithUserPrefs (QuantityType t, double Value, QString &outValue, QString &outUnit) |
return the value and the unit as string |
The UnitSchema class.
Definition at line 38 of file UnitsSchemaMKS.h.
void UnitsSchemaMKS::setSchemaUnits | ( | void | ) | [virtual] |
if called set all the units of the units schema
Implements Base::UnitsSchema.
Definition at line 37 of file UnitsSchemaMKS.cpp.
References Base::Acceleration, Base::Angle, Base::Area, Base::Length, Base::Mass, Base::UnitsApi::setPrefOf(), Base::Temperature, Base::TimeSpan, Base::Velocity, and Base::Volume.
QString UnitsSchemaMKS::toStrWithUserPrefs | ( | QuantityType | t, | |
double | Value | |||
) | [virtual] |
return one string with the formated value/unit pair.
The designer of the unit schema can decide how he wants the value presented. Only rule is its still parseble by the units parser.
Implements Base::UnitsSchema.
Definition at line 59 of file UnitsSchemaMKS.cpp.
References Base::UnitsApi::getPrefFactorOf(), and Base::UnitsApi::getPrefUnitOf().
void UnitsSchemaMKS::toStrWithUserPrefs | ( | QuantityType | t, | |
double | Value, | |||
QString & | outValue, | |||
QString & | outUnit | |||
) | [virtual] |
return the value and the unit as string
Implements Base::UnitsSchema.
Definition at line 51 of file UnitsSchemaMKS.cpp.
References Base::UnitsApi::getPrefFactorOf(), and Base::UnitsApi::getPrefUnitOf().