|
Enroute Flight Navigation
A navigation app for VFR pilots
|
Global Settings Manager. More...
#include <GlobalSettings.h>
Public Member Functions | |
| GlobalSettings (QObject *parent=nullptr) | |
| Standard constructor. | |
| auto | acceptedTerms () const -> int |
| Getter function for property of the same name. | |
| bool | alwaysOpenExternalWebsites () const |
| Getter function for property of the same name. | |
| auto | airspaceAltitudeLimit () const -> Units::Distance |
| Getter function for property of the same name. | |
| auto | autoFlightDetection () const -> bool |
| Getter function for property of the same name. | |
| bool | expandNotamAbbreviations () const |
| Getter function for property of the same name. | |
| auto | flightLogEnabled () const -> bool |
| Getter function for property of the same name. | |
| auto | fontSize () const -> int |
| Getter function for property with the same name. | |
| auto | hideGlidingSectors () const -> bool |
| Getter function for property of the same name. | |
| auto | ignoreSSLProblems () const -> bool |
| Getter function for property of the same name. | |
| auto | lastValidAirspaceAltitudeLimit () const -> Units::Distance |
| Getter function for property with the same name. | |
| auto | lastWhatsNewHash () const -> Units::ByteSize |
| Getter function for property of the same name. | |
| auto | lastWhatsNewInMapsHash () const -> Units::ByteSize |
| Getter function for property of the same name. | |
| auto | nightMode () const -> bool |
| Getter function for property of the same name. | |
| QBindable< bool > | bindableNightMode () |
| Getter function for property of the same name. | |
| bool | positioningByTrafficDataReceiver () const |
| Getter function for property of the same name. | |
| QBindable< bool > | bindablePositioningByTrafficDataReceiver () const |
| Getter function for property of the same name. | |
| auto | privacyHash () const -> Units::ByteSize |
| Getter function for property of the same name. | |
| auto | showAltitudeAGL () const -> bool |
| Getter function for property of the same name. | |
| auto | showCurrentFlightTrace () const -> bool |
| Getter function for property of the same name. | |
| auto | trackRecording () const -> bool |
| Getter function for property of the same name. | |
| auto | voiceNotifications () const -> uint |
| Getter function for property of the same name. | |
| void | setAcceptedTerms (int terms) |
| Setter function for property of the same name. | |
| void | setAlwaysOpenExternalWebsites (bool alwaysOpen) |
| Setter function for property of the same name. | |
| void | setAirspaceAltitudeLimit (Units::Distance newAirspaceAltitudeLimit) |
| Setter function for property of the same name. | |
| void | setAutoFlightDetection (bool newAutoFlightDetection) |
| Setter function for property of the same name. | |
| void | setExpandNotamAbbreviations (bool newExpandNotamAbbreviations) |
| Setter function for property of the same name. | |
| void | setHideGlidingSectors (bool hide) |
| Setter function for property of the same name. | |
| void | setFontSize (int newFontSize) |
| Setter function for property of the same name. | |
| void | setIgnoreSSLProblems (bool ignore) |
| Setter function for property of the same name. | |
| void | setLargeFonts (bool newLargeFonts) |
| Getter function for property of the same name. | |
| void | setLastWhatsNewHash (Units::ByteSize lwnh) |
| Getter function for property of the same name. | |
| void | setLastWhatsNewInMapsHash (Units::ByteSize lwnh) |
| Getter function for property of the same name. | |
| void | setNightMode (bool newNightMode) |
| Setter function for property of the same name. | |
| void | setPositioningByTrafficDataReceiver (bool newPositioningByTrafficDataReceiver) |
| Setter function for property of the same name. | |
| void | setPrivacyHash (Units::ByteSize newHash) |
| Getter function for property of the same name. | |
| void | setShowAltitudeAGL (bool newShowAltitudeAGL) |
| Setter function for property of the same name. | |
| void | setShowCurrentFlightTrace (bool newShowCurrentFlightTrace) |
| Setter function for property of the same name. | |
| void | setTrackRecording (bool newTrackRecording) |
| Setter function for property of the same name. | |
| void | setVoiceNotifications (uint newVoiceNotifications) |
| Setter function for property of the same name. | |
Properties | |
| bool | alwaysOpenExternalWebsites |
| Privacy setting: always open external web sites. | |
| int | acceptedTerms |
| Find out if Terms & Conditions have been accepted. | |
| Units::Distance | airspaceAltitudeLimit |
| Airspace altitude limit for map display. | |
| Units::Distance | airspaceAltitudeLimit_min |
| Minimum acceptable value for property airspaceAltitudeLimit. | |
| Units::Distance | airspaceAltitudeLimit_max |
| Maximum acceptable value for property airspaceAltitudeLimit. | |
| bool | autoFlightDetection |
| Automatic flight detection enabled for FlightLog start and landing time. | |
| bool | expandNotamAbbreviations |
| Should we expand notam abbreviations. | |
| bool | flightLogEnabled |
| True if this build includes the flight log. | |
| int | fontSize |
| Font size. | |
| bool | hideGlidingSectors |
| Hide gliding sectors. | |
| bool | ignoreSSLProblems |
| Ignore SSL security problems. | |
| Units::Distance | lastValidAirspaceAltitudeLimit |
| Last finite value of airspaceAltitudeLimit. | |
| Units::ByteSize | lastWhatsNewHash |
| Hash of the last "what's new" message that was shown to the user. | |
| Units::ByteSize | lastWhatsNewInMapsHash |
| Hash of the last "what's new in maps" message that was shown to the user. | |
| bool | nightMode |
| Night mode. | |
| bool | positioningByTrafficDataReceiver |
| Use traffic data receiver for positioning. | |
| Units::ByteSize | privacyHash |
| Hash of the last "privacy" message that was accepted by the user. | |
| bool | showAltitudeAGL |
| Show Altitude AGL. | |
| bool | showCurrentFlightTrace |
| Show current flight trace on map. | |
| bool | trackRecording |
| Flight track recording enabled. | |
| uint | voiceNotifications |
| Voice notifications that should be played. | |
Global Settings Manager.
This class holds a few data items and exposes them via QObject properties, so that they can be used in QML. All data stored in this class is saved via QSettings on destruction.
There exists one static instance of this class, which can be accessed via the Global functions. No other instance of this class should be used.
The methods in this class are reentrant, but not thread safe.
Definition at line 45 of file GlobalSettings.h.
|
explicit |
Standard constructor.
| parent | The standard QObject parent pointer |
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 196 of file GlobalSettings.h.
|
nodiscard |
Getter function for property of the same name.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 202 of file GlobalSettings.h.
|
nodiscard |
Getter function for property of the same name.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 280 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 292 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 220 of file GlobalSettings.h.
|
nodiscard |
Getter function for property of the same name.
|
nodiscard |
Getter function for property with the same name.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 238 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 244 of file GlobalSettings.h.
|
nodiscard |
Getter function for property with the same name.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 256 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 265 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 274 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 286 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 298 of file GlobalSettings.h.
| void GlobalSettings::setAcceptedTerms | ( | int | terms | ) |
Setter function for property of the same name.
| terms | Property acceptedTerms |
| void GlobalSettings::setAirspaceAltitudeLimit | ( | Units::Distance | newAirspaceAltitudeLimit | ) |
Setter function for property of the same name.
If newAirspaceAltitudeLimit is less than airspaceHeightLimit_min, then airspaceHeightLimit_min will be set. If newAirspaceAltitudeLimit is higher than airspaceHeightLimit_max, then airspaceHeightLimit_max will be set.
| newAirspaceAltitudeLimit | Property airspaceAltitudeLimit |
| void GlobalSettings::setAlwaysOpenExternalWebsites | ( | bool | alwaysOpen | ) |
Setter function for property of the same name.
| alwaysOpen | Property alwaysOpenExternalWebsites |
| void GlobalSettings::setAutoFlightDetection | ( | bool | newAutoFlightDetection | ) |
Setter function for property of the same name.
| newAutoFlightDetection | Property autoFlightDetection |
| void GlobalSettings::setExpandNotamAbbreviations | ( | bool | newExpandNotamAbbreviations | ) |
Setter function for property of the same name.
| newExpandNotamAbbreviations | Property expandNotamAbbreviations |
| void GlobalSettings::setFontSize | ( | int | newFontSize | ) |
Setter function for property of the same name.
| newFontSize | Property fontSize |
| void GlobalSettings::setHideGlidingSectors | ( | bool | hide | ) |
Setter function for property of the same name.
| hide | Property hideGlidingSectors |
| void GlobalSettings::setIgnoreSSLProblems | ( | bool | ignore | ) |
Setter function for property of the same name.
| ignore | Property ignoreSSLProblems |
| void GlobalSettings::setLargeFonts | ( | bool | newLargeFonts | ) |
Getter function for property of the same name.
| newLargeFonts | Property largeFonts |
| void GlobalSettings::setLastWhatsNewHash | ( | Units::ByteSize | lwnh | ) |
Getter function for property of the same name.
| lwnh | Property lastWhatsNewHash |
| void GlobalSettings::setLastWhatsNewInMapsHash | ( | Units::ByteSize | lwnh | ) |
Getter function for property of the same name.
| lwnh | Property lastWhatsNewInMapsHash |
| void GlobalSettings::setNightMode | ( | bool | newNightMode | ) |
Setter function for property of the same name.
| newNightMode | Property nightMode |
| void GlobalSettings::setPositioningByTrafficDataReceiver | ( | bool | newPositioningByTrafficDataReceiver | ) |
Setter function for property of the same name.
| newPositioningByTrafficDataReceiver | Property positioningByTrafficDataReceiver |
| void GlobalSettings::setPrivacyHash | ( | Units::ByteSize | newHash | ) |
Getter function for property of the same name.
| newHash | Property privacyHash |
| void GlobalSettings::setShowAltitudeAGL | ( | bool | newShowAltitudeAGL | ) |
Setter function for property of the same name.
| newShowAltitudeAGL | Property showAltitudeAGL |
| void GlobalSettings::setShowCurrentFlightTrace | ( | bool | newShowCurrentFlightTrace | ) |
Setter function for property of the same name.
| newShowCurrentFlightTrace | Property showCurrentFlightTrace |
| void GlobalSettings::setTrackRecording | ( | bool | newTrackRecording | ) |
Setter function for property of the same name.
| newTrackRecording | Property trackRecording |
| void GlobalSettings::setVoiceNotifications | ( | uint | newVoiceNotifications | ) |
Setter function for property of the same name.
| newVoiceNotifications | Property voiceNotifications |
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 304 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 310 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 316 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 322 of file GlobalSettings.h.
|
readwrite |
Find out if Terms & Conditions have been accepted.
This property says which version of our "terms and conditions" have been accepted by the user; this is used to determine whether the first-use-dialog should be shown. If nothing has been accepted yet, 0 is returned.
Definition at line 89 of file GlobalSettings.h.
|
readwrite |
Airspace altitude limit for map display.
This property holds an altitude. The moving map will ony display airspaces whose lower boundary is lower than this altitude. The altitude value lies in the range [airspaceHeightLimit_min, airspaceHeightLimit_max] or takes a non-finite value to indicate that all airspaces shall be shown.
Definition at line 97 of file GlobalSettings.h.
| Units::Distance GlobalSettings::airspaceAltitudeLimit_max |
Maximum acceptable value for property airspaceAltitudeLimit.
This is currently set to 15.000 ft
Definition at line 109 of file GlobalSettings.h.
| Units::Distance GlobalSettings::airspaceAltitudeLimit_min |
Minimum acceptable value for property airspaceAltitudeLimit.
This is currently set to 3.000 ft
Definition at line 103 of file GlobalSettings.h.
|
readwrite |
Automatic flight detection enabled for FlightLog start and landing time.
Always false in builds without the flight log, see flightLogEnabled.
Definition at line 115 of file GlobalSettings.h.
|
read |
True if this build includes the flight log.
Set by the CMake option FLIGHTLOG. While the flight log is work in progress, release builds leave the option off: the flight log menu entry is hidden, and autoFlightDetection always reads as false, so the Android foreground service and background location on iOS are never started.
Definition at line 127 of file GlobalSettings.h.
|
readwrite |
Font size.
This is a value between 14 (normal font size) and 20 (giant fonts)
Definition at line 133 of file GlobalSettings.h.
|
readwrite |
Hash of the last "what's new" message that was shown to the user.
This property is used in the app to determine if the message has been shown or not.
Definition at line 149 of file GlobalSettings.h.
|
readwrite |
Hash of the last "what's new in maps" message that was shown to the user.
This property is used in the app to determine if the message has been shown or not.
Definition at line 156 of file GlobalSettings.h.
|
readwrite |
Hash of the last "privacy" message that was accepted by the user.
This property is used in the app to determine if the message has been shown or not.
Definition at line 169 of file GlobalSettings.h.
|
readwrite |
Voice notifications that should be played.
This property is an "or" of the entries of Notifications::Notification::Importance. It determines which notifications should be spoken.
Definition at line 185 of file GlobalSettings.h.