The schema class for the imperial unit system Here are the definiton for the imperial unit system. More...
#include <UnitsSchemaImperial1.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 schema class for the imperial unit system Here are the definiton for the imperial unit system.
It also defines how the value/units get printed.
Definition at line 39 of file UnitsSchemaImperial1.h.
void UnitsSchemaImperial1::setSchemaUnits | ( | void | ) | [virtual] |
if called set all the units of the units schema
Implements Base::UnitsSchema.
Definition at line 37 of file UnitsSchemaImperial1.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 UnitsSchemaImperial1::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 60 of file UnitsSchemaImperial1.cpp.
References Base::UnitsApi::getPrefFactorOf(), and Base::UnitsApi::getPrefUnitOf().
void UnitsSchemaImperial1::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 UnitsSchemaImperial1.cpp.
References Base::UnitsApi::getPrefFactorOf(), and Base::UnitsApi::getPrefUnitOf().