27#include "GlobalObject.h"
28#include "notification/Notification.h"
29#include "units/ByteSize.h"
30#include "units/Distance.h"
184 [[nodiscard]] auto
acceptedTerms() const ->
int {
return m_settings.value(QStringLiteral(
"acceptedTerms"), 0).toInt(); }
190 [[nodiscard]]
bool alwaysOpenExternalWebsites()
const {
return m_settings.value(QStringLiteral(
"alwaysOpenExternalWebsites"),
false).toBool(); }
202 [[nodiscard]] auto
autoFlightDetection() const ->
bool {
return m_settings.value(QStringLiteral(
"FlightLog/autoFlightDetection"),
false).toBool(); }
208 [[nodiscard]]
bool expandNotamAbbreviations()
const {
return m_settings.value(QStringLiteral(
"expandNotamAbbreviations"),
false).toBool(); }
220 [[nodiscard]] auto
hideGlidingSectors() const ->
bool {
return m_settings.value(QStringLiteral(
"Map/hideGlidingSectors"),
true).toBool(); }
226 [[nodiscard]]
auto ignoreSSLProblems() const ->
bool {
return m_settings.value(QStringLiteral(
"ignoreSSLProblems"),
false).toBool(); }
240 return m_settings.value(QStringLiteral(
"lastWhatsNewHash"), 0).value<size_t>();
249 return m_settings.value(QStringLiteral(
"lastWhatsNewInMapsHash"), 0).value<
size_t>();
256 [[nodiscard]]
auto nightMode() const ->
bool {
return m_nightMode.value(); }
280 [[nodiscard]]
auto privacyHash() const ->
Units::ByteSize {
return m_settings.value(QStringLiteral(
"privacyHash"), 0).value<
size_t>(); }
286 [[nodiscard]]
auto showAltitudeAGL() const ->
bool {
return m_settings.value(QStringLiteral(
"showAltitudeAGL"),
false).toBool(); }
292 [[nodiscard]]
auto showCurrentFlightTrace() const ->
bool {
return m_settings.value(QStringLiteral(
"FlightLog/showCurrentFlightTrace"),
true).toBool(); }
298 [[nodiscard]]
auto trackRecording() const ->
bool {
return m_settings.value(QStringLiteral(
"FlightLog/trackRecording"),
true).toBool(); }
306 return m_settings.value(QStringLiteral(
"voiceNotifications"),
493 QSettings m_settings;
497 QProperty<bool> m_nightMode {m_settings.value(QStringLiteral(
"Map/nightMode"),
false).toBool()};
499 QProperty<bool> m_positioningByTrafficDataReceiver;
static Q_INVOKABLE GlobalSettings * globalSettings()
Pointer to appplication-wide static Settings instance.
QBindable< bool > bindableNightMode()
Getter function for property of the same name.
GlobalSettings(QObject *parent=nullptr)
Standard constructor.
void setShowAltitudeAGL(bool newShowAltitudeAGL)
Setter function for property of the same name.
auto trackRecording() const -> bool
Getter function for property of the same name.
void lastWhatsNewInMapsHashChanged()
Notifier signal.
void setShowCurrentFlightTrace(bool newShowCurrentFlightTrace)
Setter function for property of the same name.
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.
void trackRecordingChanged()
Notifier signal.
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 setAutoFlightDetection(bool newAutoFlightDetection)
Setter function for property of the same name.
void privacyHashChanged()
Notifier signal.
bool showCurrentFlightTrace
Show current flight trace on map.
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 setTrackRecording(bool newTrackRecording)
Setter function for property of the same name.
void setNightMode(bool newNightMode)
Setter function for property of the same name.
void showAltitudeAGLChanged()
Notifier signal.
void setLastWhatsNewInMapsHash(Units::ByteSize lwnh)
Getter function for property of the same name.
bool expandNotamAbbreviations() const
Getter function for property of the same name.
void ignoreSSLProblemsChanged()
Notifier signal.
void showCurrentFlightTraceChanged()
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.
void autoFlightDetectionChanged()
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 setVoiceNotifications(uint newVoiceNotifications)
Setter function for property of the same name.
void setAirspaceAltitudeLimit(Units::Distance newAirspaceAltitudeLimit)
Setter function for property of the same name.
bool autoFlightDetection
Automatic flight detection enabled for FlightLog start and landing time.
void voiceNotificationsChanged()
Notifier signal.
void setPrivacyHash(Units::ByteSize newHash)
Getter function for property of the same name.
bool hideGlidingSectors
Hide gliding sectors.
auto nightMode() const -> bool
Getter function for property of the same name.
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 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.
bool trackRecording
Flight track recording enabled.
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.
auto showCurrentFlightTrace() const -> bool
Getter function for property of the same name.
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.