|
| | LengthUnit () |
| |
| | LengthUnit (LengthType type, uint8_t prec, bool isDecimal=true, bool suffixes=true) |
| |
| | LengthUnit (LengthType first, LengthType second, uint8_t prec, bool isDecimal=true) |
| |
| | Unit (LengthType type) |
| |
| | Unit (LengthType first, LengthType second) |
| |
| | Unit (LengthType type, uint8_t prec, bool isDecimal=true, bool suffixes=true) |
| |
| | Unit (LengthType first, LengthType second, uint8_t prec, bool isDecimal=true) |
| |
| | Unit (LengthType first, LengthType second, LengthType third, uint8_t prec, bool isDecimal=true) |
| |
| bool | isDecimal () const |
| |
| double | divisor () const |
| |
| double | eps () const |
| |
| bool | isMetric (LengthType type) const |
| |
| double | simpleRatio (double value, double factor, bool reversed) const |
| |
| double | conversion (LengthType type, double value, bool reversed=false) const |
| |
| utility::String | suffix (LengthType type) const |
| |
| std::optional< LengthType > | fromTag (const utility::String &text) const |
| |
| utility::String | toTag (LengthType type) const |
| |
| std::optional< std::pair< LengthType, utility::String::size_type > > | findSuffix (const utility::String &text, utility::String::size_type startPos=0) const |
| |
|
|
LengthType | primary |
| | The primary unit to display.
|
| |
|
std::optional< LengthType > | secondary |
| | An optional secondary unit, e.g. for foot/inch combos (nullopt = none)
|
| |
|
std::optional< LengthType > | tertiary |
| | An optional teriary unit, e.g. for degrees/minutes/seconds combos (nullopt = none, ignored if no secondary unit)
|
| |
|
uint8_t | precision |
| | The display precision (decimal places for metric or 2^-n for fractional units.
|
| |
|
double | base |
| | The numeric base for fractional quantities (10.0 = floating point to specified decimal places, other values create a fraction)
|
| |
|
bool | isUnitSuffix |
| | True if values should be displayed with a unit suffix, e.g. "100.0mm" rather than "100.0" (always true when multiple units)
|
| |
|
bool | isLeadingZero |
| | True if a value is displayed with multiple units and zero values (apart from the last unit) should be included, e.g. 0' 10" vs 10".
|
| |
Structure to represent length units