Class: DefaultG3XUnitsUserSettingManager
A default implementation of G3XUnitsUserSettingManager which sources setting values from another setting manager.
Hierarchy
DefaultUnitsUserSettingManager
<G3XUnitsUserSettingTypes
>↳
DefaultG3XUnitsUserSettingManager
Implements
Constructors
constructor
• new DefaultG3XUnitsUserSettingManager(sourceSettingManager
): DefaultG3XUnitsUserSettingManager
Creates a new instance of DefaultG3XUnitsUserSettingManager.
Parameters
Name | Type | Description |
---|---|---|
sourceSettingManager | UserSettingManager <G3XUnitsUserSettingTypes > | The manager from which to source setting values. |
Returns
DefaultG3XUnitsUserSettingManager
Overrides
DefaultUnitsUserSettingManager\<G3XUnitsUserSettingTypes\>.constructor
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Settings/G3XUnitsUserSettings.ts:74
Properties
altitudeUnits
• Readonly
altitudeUnits: Subscribable
<Unit
<Distance
>>
The altitude units to use for the current altitude units setting.
Implementation of
G3XUnitsUserSettingManager.altitudeUnits
Inherited from
DefaultUnitsUserSettingManager.altitudeUnits
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:153
baroPressureUnits
• Readonly
baroPressureUnits: Subscribable
<Unit
<Pressure
>>
The barometric pressure units to use for the current barometric pressure units setting.
Implementation of
G3XUnitsUserSettingManager.baroPressureUnits
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Settings/G3XUnitsUserSettings.ts:64
distanceUnitsLarge
• Readonly
distanceUnitsLarge: Subscribable
<Unit
<Distance
>>
The large distance units to use (nautical mile, kilometer, etc.) for the current distance units setting.
Implementation of
G3XUnitsUserSettingManager.distanceUnitsLarge
Inherited from
DefaultUnitsUserSettingManager.distanceUnitsLarge
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:141
distanceUnitsSmall
• Readonly
distanceUnitsSmall: Subscribable
<Unit
<Distance
>>
The small distance units to use (foot, meter, etc.) for the current distance units setting.
Implementation of
G3XUnitsUserSettingManager.distanceUnitsSmall
Inherited from
DefaultUnitsUserSettingManager.distanceUnitsSmall
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:145
fuelEconomyUnits
• Readonly
fuelEconomyUnits: Subscribable
<Unit
<DistancePerWeight
| WeightPerDistance
>>
The fuel economy units to use for the current fuel economy units setting.
Implementation of
G3XUnitsUserSettingManager.fuelEconomyUnits
Defined in
src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Settings/G3XUnitsUserSettings.ts:68
fuelFlowUnits
• Readonly
fuelFlowUnits: Subscribable
<Unit
<WeightFlux
>>
The fuel flow units to use for the current fuel units setting.
Implementation of
G3XUnitsUserSettingManager.fuelFlowUnits
Inherited from
DefaultUnitsUserSettingManager.fuelFlowUnits
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:177
fuelUnits
• Readonly
fuelUnits: Subscribable
<Unit
<Weight
>>
The fuel units to use for the current fuel units setting.
Implementation of
G3XUnitsUserSettingManager.fuelUnits
Inherited from
DefaultUnitsUserSettingManager.fuelUnits
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:173
navAngleUnits
• Readonly
navAngleUnits: Subscribable
<NavAngleUnit
>
The nav angle units to use for the current nav angle units setting.
Implementation of
G3XUnitsUserSettingManager.navAngleUnits
Inherited from
DefaultUnitsUserSettingManager.navAngleUnits
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:137
speedUnits
• Readonly
speedUnits: Subscribable
<Unit
<Speed
>>
The speed units to use for the current distance units setting.
Implementation of
G3XUnitsUserSettingManager.speedUnits
Inherited from
DefaultUnitsUserSettingManager.speedUnits
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:149
temperatureDeltaUnits
• Readonly
temperatureDeltaUnits: Subscribable
<Unit
<TemperatureDelta
>>
The temperature delta units to use for the current temperature units setting.
Implementation of
G3XUnitsUserSettingManager.temperatureDeltaUnits
Inherited from
DefaultUnitsUserSettingManager.temperatureDeltaUnits
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:165
temperatureUnits
• Readonly
temperatureUnits: Subscribable
<Unit
<Temperature
>>
The temperature units to use for the current temperature units setting.
Implementation of
G3XUnitsUserSettingManager.temperatureUnits
Inherited from
DefaultUnitsUserSettingManager.temperatureUnits
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:161
verticalSpeedUnits
• Readonly
verticalSpeedUnits: Subscribable
<Unit
<Speed
>>
The vertical speed units to use for the current altitude units setting.
Implementation of
G3XUnitsUserSettingManager.verticalSpeedUnits
Inherited from
DefaultUnitsUserSettingManager.verticalSpeedUnits
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:157
weightUnits
• Readonly
weightUnits: Subscribable
<Unit
<Weight
>>
The weight units to use for the current weight units setting.
Implementation of
G3XUnitsUserSettingManager.weightUnits
Inherited from
DefaultUnitsUserSettingManager.weightUnits
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:169
Methods
getAllSettings
▸ getAllSettings(): UserSetting
<UserSettingValue
>[]
Gets an array of all settings of this manager.
Returns
UserSetting
<UserSettingValue
>[]
an array of all settings of this manager.
Implementation of
G3XUnitsUserSettingManager.getAllSettings
Inherited from
DefaultUnitsUserSettingManager.getAllSettings
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:278
getSetting
▸ getSetting<K
>(name
): UserSetting
<NonNullable
<G3XUnitsUserSettingTypes
[K
]>>
Gets a setting from this manager.
Type parameters
Name | Type |
---|---|
K | extends "unitsNavAngle" | "unitsDistance" | "unitsAltitude" | "unitsTemperature" | "unitsWeight" | "unitsFuel" | "unitsBaroPressure" | "unitsFuelEconomy" |
Parameters
Name | Type | Description |
---|---|---|
name | K | The name of the setting to get. |
Returns
UserSetting
<NonNullable
<G3XUnitsUserSettingTypes
[K
]>>
The requested setting.
Throws
Error if no setting with the specified name exists.
Implementation of
G3XUnitsUserSettingManager.getSetting
Inherited from
DefaultUnitsUserSettingManager.getSetting
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:268
mapTo
▸ mapTo<M
>(map
): UserSettingManager
<M
& UnitsUserSettingTypes
& { unitsBaroPressure
: G3XUnitsBaroPressureSettingMode
; unitsFuelEconomy
: G3XUnitsFuelEconomySettingMode
}>
Maps a subset of this manager's settings to ones with aliased names, and creates a new setting manager which supports accessing the settings using their aliases.
Type parameters
Name | Type |
---|---|
M | extends UserSettingRecord |
Parameters
Name | Type | Description |
---|---|---|
map | UserSettingMap <M , G3XUnitsUserSettingTypes > | A map defining the aliases of a subset of this manager's settings, with aliased setting names as keys and original setting names as values. |
Returns
UserSettingManager
<M
& UnitsUserSettingTypes
& { unitsBaroPressure
: G3XUnitsBaroPressureSettingMode
; unitsFuelEconomy
: G3XUnitsFuelEconomySettingMode
}>
A new setting manager which supports accessing a subset of this manager's settings using aliased names.
Implementation of
G3XUnitsUserSettingManager.mapTo
Inherited from
DefaultUnitsUserSettingManager.mapTo
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:283
tryGetSetting
▸ tryGetSetting<K
>(name
): K
extends keyof UnitsUserSettingTypes | "unitsBaroPressure"
| "unitsFuelEconomy"
? UserSetting
<NonNullable
<G3XUnitsUserSettingTypes
[K
]>> : undefined
Attempts to get a setting from this manager.
Type parameters
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type | Description |
---|---|---|
name | K | The name of the setting to get. |
Returns
K
extends keyof UnitsUserSettingTypes | "unitsBaroPressure"
| "unitsFuelEconomy"
? UserSetting
<NonNullable
<G3XUnitsUserSettingTypes
[K
]>> : undefined
The requested setting, or undefined
if no such setting exists.
Implementation of
G3XUnitsUserSettingManager.tryGetSetting
Inherited from
DefaultUnitsUserSettingManager.tryGetSetting
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:263
whenSettingChanged
▸ whenSettingChanged<K
>(name
): Consumer
<NonNullable
<G3XUnitsUserSettingTypes
[K
]>>
Gets a consumer which notifies handlers when the value of a setting changes.
Type parameters
Name | Type |
---|---|
K | extends "unitsNavAngle" | "unitsDistance" | "unitsAltitude" | "unitsTemperature" | "unitsWeight" | "unitsFuel" | "unitsBaroPressure" | "unitsFuelEconomy" |
Parameters
Name | Type | Description |
---|---|---|
name | K | The name of a setting. |
Returns
Consumer
<NonNullable
<G3XUnitsUserSettingTypes
[K
]>>
a consumer which notifies handlers when the value of the setting changes.
Throws
Error if no setting with the specified name exists.
Implementation of
G3XUnitsUserSettingManager.whenSettingChanged
Inherited from
DefaultUnitsUserSettingManager.whenSettingChanged
Defined in
src/garminsdk/settings/UnitsUserSettings.ts:273