The standard units schema Here is defined what internal (base) units FreeCAD uses. More...
#include <UnitsSchemaInternal.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 standard units schema Here is defined what internal (base) units FreeCAD uses.
FreeCAD uses a mm/kg/deg scala. Also it defines how the units get presented.
Definition at line 40 of file UnitsSchemaInternal.h.
void UnitsSchemaInternal::setSchemaUnits | ( | void | ) | [virtual] |
if called set all the units of the units schema
Implements Base::UnitsSchema.
Definition at line 37 of file UnitsSchemaInternal.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 UnitsSchemaInternal::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 UnitsSchemaInternal.cpp.
References Base::UnitsApi::getPrefFactorOf(), and Base::UnitsApi::getPrefUnitOf().
void UnitsSchemaInternal::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 UnitsSchemaInternal.cpp.
References Base::UnitsApi::getPrefFactorOf(), and Base::UnitsApi::getPrefUnitOf().