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. | |
bool | expandNotamAbbreviations () const |
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. | |
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 | 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 | 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 | 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 | expandNotamAbbreviations |
Should we expand notam abbreviations. | |
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. | |
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 175 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 181 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 253 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 193 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 205 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 211 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 223 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 232 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 241 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 247 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 259 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::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::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 265 of file GlobalSettings.h.
|
inlinenodiscard |
Getter function for property of the same name.
Definition at line 271 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 |
Font size.
This is a value between 14 (normal font size) and 20 (giant fonts)
Definition at line 118 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 134 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 141 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 154 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 164 of file GlobalSettings.h.