The UnitSchema class The subclasses of this class define the stuff for a certain units schema. More...
#include <UnitsSchema.h>
Public Member Functions | |
| virtual void | setSchemaUnits (void)=0 |
| if called set all the units of the units schema | |
| virtual QString | toStrWithUserPrefs (QuantityType t, double Value)=0 |
| return one string with the formated value/unit pair. | |
| virtual void | toStrWithUserPrefs (QuantityType t, double Value, QString &outValue, QString &outUnit)=0 |
| return the value and the unit as string | |
The UnitSchema class The subclasses of this class define the stuff for a certain units schema.
Definition at line 59 of file UnitsSchema.h.
| virtual void Base::UnitsSchema::setSchemaUnits | ( | void | ) | [pure virtual] |
if called set all the units of the units schema
Implemented in Base::UnitsSchemaImperial1, Base::UnitsSchemaInternal, and Base::UnitsSchemaMKS.
Referenced by Base::UnitsApi::setSchema().
| virtual QString Base::UnitsSchema::toStrWithUserPrefs | ( | QuantityType | t, | |
| double | Value | |||
| ) | [pure 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.
Implemented in Base::UnitsSchemaImperial1, Base::UnitsSchemaInternal, and Base::UnitsSchemaMKS.
| virtual void Base::UnitsSchema::toStrWithUserPrefs | ( | QuantityType | t, | |
| double | Value, | |||
| QString & | outValue, | |||
| QString & | outUnit | |||
| ) | [pure virtual] |
return the value and the unit as string
Implemented in Base::UnitsSchemaImperial1, Base::UnitsSchemaInternal, and Base::UnitsSchemaMKS.
Referenced by Base::UnitsApi::toStrWithUserPrefs().
1.6.1