27#include "GlobalObject.h"
28#include "notification/Notification.h"
29#include "units/ByteSize.h"
30#include "units/Distance.h"
188 [[nodiscard]] auto
acceptedTerms() const ->
int {
return m_settings.value(QStringLiteral(
"acceptedTerms"), 0).toInt(); }
194 [[nodiscard]]
bool alwaysOpenExternalWebsites()
const {
return m_settings.value(QStringLiteral(
"alwaysOpenExternalWebsites"),
false).toBool(); }
206 [[nodiscard]]
bool expandNotamAbbreviations()
const {
return m_settings.value(QStringLiteral(
"expandNotamAbbreviations"),
false).toBool(); }
218 [[nodiscard]] auto
hideGlidingSectors() const ->
bool {
return m_settings.value(QStringLiteral(
"Map/hideGlidingSectors"),
true).toBool(); }
224 [[nodiscard]]
auto ignoreSSLProblems() const ->
bool {
return m_settings.value(QStringLiteral(
"ignoreSSLProblems"),
false).toBool(); }
238 return m_settings.value(QStringLiteral(
"lastWhatsNewHash"), 0).value<size_t>();
247 return m_settings.value(QStringLiteral(
"lastWhatsNewInMapsHash"), 0).value<
size_t>();
260 [[nodiscard]] auto
nightMode() const ->
bool {
return m_settings.value(QStringLiteral(
"Map/nightMode"),
false).toBool(); }
278 [[nodiscard]]
auto privacyHash() const ->
Units::ByteSize {
return m_settings.value(QStringLiteral(
"privacyHash"), 0).value<
size_t>(); }
284 [[nodiscard]]
auto showAltitudeAGL() const ->
bool {
return m_settings.value(QStringLiteral(
"showAltitudeAGL"),
false).toBool(); }
292 return m_settings.value(QStringLiteral(
"voiceNotifications"),
461 QSettings m_settings;
463 QProperty<bool> m_positioningByTrafficDataReceiver;
static Q_INVOKABLE GlobalSettings * globalSettings()
Pointer to appplication-wide static Settings instance.
GlobalSettings(QObject *parent=nullptr)
Standard constructor.
void setShowAltitudeAGL(bool newShowAltitudeAGL)
Setter function for property of the same name.
void lastWhatsNewInMapsHashChanged()
Notifier signal.
void setLastWhatsNewHash(Units::ByteSize lwnh)
Getter function for property of the same name.
bool expandNotamAbbreviations
Should we expand notam abbreviations.
void setFontSize(int newFontSize)
Setter function for property of the same name.
uint voiceNotifications
Voice notifications that should be played.
bool ignoreSSLProblems
Ignore SSL security problems.
bool nightMode
Night mode.
bool alwaysOpenExternalWebsites
Privacy setting: always open external web sites.
bool positioningByTrafficDataReceiver
Use traffic data receiver for positioning.
bool positioningByTrafficDataReceiver() const
Getter function for property of the same name.
void setLargeFonts(bool newLargeFonts)
Getter function for property of the same name.
Units::Distance airspaceAltitudeLimit
Airspace altitude limit for map display.
QBindable< bool > bindablePositioningByTrafficDataReceiver() const
Getter function for property of the same name.
Units::Distance airspaceAltitudeLimit_max
Maximum acceptable value for property airspaceAltitudeLimit.
Units::ByteSize lastWhatsNewHash
Hash of the last "what's new" message that was shown to the user.
void setPositioningByTrafficDataReceiver(bool newPositioningByTrafficDataReceiver)
Setter function for property of the same name.
auto voiceNotifications() const -> uint
Getter function for property of the same name.
void airspaceAltitudeLimitChanged()
Notifier signal.
void privacyHashChanged()
Notifier signal.
MapBearingPolicy mapBearingPolicy
Map bearing policy.
void fontSizeChanged()
Notifier signal.
auto airspaceAltitudeLimit() const -> Units::Distance
Getter function for property of the same name.
auto lastWhatsNewInMapsHash() const -> Units::ByteSize
Getter function for property of the same name.
void alwaysOpenExternalWebsitesChanged()
Notifier signal.
void setNightMode(bool newNightMode)
Setter function for property of the same name.
void showAltitudeAGLChanged()
Notifier signal.
MapBearingPolicy
Possible map bearing policies.
void setLastWhatsNewInMapsHash(Units::ByteSize lwnh)
Getter function for property of the same name.
auto mapBearingPolicy() const -> MapBearingPolicy
Getter function for property of the same name.
void ignoreSSLProblemsChanged()
Notifier signal.
void setExpandNotamAbbreviations(bool newExpandNotamAbbreviations)
Setter function for property of the same name.
Units::ByteSize privacyHash
Hash of the last "privacy" message that was accepted by the user.
void lastWhatsNewHashChanged()
Notifier signal.
auto privacyHash() const -> Units::ByteSize
Getter function for property of the same name.
auto lastValidAirspaceAltitudeLimit() const -> Units::Distance
Getter function for property with the same name.
bool alwaysOpenExternalWebsites() const
Getter function for property of the same name.
void mapBearingPolicyChanged()
Notifier signal.
void setVoiceNotifications(uint newVoiceNotifications)
Setter function for property of the same name.
void setAirspaceAltitudeLimit(Units::Distance newAirspaceAltitudeLimit)
Setter function for property of the same name.
void voiceNotificationsChanged()
Notifier signal.
void setPrivacyHash(Units::ByteSize newHash)
Getter function for property of the same name.
bool hideGlidingSectors
Hide gliding sectors.
void expandNotamAbbreviationsChanged()
Notifier signal.
void setIgnoreSSLProblems(bool ignore)
Setter function for property of the same name.
void acceptedTermsChanged()
Notifier signal.
void setHideGlidingSectors(bool hide)
Setter function for property of the same name.
void hideGlidingSectorsChanged()
Notifier signal.
void setAcceptedTerms(int terms)
Setter function for property of the same name.
void setMapBearingPolicy(MapBearingPolicy policy)
Setter function for property of the same name.
void setAlwaysOpenExternalWebsites(bool alwaysOpen)
Setter function for property of the same name.
auto showAltitudeAGL() const -> bool
Getter function for property of the same name.
auto ignoreSSLProblems() const -> bool
Getter function for property of the same name.
void nightModeChanged()
Notifier signal.
int acceptedTerms
Find out if Terms & Conditions have been accepted.
Units::ByteSize lastWhatsNewInMapsHash
Hash of the last "what's new in maps" message that was shown to the user.
Units::Distance airspaceAltitudeLimit_min
Minimum acceptable value for property airspaceAltitudeLimit.
bool showAltitudeAGL
Show Altitude AGL.
void lastValidAirspaceAltitudeLimitChanged()
Notifier signal.
Units::Distance lastValidAirspaceAltitudeLimit
Last finite value of airspaceAltitudeLimit.
auto fontSize() const -> int
Getter function for property with the same name.
@ Warning_Navigation
Serious warning, "Prohibited Airspace 1 minutes ahead".
@ Info_Navigation
Information pertaining to navigation, "Top of descent reached".
@ Alert
Alert. Immediate action is required to avoid accident or serious rule infringion.
@ Warning
Generic warning, "Traffic data receiver inop".
Convenience class for size_t.
Convenience class for distance computations.
static Q_INVOKABLE constexpr Units::Distance fromFT(double distanceInFT)
Constructs a distance.
Conversion between units used in aviation.