From 9324946dd36025e7d56a9578c7cb890d518fe551 Mon Sep 17 00:00:00 2001 From: kebekus Date: Sun, 8 Dec 2024 07:29:00 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Akaflieg?= =?UTF-8?q?-Freiburg/enroute@19cf398112e28754f588014da63487a047ed24e4=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APIdoc/html/FlightRoute_8h_source.html | 2 +- APIdoc/html/GlobalObject_8h_source.html | 4 +- APIdoc/html/GlobalSettings_8h_source.html | 497 ++++++++--------- ...ositionInfoSource__Abstract_8h_source.html | 231 ++++---- ...sitionInfoSource__Satellite_8h_source.html | 2 +- APIdoc/html/PositionInfo_8h_source.html | 158 +++--- APIdoc/html/PositionProvider_8h_source.html | 284 +++++----- APIdoc/html/RemainingRouteInfo_8h_source.html | 2 +- APIdoc/html/Timespan_8h_source.html | 149 +++--- .../html/TrafficDataProvider_8h_source.html | 410 +++++++------- ...cDataSource__AbstractSocket_8h_source.html | 2 +- ...TrafficDataSource__Abstract_8h_source.html | 479 +++++++++-------- ...ataSource__BluetoothClassic_8h_source.html | 2 +- .../TrafficDataSource__File_8h_source.html | 2 +- ...afficDataSource__SerialPort_8h_source.html | 2 +- ...TrafficDataSource__Simulate_8h_source.html | 2 +- .../TrafficDataSource__Tcp_8h_source.html | 2 +- .../TrafficDataSource__Udp_8h_source.html | 2 +- ...TrafficFactor__DistanceOnly_8h_source.html | 127 ++--- ...TrafficFactor__WithPosition_8h_source.html | 4 +- APIdoc/html/Units_8h_source.html | 2 +- APIdoc/html/Warning_8h_source.html | 2 +- .../html/WeatherDataProvider_8h_source.html | 2 +- APIdoc/html/classGlobalSettings-members.html | 66 +-- APIdoc/html/classGlobalSettings.html | 105 ++-- ...ssPositioning_1_1PositionInfo-members.html | 23 +- .../classPositioning_1_1PositionInfo.html | 62 ++- ...1PositionInfoSource__Abstract-members.html | 23 +- ...oning_1_1PositionInfoSource__Abstract.html | 237 +++++---- ...ioning_1_1PositionInfoSource__Abstract.png | Bin 1536 -> 1277 bytes ...PositionInfoSource__Satellite-members.html | 25 +- ...ning_1_1PositionInfoSource__Satellite.html | 64 +-- ...sitioning_1_1PositionProvider-members.html | 36 +- .../classPositioning_1_1PositionProvider.html | 498 ++++++++++++++---- .../classPositioning_1_1PositionProvider.png | Bin 830 -> 0 bytes ...raffic_1_1TrafficDataProvider-members.html | 61 +-- .../classTraffic_1_1TrafficDataProvider.html | 230 ++++++-- ..._1TrafficDataSource__Abstract-members.html | 75 +-- ...raffic_1_1TrafficDataSource__Abstract.html | 160 +++++- ...ficDataSource__AbstractSocket-members.html | 77 +-- ..._1_1TrafficDataSource__AbstractSocket.html | 15 +- ...cDataSource__BluetoothClassic-members.html | 83 +-- ..._1TrafficDataSource__BluetoothClassic.html | 15 +- ...ataSource__BluetoothLowEnergy-members.html | 83 +-- ...TrafficDataSource__BluetoothLowEnergy.html | 15 +- ...ic_1_1TrafficDataSource__File-members.html | 79 +-- ...assTraffic_1_1TrafficDataSource__File.html | 15 +- ...TrafficDataSource__SerialPort-members.html | 83 +-- ...ffic_1_1TrafficDataSource__SerialPort.html | 15 +- ..._1TrafficDataSource__Simulate-members.html | 81 +-- ...raffic_1_1TrafficDataSource__Simulate.html | 15 +- ...fic_1_1TrafficDataSource__Tcp-members.html | 87 +-- ...lassTraffic_1_1TrafficDataSource__Tcp.html | 15 +- ...fic_1_1TrafficDataSource__Udp-members.html | 83 +-- ...lassTraffic_1_1TrafficDataSource__Udp.html | 15 +- ...raffic_1_1TrafficFactor__DistanceOnly.html | 8 +- .../html/classUnits_1_1Timespan-members.html | 2 +- APIdoc/html/classUnits_1_1Timespan.html | 28 +- APIdoc/html/doxygen_crawl.html | 56 +- APIdoc/html/functions.html | 1 - APIdoc/html/functions_b.html | 10 + APIdoc/html/functions_f.html | 2 +- APIdoc/html/functions_func.html | 3 +- APIdoc/html/functions_func_b.html | 10 + APIdoc/html/functions_func_f.html | 2 +- APIdoc/html/functions_func_l.html | 2 - APIdoc/html/functions_func_p.html | 11 +- APIdoc/html/functions_func_r.html | 5 +- APIdoc/html/functions_func_s.html | 9 +- APIdoc/html/functions_l.html | 2 - APIdoc/html/functions_p.html | 9 +- APIdoc/html/functions_prop_p.html | 4 +- APIdoc/html/functions_prop_r.html | 2 +- APIdoc/html/functions_prop_s.html | 2 +- APIdoc/html/functions_r.html | 5 +- APIdoc/html/functions_s.html | 7 +- APIdoc/html/hierarchy.html | 74 +-- 77 files changed, 2922 insertions(+), 2142 deletions(-) delete mode 100644 APIdoc/html/classPositioning_1_1PositionProvider.png diff --git a/APIdoc/html/FlightRoute_8h_source.html b/APIdoc/html/FlightRoute_8h_source.html index 8ff840487..c9a29bef8 100644 --- a/APIdoc/html/FlightRoute_8h_source.html +++ b/APIdoc/html/FlightRoute_8h_source.html @@ -230,7 +230,7 @@
371
372} // namespace Navigation
Waypoint, such as an airfield, a navaid station or a reporting point.
Definition Waypoint.h:41
-
Global Settings Manager.
+
Global Settings Manager.
Intended flight route.
Definition FlightRoute.h:60
Q_INVOKABLE QString load(const QString &fileName)
Loads the route from a GeoJSON or GPX document.
qsizetype size
Number of waypoints in the route.
diff --git a/APIdoc/html/GlobalObject_8h_source.html b/APIdoc/html/GlobalObject_8h_source.html index 372d33719..193d6d738 100644 --- a/APIdoc/html/GlobalObject_8h_source.html +++ b/APIdoc/html/GlobalObject_8h_source.html @@ -245,7 +245,7 @@
static Q_INVOKABLE QNetworkAccessManager * networkAccessManager()
Pointer to appplication-wide static QNetworkAccessManager instance.
static Q_INVOKABLE Platform::PlatformAdaptor_Abstract * platformAdaptor()
Pointer to appplication-wide static PlatformAdaptor instance.
static Q_INVOKABLE GlobalSettings * globalSettings()
Pointer to appplication-wide static Settings instance.
-
Global Settings Manager.
+
Global Settings Manager.
Manage libraries and text assets.
Definition Librarian.h:38
Manage NOTAM data and download NOTAM data from the FAA if required.
This extremely simple class give accss to time and offers a few time-related functions.
Definition Clock.h:39
@@ -253,7 +253,7 @@
This class manages notifications and presents them to the GUI.
Interface to platform-specific file exchange functionality.
Interface to platform-specific functionality.
-
Central Position Provider.
+
Central Position Provider.
Sensor data.
Definition Sensors.h:43
Flarmnet database.
Definition FlarmnetDB.h:37
Password database.
Definition PasswordDB.h:37
diff --git a/APIdoc/html/GlobalSettings_8h_source.html b/APIdoc/html/GlobalSettings_8h_source.html index 15b8039a8..1a173e9e5 100644 --- a/APIdoc/html/GlobalSettings_8h_source.html +++ b/APIdoc/html/GlobalSettings_8h_source.html @@ -83,301 +83,304 @@
20
21#pragma once
22
-
23#include <QQmlEngine>
-
24#include <QSettings>
-
25
-
26#include "GlobalObject.h"
-
27#include "notification/Notification.h"
-
28#include "units/ByteSize.h"
-
29#include "units/Distance.h"
-
30
+
23#include <QProperty>
+
24#include <QQmlEngine>
+
25#include <QSettings>
+
26
+
27#include "GlobalObject.h"
+
28#include "notification/Notification.h"
+
29#include "units/ByteSize.h"
+
30#include "units/Distance.h"
31
-
-
44class GlobalSettings : public QObject
-
45{
-
46 Q_OBJECT
-
47 QML_ELEMENT
-
48 QML_SINGLETON
-
49
-
50public:
-
-
52 enum MapBearingPolicy : quint8
-
53 {
- - - -
57 };
+
32
+
+
45class GlobalSettings : public QObject
+
46{
+
47 Q_OBJECT
+
48 QML_ELEMENT
+
49 QML_SINGLETON
+
50
+
51public:
+
+
53 enum MapBearingPolicy : quint8
+
54 {
+ + + +
58 };
-
58 Q_ENUM(MapBearingPolicy)
-
59
+
59 Q_ENUM(MapBearingPolicy)
60
-
61 //
-
62 // Constructor and destructor
-
63 //
-
64
-
65
-
69 explicit GlobalSettings(QObject *parent = nullptr);
-
70
-
71 // No default constructor, important for QML singleton
-
72 explicit GlobalSettings() = delete;
-
73
-
74 // Standard Destructor
-
75 ~GlobalSettings() override = default;
-
76
-
77 // factory function for QML singleton
-
78 static GlobalSettings* create(QQmlEngine * /*unused*/, QJSEngine * /*unused*/)
-
79 {
- -
81 }
-
82
+
61
+
62 //
+
63 // Constructor and destructor
+
64 //
+
65
+
66
+
70 explicit GlobalSettings(QObject *parent = nullptr);
+
71
+
72 // No default constructor, important for QML singleton
+
73 explicit GlobalSettings() = delete;
+
74
+
75 // Standard Destructor
+
76 ~GlobalSettings() override = default;
+
77
+
78 // factory function for QML singleton
+
79 static GlobalSettings* create(QQmlEngine * /*unused*/, QJSEngine * /*unused*/)
+
80 {
+ +
82 }
83
-
84 //
-
85 // Properties
-
86 //
-
87
- -
90
-
91
- -
99
- -
107
-
112 Q_PROPERTY(Units::Distance airspaceAltitudeLimit_min MEMBER airspaceAltitudeLimit_min CONSTANT)
-
113
-
118 Q_PROPERTY(Units::Distance airspaceAltitudeLimit_max MEMBER airspaceAltitudeLimit_max CONSTANT)
-
119
- -
122
-
127 Q_PROPERTY(int fontSize READ fontSize WRITE setFontSize NOTIFY fontSizeChanged)
-
128
- -
131
- -
134
- -
137
- -
144
- -
151
- -
154
-
156 Q_PROPERTY(bool nightMode READ nightMode WRITE setNightMode NOTIFY nightModeChanged)
-
157
-
163 Q_PROPERTY(Units::ByteSize privacyHash READ privacyHash WRITE setPrivacyHash NOTIFY privacyHashChanged)
-
164
- -
167
- -
170
- -
177
+
84
+
85 //
+
86 // Properties
+
87 //
+
88
+ +
91
+
92
+ +
100
+ +
108
+
113 Q_PROPERTY(Units::Distance airspaceAltitudeLimit_min MEMBER airspaceAltitudeLimit_min CONSTANT)
+
114
+
119 Q_PROPERTY(Units::Distance airspaceAltitudeLimit_max MEMBER airspaceAltitudeLimit_max CONSTANT)
+
120
+ +
123
+
128 Q_PROPERTY(int fontSize READ fontSize WRITE setFontSize NOTIFY fontSizeChanged)
+
129
+ +
132
+ +
135
+ +
138
+ +
145
+ +
152
+ +
155
+
157 Q_PROPERTY(bool nightMode READ nightMode WRITE setNightMode NOTIFY nightModeChanged)
+
158
+ +
161
+
167 Q_PROPERTY(Units::ByteSize privacyHash READ privacyHash WRITE setPrivacyHash NOTIFY privacyHashChanged)
+
168
+ +
171
+
178
-
179 //
-
180 // Getter Methods
-
181 //
-
182
-
187 [[nodiscard]] auto acceptedTerms() const -> int { return settings.value(QStringLiteral("acceptedTerms"), 0).toInt(); }
-
188
-
193 [[nodiscard]] bool alwaysOpenExternalWebsites() const { return settings.value(QStringLiteral("alwaysOpenExternalWebsites"), false).toBool(); }
-
194
-
199 [[nodiscard]] auto airspaceAltitudeLimit() const -> Units::Distance;
-
200
-
205 [[nodiscard]] bool expandNotamAbbreviations() const { return settings.value(QStringLiteral("expandNotamAbbreviations"), false).toBool(); }
-
206
-
211 [[nodiscard]] auto fontSize() const -> int;
-
212
-
217 [[nodiscard]] auto hideGlidingSectors() const -> bool { return settings.value(QStringLiteral("Map/hideGlidingSectors"), true).toBool(); }
-
218
-
223 [[nodiscard]] auto ignoreSSLProblems() const -> bool { return settings.value(QStringLiteral("ignoreSSLProblems"), false).toBool(); }
-
224
-
229 [[nodiscard]] auto lastValidAirspaceAltitudeLimit() const -> Units::Distance;
-
230
-
-
235 [[nodiscard]] auto lastWhatsNewHash() const -> Units::ByteSize
-
236 {
-
237 return settings.value(QStringLiteral("lastWhatsNewHash"), 0).value<size_t>();
-
238 }
+
179
+
180 //
+
181 // Getter Methods
+
182 //
+
183
+
188 [[nodiscard]] auto acceptedTerms() const -> int { return m_settings.value(QStringLiteral("acceptedTerms"), 0).toInt(); }
+
189
+
194 [[nodiscard]] bool alwaysOpenExternalWebsites() const { return m_settings.value(QStringLiteral("alwaysOpenExternalWebsites"), false).toBool(); }
+
195
+
200 [[nodiscard]] auto airspaceAltitudeLimit() const -> Units::Distance;
+
201
+
206 [[nodiscard]] bool expandNotamAbbreviations() const { return m_settings.value(QStringLiteral("expandNotamAbbreviations"), false).toBool(); }
+
207
+
212 [[nodiscard]] auto fontSize() const -> int;
+
213
+
218 [[nodiscard]] auto hideGlidingSectors() const -> bool { return m_settings.value(QStringLiteral("Map/hideGlidingSectors"), true).toBool(); }
+
219
+
224 [[nodiscard]] auto ignoreSSLProblems() const -> bool { return m_settings.value(QStringLiteral("ignoreSSLProblems"), false).toBool(); }
+
225
+
230 [[nodiscard]] auto lastValidAirspaceAltitudeLimit() const -> Units::Distance;
+
231
+
+
236 [[nodiscard]] auto lastWhatsNewHash() const -> Units::ByteSize
+
237 {
+
238 return m_settings.value(QStringLiteral("lastWhatsNewHash"), 0).value<size_t>();
+
239 }
-
239
-
-
244 [[nodiscard]] auto lastWhatsNewInMapsHash() const -> Units::ByteSize
-
245 {
-
246 return settings.value(QStringLiteral("lastWhatsNewInMapsHash"), 0).value<size_t>();
-
247 }
+
240
+
+
245 [[nodiscard]] auto lastWhatsNewInMapsHash() const -> Units::ByteSize
+
246 {
+
247 return m_settings.value(QStringLiteral("lastWhatsNewInMapsHash"), 0).value<size_t>();
+
248 }
-
248
-
253 [[nodiscard]] auto mapBearingPolicy() const -> MapBearingPolicy;
-
254
-
259 [[nodiscard]] auto nightMode() const -> bool { return settings.value(QStringLiteral("Map/nightMode"), false).toBool(); }
-
260
-
265 [[nodiscard]] auto positioningByTrafficDataReceiver() const -> bool { return settings.value(QStringLiteral("positioningByTrafficDataReceiver"), false).toBool(); }
-
266
-
271 [[nodiscard]] auto privacyHash() const -> Units::ByteSize { return settings.value(QStringLiteral("privacyHash"), 0).value<size_t>(); }
-
272
-
277 [[nodiscard]] auto showAltitudeAGL() const -> bool { return settings.value(QStringLiteral("showAltitudeAGL"), false).toBool(); }
-
278
-
-
283 [[nodiscard]] auto voiceNotifications() const -> uint
-
284 {
-
285 return settings.value(QStringLiteral("voiceNotifications"),
- - - - -
290 }
+
249
+
254 [[nodiscard]] auto mapBearingPolicy() const -> MapBearingPolicy;
+
255
+
260 [[nodiscard]] auto nightMode() const -> bool { return m_settings.value(QStringLiteral("Map/nightMode"), false).toBool(); }
+
261
+
266 [[nodiscard]] bool positioningByTrafficDataReceiver() const { return m_positioningByTrafficDataReceiver.value(); }
+
267
+
272 [[nodiscard]] QBindable<bool> bindablePositioningByTrafficDataReceiver() const { return &m_positioningByTrafficDataReceiver; }
+
273
+
278 [[nodiscard]] auto privacyHash() const -> Units::ByteSize { return m_settings.value(QStringLiteral("privacyHash"), 0).value<size_t>(); }
+
279
+
284 [[nodiscard]] auto showAltitudeAGL() const -> bool { return m_settings.value(QStringLiteral("showAltitudeAGL"), false).toBool(); }
+
285
+
+
290 [[nodiscard]] auto voiceNotifications() const -> uint
+
291 {
+
292 return m_settings.value(QStringLiteral("voiceNotifications"),
+ + + + +
297 }
-
291
-
292
-
293 //
-
294 // Setter Methods
-
295 //
-
296
-
301 void setAcceptedTerms(int terms);
-
302
-
307 void setAlwaysOpenExternalWebsites(bool alwaysOpen);
-
308
-
317 void setAirspaceAltitudeLimit(Units::Distance newAirspaceAltitudeLimit);
-
318
-
323 void setExpandNotamAbbreviations(bool newExpandNotamAbbreviations);
-
324
-
329 void setHideGlidingSectors(bool hide);
-
330
-
335 void setFontSize(int newFontSize);
-
336
-
341 void setIgnoreSSLProblems(bool ignore);
-
342
-
347 void setLargeFonts(bool newLargeFonts);
-
348
- -
354
- -
360
- -
366
-
371 void setNightMode(bool newNightMode);
-
372
-
377 void setPositioningByTrafficDataReceiver(bool newPositioningByTrafficDataReceiver);
-
378
- -
384
-
389 void setShowAltitudeAGL(bool newShowAltitudeAGL);
-
390
-
395 void setVoiceNotifications(uint newVoiceNotifications);
-
396
+
298
+
299
+
300 //
+
301 // Setter Methods
+
302 //
+
303
+
308 void setAcceptedTerms(int terms);
+
309
+
314 void setAlwaysOpenExternalWebsites(bool alwaysOpen);
+
315
+
324 void setAirspaceAltitudeLimit(Units::Distance newAirspaceAltitudeLimit);
+
325
+
330 void setExpandNotamAbbreviations(bool newExpandNotamAbbreviations);
+
331
+
336 void setHideGlidingSectors(bool hide);
+
337
+
342 void setFontSize(int newFontSize);
+
343
+
348 void setIgnoreSSLProblems(bool ignore);
+
349
+
354 void setLargeFonts(bool newLargeFonts);
+
355
+ +
361
+ +
367
+ +
373
+
378 void setNightMode(bool newNightMode);
+
379
+
384 void setPositioningByTrafficDataReceiver(bool newPositioningByTrafficDataReceiver);
+
385
+ +
391
+
396 void setShowAltitudeAGL(bool newShowAltitudeAGL);
397
-
398 //
-
399 // Constants
-
400 //
-
401
- - +
402 void setVoiceNotifications(uint newVoiceNotifications);
+
403
404
-
405signals:
- +
405 //
+
406 // Constants
+
407 //
408
- + +
411
- -
414
- -
417
- -
420
- -
423
- -
426
- -
429
- -
432
- -
435
- -
438
- -
441
- -
444
- -
447
- -
450
- -
453
-
454private:
-
455 Q_DISABLE_COPY_MOVE(GlobalSettings)
-
456
-
457 QSettings settings;
-
458};
+
412signals:
+ +
415
+ +
418
+ +
421
+ +
424
+ +
427
+ +
430
+ +
433
+ +
436
+ +
439
+ +
442
+ +
445
+ +
448
+ +
451
+ +
454
+ +
457
+
458private:
+
459 Q_DISABLE_COPY_MOVE(GlobalSettings)
+
460
+
461 QSettings m_settings;
+
462
+
463 QProperty<bool> m_positioningByTrafficDataReceiver;
+
464};
static Q_INVOKABLE GlobalSettings * globalSettings()
Pointer to appplication-wide static Settings instance.
-
Global Settings Manager.
+
Global Settings Manager.
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.
+
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.
+
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.
-
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.
+
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.
+
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.
+
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.
+
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.
- - - +
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.
+
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 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.
+
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.
-
auto positioningByTrafficDataReceiver() const -> bool
Getter function for property of the same name.
-
bool hideGlidingSectors
Hide gliding sectors.
+
bool hideGlidingSectors
Hide gliding sectors.
void expandNotamAbbreviationsChanged()
Notifier signal.
-
void positioningByTrafficDataReceiverChanged()
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.
-
int fontSize
Font size.
+
int fontSize
Font size.
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.
+
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.
+
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.
+
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".
diff --git a/APIdoc/html/PositionInfoSource__Abstract_8h_source.html b/APIdoc/html/PositionInfoSource__Abstract_8h_source.html index 610d40233..a1a543c64 100644 --- a/APIdoc/html/PositionInfoSource__Abstract_8h_source.html +++ b/APIdoc/html/PositionInfoSource__Abstract_8h_source.html @@ -62,7 +62,7 @@
1/***************************************************************************
-
2 * Copyright (C) 2021-2023 by Stefan Kebekus *
+
2 * Copyright (C) 2021-2024 by Stefan Kebekus *
3 * stefan.kebekus@gmail.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
@@ -84,148 +84,123 @@
21#pragma once
22
23#include <QGeoPositionInfo>
-
24#include <QTimer>
-
25
-
26#include "positioning/PositionInfo.h"
-
27#include "units/Distance.h"
+
24#include <QProperty>
+
25#include <QTimer>
+
26
+
27#include "positioning/PositionInfo.h"
28
29
30namespace Positioning {
31
-
-
43class PositionInfoSource_Abstract : public QObject {
-
44 Q_OBJECT
-
45
-
46public:
-
51 explicit PositionInfoSource_Abstract(QObject *parent = nullptr);
-
52
-
53
+
+
40class PositionInfoSource_Abstract : public QObject {
+
41 Q_OBJECT
+
42
+
43public:
+
48 explicit PositionInfoSource_Abstract(QObject *parent = nullptr);
+
49
+
50
+
51 //
+
52 // Properties
+
53 //
54
-
55 //
-
56 // Properties
-
57 //
-
58
- -
70
-
71
-
-
75 [[nodiscard]] auto positionInfo() const -> Positioning::PositionInfo
-
76 {
-
77 return m_positionInfo;
-
78 }
-
+ +
63
+
64
+ +
71
+
78 Q_PROPERTY(QString sourceName READ sourceName BINDABLE bindableSourceName)
79
- -
89
-
90
-
-
94 [[nodiscard]] auto pressureAltitude() const -> Units::Distance
-
95 {
-
96 return m_pressureAltitude;
-
97 }
+
86 Q_PROPERTY(QString statusString READ statusString BINDABLE bindableStatusString)
+
87
+
88
+
89 //
+
90 // Getter Methods
+
91 //
+
92
+
+
97 [[nodiscard]] Positioning::PositionInfo positionInfo() const
+
98 {
+
99 return m_positionInfo.value();
+
100 }
+
+
101
+
+
106 [[nodiscard]] QBindable<Positioning::PositionInfo> bindablePositionInfo() const
+
107 {
+
108 return &m_positionInfo;
+
109 }
+
+
110
+
115 [[nodiscard]] bool receivingPositionInfo() const {return m_receivingPositionInfo.value();}
+
116
+
121 [[nodiscard]] QBindable<bool> bindableReceivingPositionInfo() {return &m_receivingPositionInfo;}
+
122
+
+
127 [[nodiscard]] QString sourceName() const
+
128 {
+
129 return m_sourceName.value();
+
130 }
-
98
- -
104
-
105
-
-
109 [[nodiscard]] auto receivingPositionInfo() const -> bool
-
110 {
-
111 return _receivingPositionInfo;
-
112 }
+
131
+
+
136 [[nodiscard]] QBindable<QString> bindableSourceName() const
+
137 {
+
138 return &m_sourceName;
+
139 }
-
113
-
120 Q_PROPERTY(QString sourceName READ sourceName NOTIFY sourceNameChanged)
-
121
-
122
-
-
126 [[nodiscard]] auto sourceName() const -> QString
-
127 {
-
128 return m_sourceName;
-
129 }
+
140
+
+
145 [[nodiscard]] QString statusString() const
+
146 {
+
147 return m_statusString.value();
+
148 }
-
130
-
137 Q_PROPERTY(QString statusString READ statusString NOTIFY statusStringChanged)
-
138
-
139
-
-
143 [[nodiscard]] auto statusString() const -> QString
-
144 {
-
145 return m_statusString;
-
146 }
+
149
+
+
154 [[nodiscard]] QBindable<QString> bindableStatusString() const
+
155 {
+
156 return &m_statusString;
+
157 }
-
147
-
148signals:
- -
151
- -
154
- -
157
-
159 void sourceNameChanged(const QString &name);
-
160
-
162 void statusStringChanged(const QString &status);
-
163
-
164protected:
-
165 // This method must be used by child classes to update the position info.
-
166 // The class uses a timer internally to reset the position info to "invalid"
-
167 // after the time specified in PositionInfo::lifetime seconds. It also
-
168 // updates the property receivingPositionInfo.
-
169 void setPositionInfo(const Positioning::PositionInfo &info);
+
158
+
159protected:
+
160 // This method must be used by child classes to update the position info.
+
161 // The class uses a timer internally to reset the position info to "invalid"
+
162 // after the time specified in PositionInfo::lifetime seconds. It also
+
163 // updates the property receivingPositionInfo.
+
164 void setPositionInfo(const Positioning::PositionInfo& info);
+
165
+
166 // This method must be used by child classes to update the source name
+
167 void setSourceName(const QString& name) {m_sourceName = name;}
+
168
+
169 QProperty<QString> m_statusString;
170
-
171 // This method must be used by child classes to update the pressure altitude
-
172 // The class uses a timer internally to reset the position info to "invalid"
-
173 // after the time specified in PositionInfo::lifetime seconds.
-
174 void setPressureAltitude(Units::Distance newPressureAltitude);
-
175
-
176 // This method must be used by child classes to update the source name
-
177 void setSourceName(const QString &name);
-
178
-
179 // This method must be used by child classes to update the status string
-
180 void setStatusString(const QString &status);
-
181
-
182private:
-
183 // Resets the position info to "invalid"
-
184 void resetPositionInfo();
-
185
-
186 // Resets the pressure altitude to "invalid"
-
187 void resetPressureAltitude();
-
188
-
189 Units::Distance m_pressureAltitude {};
-
190 QTimer m_pressureAltitudeTimer;
-
191
-
192 Positioning::PositionInfo m_positionInfo;
-
193 QTimer m_positionInfoTimer;
-
194
-
195 QString m_sourceName;
-
196 QString m_statusString;
-
197
-
198 bool _receivingPositionInfo{false};
-
199};
+
171private:
+
172 QProperty<Positioning::PositionInfo> m_positionInfo;
+
173 QTimer m_positionInfoTimer;
+
174
+
175 QProperty<bool> m_receivingPositionInfo {false};
+
176 QProperty<QString> m_sourceName;
+
177};
-
200
-
201} // namespace Positioning
-
Abstract base class for all classes that provide geographic position information.
-
Positioning::PositionInfo positionInfo
Position information.
-
bool receivingPositionInfo
Indicator that position information is being received.
+
178
+
179} // namespace Positioning
+
Abstract base class for all classes that provide geographic position information.
+
Positioning::PositionInfo positionInfo
Position information.
+
QBindable< QString > bindableSourceName() const
Getter method for property with the same name.
+
QBindable< bool > bindableReceivingPositionInfo()
Getter method for property with the same name.
+
bool receivingPositionInfo
Indicator that position information is being received.
PositionInfoSource_Abstract(QObject *parent=nullptr)
Default constructor.
- - -
auto pressureAltitude() const -> Units::Distance
Getter method for property with the same name.
-
void statusStringChanged(const QString &status)
Notifier signal.
-
auto receivingPositionInfo() const -> bool
Getter method for property with the same name.
-
auto positionInfo() const -> Positioning::PositionInfo
Getter method for property with the same name.
-
Units::Distance pressureAltitude
Pressure altitude.
-
void pressureAltitudeChanged()
Notifier signal.
-
auto sourceName() const -> QString
Getter method for property with the same name.
-
auto statusString() const -> QString
Getter method for property with the same name.
-
void positionInfoChanged()
Notifier signal.
-
void receivingPositionInfoChanged()
Notifier signal.
-
void sourceNameChanged(const QString &name)
Notifier signal.
+ + +
QString sourceName() const
Getter method for property with the same name.
+
QBindable< Positioning::PositionInfo > bindablePositionInfo() const
Getter method for property with the same name.
+
bool receivingPositionInfo() const
Getter method for property with the same name.
+
QString statusString() const
Getter method for property with the same name.
+
QBindable< QString > bindableStatusString() const
Getter method for property with the same name.
Geographic position.
-
Convenience class for distance computations.
Definition Distance.h:35
-
Conversion between units used in aviation.
Definition Angle.h:34
71
72} // namespace Positioning
-
Abstract base class for all classes that provide geographic position information.
+
Abstract base class for all classes that provide geographic position information.
PositionInfoSource_Satellite(QObject *parent=nullptr)
Standard constructor.
diff --git a/APIdoc/html/PositionInfo_8h_source.html b/APIdoc/html/PositionInfo_8h_source.html index 556b0a7c3..8b3810011 100644 --- a/APIdoc/html/PositionInfo_8h_source.html +++ b/APIdoc/html/PositionInfo_8h_source.html @@ -85,7 +85,7 @@
22
23#include <QGeoPositionInfo>
24#include <QQmlEngine>
-
25#include <chrono>
+
25//#include <chrono>
26
27#include "units/Angle.h"
28#include "units/Distance.h"
@@ -105,98 +105,102 @@
49public:
51 PositionInfo() = default;
52
-
57 explicit PositionInfo(const QGeoPositionInfo &info);
-
58
-
-
66 [[nodiscard]] Q_INVOKABLE QGeoCoordinate coordinate() const
-
67 {
-
68 return m_positionInfo.coordinate();
-
69 }
+
59 explicit PositionInfo(const QGeoPositionInfo& info, const QString& source);
+
60
+
+
68 [[nodiscard]] Q_INVOKABLE QGeoCoordinate coordinate() const
+
69 {
+
70 return m_positionInfo.coordinate();
+
71 }
-
70
-
75 [[nodiscard]] Q_INVOKABLE Units::Speed groundSpeed() const;
-
76
-
82 [[nodiscard]] Q_INVOKABLE bool isValid() const;
-
83
-
88 [[nodiscard]] Q_INVOKABLE Units::Distance positionErrorEstimate() const;
-
89
-
95 [[nodiscard]] Q_INVOKABLE Units::Distance terrainElevationAMSL();
-
96
-
-
101 [[nodiscard]] Q_INVOKABLE QDateTime timestamp() const
-
102 {
-
103 return m_positionInfo.timestamp().toUTC();
-
104 }
+
72
+
77 [[nodiscard]] Q_INVOKABLE Units::Speed groundSpeed() const;
+
78
+
84 [[nodiscard]] Q_INVOKABLE bool isValid() const;
+
85
+
90 [[nodiscard]] Q_INVOKABLE Units::Distance positionErrorEstimate() const;
+
91
+
96 [[nodiscard]] Q_INVOKABLE QString source() const {return m_source;}
+
97
+
103 [[nodiscard]] Q_INVOKABLE Units::Distance terrainElevationAMSL();
+
104
+
+
109 [[nodiscard]] Q_INVOKABLE QDateTime timestamp() const
+
110 {
+
111 return m_positionInfo.timestamp().toUTC();
+
112 }
-
105
-
-
110 [[nodiscard]] Q_INVOKABLE QString timestampString() const
-
111 {
-
112 return m_positionInfo.timestamp().toUTC().time().toString(QStringLiteral("HH:mm:ss"))+ " UTC";
-
113 }
+
113
+
+
118 [[nodiscard]] Q_INVOKABLE QString timestampString() const
+
119 {
+
120 return m_positionInfo.timestamp().toUTC().time().toString(QStringLiteral("HH:mm:ss"))+ " UTC";
+
121 }
-
114
-
120 [[nodiscard]] Q_INVOKABLE Units::Distance trueAltitudeAGL();
-
121
-
127 [[nodiscard]] Q_INVOKABLE Units::Distance trueAltitudeAMSL() const;
-
128
-
133 [[nodiscard]] Q_INVOKABLE Units::Distance trueAltitudeErrorEstimate() const;
-
134
-
139 [[nodiscard]] Q_INVOKABLE Units::Angle trueTrack() const;
-
140
-
145 [[nodiscard]] Q_INVOKABLE Units::Angle trueTrackErrorEstimate() const;
-
146
-
151 [[nodiscard]] Q_INVOKABLE Units::Angle variation() const;
-
152
-
157 [[nodiscard]] Q_INVOKABLE Units::Speed verticalSpeed() const;
-
158
-
-
165 Q_INVOKABLE bool operator==(const Positioning::PositionInfo &rhs) const
-
166 {
-
167 return (m_positionInfo == rhs.m_positionInfo);
-
168 }
+
122
+
128 [[nodiscard]] Q_INVOKABLE Units::Distance trueAltitudeAGL();
+
129
+
135 [[nodiscard]] Q_INVOKABLE Units::Distance trueAltitudeAMSL() const;
+
136
+
141 [[nodiscard]] Q_INVOKABLE Units::Distance trueAltitudeErrorEstimate() const;
+
142
+
147 [[nodiscard]] Q_INVOKABLE Units::Angle trueTrack() const;
+
148
+
153 [[nodiscard]] Q_INVOKABLE Units::Angle trueTrackErrorEstimate() const;
+
154
+
159 [[nodiscard]] Q_INVOKABLE Units::Angle variation() const;
+
160
+
165 [[nodiscard]] Q_INVOKABLE Units::Speed verticalSpeed() const;
+
166
+
+
173 Q_INVOKABLE bool operator==(const Positioning::PositionInfo &rhs) const
+
174 {
+
175 return (m_positionInfo == rhs.m_positionInfo);
+
176 }
-
169
-
-
171 operator QGeoPositionInfo() const
-
172 {
-
173 return m_positionInfo;
-
174 }
+
177
+
+
179 operator QGeoPositionInfo() const
+
180 {
+
181 return m_positionInfo;
+
182 }
-
175
-
181#if defined(Q_OS_ANDROID) or defined(Q_OS_IOS)
-
182 static constexpr auto lifetime = 20s;
-
183#else
-
184 static constexpr auto lifetime = 20min;
-
185#endif
-
186
-
187
-
188private:
-
189 QGeoPositionInfo m_positionInfo;
-
190 Units::Distance m_terrainAMSL{};
-
191 Units::Distance m_trueAltitudeAGL {};
-
192};
-
-
193
-
194} // namespace Positioning
+
183
+
189#if defined(Q_OS_ANDROID) or defined(Q_OS_IOS)
+
190 static constexpr auto lifetime = 20s;
+
191#else
+
192 static constexpr auto lifetime = 20min;
+
193#endif
+
194
195
-
196Q_DECLARE_METATYPE(Positioning::PositionInfo)
+
196private:
+
197 QGeoPositionInfo m_positionInfo;
+
198 QString m_source;
+
199 Units::Distance m_terrainAMSL;
+
200 Units::Distance m_trueAltitudeAGL;
+
201};
+
+
202
+
203} // namespace Positioning
+
204
+
205Q_DECLARE_METATYPE(Positioning::PositionInfo)
Geographic position.
+
PositionInfo(const QGeoPositionInfo &info, const QString &source)
Constructor.
Q_INVOKABLE Units::Distance positionErrorEstimate() const
Position error estimate.
Q_INVOKABLE Units::Angle trueTrack() const
True track.
-
PositionInfo(const QGeoPositionInfo &info)
Constructor.
Q_INVOKABLE Units::Distance trueAltitudeErrorEstimate() const
True altitude error estimate.
-
static constexpr auto lifetime
Liftetime of geographic positioning information.
+
static constexpr auto lifetime
Liftetime of geographic positioning information.
Q_INVOKABLE Units::Angle variation() const
Magnetic variation.
-
Q_INVOKABLE QGeoCoordinate coordinate() const
Coordinate.
-
Q_INVOKABLE bool operator==(const Positioning::PositionInfo &rhs) const
Comparison: equal.
+
Q_INVOKABLE QString source() const
Name of source, as set in the constructor.
+
Q_INVOKABLE QGeoCoordinate coordinate() const
Coordinate.
+
Q_INVOKABLE bool operator==(const Positioning::PositionInfo &rhs) const
Comparison: equal.
Q_INVOKABLE bool isValid() const
Validity.
Q_INVOKABLE Units::Distance trueAltitudeAMSL() const
True Altitude above main sea level.
PositionInfo()=default
Default Constructor.
Q_INVOKABLE Units::Angle trueTrackErrorEstimate() const
True track error estimate.
-
Q_INVOKABLE QString timestampString() const
Timestamp string.
+
Q_INVOKABLE QString timestampString() const
Timestamp string.
Q_INVOKABLE Units::Speed groundSpeed() const
Ground speed.
-
Q_INVOKABLE QDateTime timestamp() const
Timestamp.
+
Q_INVOKABLE QDateTime timestamp() const
Timestamp.
Q_INVOKABLE Units::Speed verticalSpeed() const
Vertical speed.
Q_INVOKABLE Units::Distance terrainElevationAMSL()
Elevation of terrain at a given coordinate, above sea level.
Q_INVOKABLE Units::Distance trueAltitudeAGL()
True Altitude above ground level.
diff --git a/APIdoc/html/PositionProvider_8h_source.html b/APIdoc/html/PositionProvider_8h_source.html index b796eee74..98b2ade17 100644 --- a/APIdoc/html/PositionProvider_8h_source.html +++ b/APIdoc/html/PositionProvider_8h_source.html @@ -87,145 +87,183 @@
24#include <QQmlEngine>
25
26#include "GlobalObject.h"
-
27#include "positioning/PositionInfoSource_Abstract.h"
-
28#include "positioning/PositionInfoSource_Satellite.h"
+
27#include "positioning/PositionInfoSource_Satellite.h"
+
28
29
-
30
-
31namespace Positioning {
-
32
-
- -
50{
-
51 Q_OBJECT
-
52 QML_ELEMENT
-
53 QML_SINGLETON
+
30namespace Positioning {
+
31
+
+
48class PositionProvider : public QObject
+
49{
+
50 Q_OBJECT
+
51 QML_ELEMENT
+
52 QML_SINGLETON
+
53
54
-
55 // Repeat properties from PositionInfoSource_Abstract so qmllint knows about them
-
56 Q_PROPERTY(Positioning::PositionInfo positionInfo READ positionInfo NOTIFY positionInfoChanged)
-
57 Q_PROPERTY(Units::Distance pressureAltitude READ pressureAltitude NOTIFY pressureAltitudeChanged)
-
58 Q_PROPERTY(bool receivingPositionInfo READ receivingPositionInfo NOTIFY receivingPositionInfoChanged)
-
59
-
60
-
61public:
-
66 explicit PositionProvider(QObject* parent = nullptr);
+
55public:
+
60 explicit PositionProvider(QObject* parent = nullptr);
+
61
+
62 // No default constructor, important for QML singleton
+
63 explicit PositionProvider() = delete;
+
64
+
66 ~PositionProvider() override = default;
67
-
68 // No default constructor, important for QML singleton
-
69 explicit PositionProvider() = delete;
-
70
-
72 ~PositionProvider() override = default;
-
73
+
68
+
69 // factory function for QML singleton
+
70 static Positioning::PositionProvider* create(QQmlEngine* /*unused*/, QJSEngine* /*unused*/)
+
71 {
+ +
73 }
74
-
75 // factory function for QML singleton
-
76 static Positioning::PositionProvider* create(QQmlEngine* /*unused*/, QJSEngine* /*unused*/)
-
77 {
- -
79 }
-
80
-
81
-
82 //
-
83 // PROPERTIES
-
84 //
-
85
-
91 Q_PROPERTY(QGeoCoordinate approximateLastValidCoordinate READ approximateLastValidCoordinate BINDABLE bindableApproximateLastValidCoordinate)
-
92
-
93
- -
101
-
108 Q_PROPERTY(Units::Angle lastValidTT READ lastValidTT NOTIFY lastValidTTChanged)
-
109
-
110
-
111 //
-
112 // Getter Methods
-
113 //
-
114
-
119 Q_REQUIRED_RESULT QGeoCoordinate approximateLastValidCoordinate() const {return {m_approximateLastValidCoordinate};}
-
120 Q_REQUIRED_RESULT QBindable<QGeoCoordinate> bindableApproximateLastValidCoordinate() const {return &m_approximateLastValidCoordinate;}
-
121
-
126 static QGeoCoordinate lastValidCoordinate();
-
127
- +
75
+
76 //
+
77 // PROPERTIES
+
78 //
+
79
+ +
86
+
87
+ +
95
+
102 Q_PROPERTY(Units::Angle lastValidTT READ lastValidTT BINDABLE bindableLastValidTT)
+
103
+
111 Q_PROPERTY(Positioning::PositionInfo positionInfo READ positionInfo BINDABLE bindablePositionInfo NOTIFY positionInfoChanged)
+
112
+ +
120
+
127 Q_PROPERTY(QString statusString READ statusString BINDABLE bindableStatusString)
+
128
+
129
+
130 //
+
131 // Getter Methods
+
132 //
133
-
134
-
135 //
-
136 // Methods
-
137 //
-
138
-
145 Q_INVOKABLE void startUpdates() { satelliteSource.startUpdates(); }
-
146
-
147signals:
- -
150
- -
153
-
155 void lastValidCoordinateChanged(QGeoCoordinate);
-
156
-
157private slots:
-
158 // Intializations that are moved out of the constructor, in order to avoid
-
159 // nested uses of constructors in Global.
-
160 void deferredInitialization() const;
-
161
-
162 // Connected to sources, in order to receive new data
-
163 void onPositionUpdated();
-
164
-
165 // Connected to sources, in order to receive new data
-
166 void onPressureAltitudeUpdated();
-
167
-
168 // Saves last valid position and track
-
169 void savePositionAndTrack();
-
170
-
171 // Setter method for property with the same name
-
172 void setLastValidCoordinate(const QGeoCoordinate &newCoordinate);
-
173
-
174 // Setter method for property with the same name
-
175 void setLastValidTT(Units::Angle newTT);
-
176
-
177 // Setter method for property with the same name
-
178 void updateStatusString();
-
179
-
180private:
-
181 Q_DISABLE_COPY_MOVE(PositionProvider)
-
182
-
183 // Aircraft is considered flying if speed is at least this high
-
184 static constexpr double minFlightSpeedInKT = 30.0;
-
185 // Hysteresis for flight speed
-
186 static constexpr double flightSpeedHysteresis = 5.0;
+
138 [[nodiscard]] QGeoCoordinate approximateLastValidCoordinate() const {return m_approximateLastValidCoordinate.value();}
+
139
+
144 [[nodiscard]] QBindable<QGeoCoordinate> bindableApproximateLastValidCoordinate() const {return &m_approximateLastValidCoordinate;}
+
145
+
150 [[nodiscard]] static QGeoCoordinate lastValidCoordinate();
+
151
+
156 [[nodiscard]] QBindable<QGeoCoordinate> bindableLastValidCoordinate() {return &m_lastValidCoordinate;}
+
157
+
162 [[nodiscard]] static Units::Angle lastValidTT();
+
163
+
168 [[nodiscard]] QBindable<Units::Angle> bindableLastValidTT() {return &m_lastValidTT;}
+
169
+
174 [[nodiscard]] Positioning::PositionInfo positionInfo() const {return m_positionInfo.value();}
+
175
+
180 [[nodiscard]] QBindable<Positioning::PositionInfo> bindablePositionInfo() const {return &m_positionInfo;}
+
181
+
186 [[nodiscard]] bool receivingPositionInfo() const {return m_receivingPositionInfo.value();}
187
-
188 // Coordinates of EDTF airfield
-
189 static constexpr double EDTF_lat = 48.022653;
-
190 static constexpr double EDTF_lon = 7.832583;
-
191 static constexpr double EDTF_ele = 244;
-
192
-
193 PositionInfoSource_Satellite satelliteSource;
-
194
-
195 Q_OBJECT_BINDABLE_PROPERTY(PositionProvider, QGeoCoordinate, m_approximateLastValidCoordinate, &Positioning::PositionProvider::approximateLastValidCoordinateChanged)
-
196 QProperty<QGeoCoordinate> m_lastValidCoordinate {QGeoCoordinate(EDTF_lat, EDTF_lon, EDTF_ele)};
-
197 Units::Angle m_lastValidTT {};
-
198};
+
192 [[nodiscard]] QBindable<bool> bindableReceivingPositionInfo() {return &m_receivingPositionInfo;}
+
193
+
+
198 [[nodiscard]] QString statusString() const
+
199 {
+
200 return m_statusString.value();
+
201 }
-
199
-
200} // namespace Positioning
+
202
+
+
207 [[nodiscard]] QBindable<QString> bindableStatusString() const
+
208 {
+
209 return &m_statusString;
+
210 }
+
+
211
+
212
+
213
+
214 //
+
215 // Methods
+
216 //
+
217
+
224 Q_INVOKABLE void startUpdates() { satelliteSource.startUpdates(); }
+
225
+
226signals:
+
227 // Notifier signal
+
228 void approximateLastValidCoordinateChanged();
+
229
+
230 // Notifier signal
+
231 void positionInfoChanged();
+
232
+
233 // Notifier signal
+
234 void receivingPositionInfoChanged();
+
235
+
236private slots:
+
237 // Intializations that are moved out of the constructor, in order to avoid
+
238 // nested uses of constructors in Global.
+
239 void deferredInitialization();
+
240
+
241 // Saves last valid position and track
+
242 void savePositionAndTrack();
+
243
+
244private:
+
245 Q_DISABLE_COPY_MOVE(PositionProvider)
+
246
+
247 // Computation method for property with the same name
+
248 QString computeStatusString();
+
249
+
250 // Aircraft is considered flying if speed is at least this high
+
251 static constexpr double minFlightSpeedInKT = 30.0;
+
252 // Hysteresis for flight speed
+
253 static constexpr double flightSpeedHysteresis = 5.0;
+
254
+
255 // Coordinates of EDTF airfield
+
256 static constexpr double EDTF_lat = 48.022653;
+
257 static constexpr double EDTF_lon = 7.832583;
+
258 static constexpr double EDTF_ele = 244;
+
259
+
260 PositionInfoSource_Satellite satelliteSource;
+
261
+
262 // The incoming position info is set by a binding that monitors
+
263 // the satelliteSource and the TrafficDataSource
+
264 QProperty<Positioning::PositionInfo> m_incomingPositionInfo;
+
265 Positioning::PositionInfo computeIncomingPositionInfo();
+
266
+
267 // This method updates m_approximateLastValidCoordinate, m_lastValidCoordinate and m_lastValidTT
+
268 // whenever m_incomingPositionInfo changes.
+
269 void onIncomingPositionInfoUpdated();
+
270 QPropertyNotifier m_incomingPositionInfoNotifier;
+
271
+
272 Q_OBJECT_BINDABLE_PROPERTY(Positioning::PositionProvider, Positioning::PositionInfo, m_positionInfo, &Positioning::PositionProvider::positionInfoChanged);
+
273 Q_OBJECT_BINDABLE_PROPERTY(Positioning::PositionProvider, QGeoCoordinate, m_approximateLastValidCoordinate, &Positioning::PositionProvider::approximateLastValidCoordinateChanged);
+
274 QProperty<QGeoCoordinate> m_lastValidCoordinate {QGeoCoordinate(EDTF_lat, EDTF_lon, EDTF_ele)};
+
275 QProperty<Units::Angle> m_lastValidTT;
+
276
+
277 Q_OBJECT_BINDABLE_PROPERTY(Positioning::PositionProvider, bool, m_receivingPositionInfo, &Positioning::PositionProvider::receivingPositionInfoChanged);
+
278 QProperty<QString> m_statusString;
+
279
+
280};
+
+
281
+
282} // namespace Positioning
static Q_INVOKABLE Positioning::PositionProvider * positionProvider()
Pointer to appplication-wide static PositionProvider instance.
-
Abstract base class for all classes that provide geographic position information.
-
void pressureAltitudeChanged()
Notifier signal.
-
void positionInfoChanged()
Notifier signal.
-
void receivingPositionInfoChanged()
Notifier signal.
Geographic position.
-
Central Position Provider.
+
Central Position Provider.
+
QBindable< Positioning::PositionInfo > bindablePositionInfo() const
Getter method for property with the same name.
PositionProvider(QObject *parent=nullptr)
Standard constructor.
-
void lastValidTTChanged(Units::Angle)
Notifier signal.
-
Units::Angle lastValidTT
Last valid true track.
-
void lastValidCoordinateChanged(QGeoCoordinate)
Notifier signal.
-
void approximateLastValidCoordinateChanged()
Notifier signal.
+
Positioning::PositionInfo positionInfo() const
Getter method for property with the same name.
+
QString statusString() const
Getter method for property with the same name.
+
QBindable< QGeoCoordinate > bindableLastValidCoordinate()
Getter function for the property with the same name.
+
Units::Angle lastValidTT
Last valid true track.
+
QBindable< Units::Angle > bindableLastValidTT()
Getter function for the property with the same name.
static QGeoCoordinate lastValidCoordinate()
Getter function for the property with the same name.
-
QGeoCoordinate lastValidCoordinate
Last valid coordinate reading.
-
QGeoCoordinate approximateLastValidCoordinate
Approximate last valid coordinate.
+
QGeoCoordinate lastValidCoordinate
Last valid coordinate reading.
+
QBindable< QString > bindableStatusString() const
Getter method for property with the same name.
+
QGeoCoordinate approximateLastValidCoordinate
Approximate last valid coordinate.
+
Positioning::PositionInfo positionInfo
Position information.
~PositionProvider() override=default
Standard destructor.
static Units::Angle lastValidTT()
Getter function for the property with the same name.
-
Q_INVOKABLE void startUpdates()
startUpdates
+
QString statusString
Source status.
+
QBindable< bool > bindableReceivingPositionInfo()
Getter method for property with the same name.
+
bool receivingPositionInfo() const
Getter method for property with the same name.
+
QBindable< QGeoCoordinate > bindableApproximateLastValidCoordinate() const
Getter function for the property with the same name.
+
Q_INVOKABLE void startUpdates()
startUpdates
+
bool receivingPositionInfo
Indicator that position information is being received.
Convenience class for angle computations.
Definition Angle.h:41
-
Convenience class for distance computations.
Definition Distance.h:35
Conversion between units used in aviation.
Definition Angle.h:34
diff --git a/APIdoc/html/RemainingRouteInfo_8h_source.html b/APIdoc/html/RemainingRouteInfo_8h_source.html index 8d696c6dd..cfee0125a 100644 --- a/APIdoc/html/RemainingRouteInfo_8h_source.html +++ b/APIdoc/html/RemainingRouteInfo_8h_source.html @@ -232,7 +232,7 @@
Convenience class for angle computations.
Definition Angle.h:41
Convenience class for distance computations.
Definition Distance.h:35
Convenience class for time computations.
Definition Timespan.h:35
-
Q_INVOKABLE bool isFinite() const
Checks if the time is valid.
Definition Timespan.h:80
+
Q_INVOKABLE bool isFinite() const
Checks if the time is valid.
Definition Timespan.h:81
Conversion between units used in aviation.
Definition Angle.h:34
diff --git a/APIdoc/html/Timespan_8h_source.html b/APIdoc/html/Timespan_8h_source.html index 09fe5308f..2399788cb 100644 --- a/APIdoc/html/Timespan_8h_source.html +++ b/APIdoc/html/Timespan_8h_source.html @@ -62,7 +62,7 @@
1/***************************************************************************
-
2 * Copyright (C) 2019-2023 by Stefan Kebekus *
+
2 * Copyright (C) 2019-2024 by Stefan Kebekus *
3 * stefan.kebekus@gmail.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
@@ -105,93 +105,94 @@
51
-
58 static auto fromMS(double timeInMS) -> Timespan {
-
59 Timespan result;
-
60 result.m_timeInS = qRound(timeInMS/1000.0);
-
61 return result;
-
62 }
+
58 static Timespan fromMS(double timeInMS)
+
59 {
+
60 Timespan result;
+
61 result.m_timeInS = timeInMS/1000.0;
+
62 return result;
+
63 }
-
63
-
-
70 static auto fromS(double timeInS) -> Timespan {
-
71 Timespan result;
-
72 result.m_timeInS = timeInS;
-
73 return result;
-
74 }
+
64
+
+
71 static auto fromS(double timeInS) -> Timespan {
+
72 Timespan result;
+
73 result.m_timeInS = timeInS;
+
74 return result;
+
75 }
-
75
-
-
80 [[nodiscard]] Q_INVOKABLE bool isFinite() const
-
81 {
-
82 return std::isfinite(m_timeInS);
-
83 }
+
76
+
+
81 [[nodiscard]] Q_INVOKABLE bool isFinite() const
+
82 {
+
83 return std::isfinite(m_timeInS);
+
84 }
-
84
-
-
89 [[nodiscard]] Q_INVOKABLE bool isNegative() const
-
90 {
-
91 return m_timeInS < 0.0;
-
92 }
+
85
+
+
90 [[nodiscard]] Q_INVOKABLE bool isNegative() const
+
91 {
+
92 return m_timeInS < 0.0;
+
93 }
-
93
-
- -
101 {
-
102 m_timeInS += other.m_timeInS;
-
103 return *this;
-
104 }
+
94
+
+ +
102 {
+
103 m_timeInS += other.m_timeInS;
+
104 return *this;
+
105 }
-
105
-
112 [[nodiscard]] Q_INVOKABLE std::partial_ordering operator<=>(const Units::Timespan& rhs) const = default;
-
113
-
-
118 [[nodiscard]] Q_INVOKABLE double toS() const
-
119 {
-
120 return m_timeInS;
-
121 }
+
106
+
113 [[nodiscard]] Q_INVOKABLE std::partial_ordering operator<=>(const Units::Timespan& rhs) const = default;
+
114
+
+
119 [[nodiscard]] Q_INVOKABLE double toS() const
+
120 {
+
121 return m_timeInS;
+
122 }
-
122
-
-
127 [[nodiscard]] Q_INVOKABLE double toM() const
-
128 {
-
129 return m_timeInS / Seconds_per_Minute;
-
130 }
+
123
+
+
128 [[nodiscard]] Q_INVOKABLE double toM() const
+
129 {
+
130 return m_timeInS / Seconds_per_Minute;
+
131 }
-
131
-
-
136 [[nodiscard]] Q_INVOKABLE double toH() const
-
137 {
-
138 return m_timeInS / Seconds_per_Hour;
-
139 }
+
132
+
+
137 [[nodiscard]] Q_INVOKABLE double toH() const
+
138 {
+
139 return m_timeInS / Seconds_per_Hour;
+
140 }
-
140
-
145 [[nodiscard]] Q_INVOKABLE QString toHoursAndMinutes() const;
-
146
-
147 private:
-
148 static constexpr double Seconds_per_Minute = 60.0;
-
149 static constexpr double Seconds_per_Hour = 60.0 * 60.0;
-
150
-
151 // Speed in meters per second
-
152 double m_timeInS{qQNaN()};
-
153 };
+
141
+
146 [[nodiscard]] Q_INVOKABLE QString toHoursAndMinutes() const;
+
147
+
148 private:
+
149 static constexpr double Seconds_per_Minute = 60.0;
+
150 static constexpr double Seconds_per_Hour = 60.0 * 60.0;
+
151
+
152 // Speed in meters per second
+
153 double m_timeInS{qQNaN()};
+
154 };
-
154} // namespace Units
-
155
+
155} // namespace Units
156
-
157// Declare meta types
-
158Q_DECLARE_METATYPE(Units::Timespan)
+
157
+
158// Declare meta types
+
159Q_DECLARE_METATYPE(Units::Timespan)
Convenience class for time computations.
Definition Timespan.h:35
Q_INVOKABLE QString toHoursAndMinutes() const
Convert time to string.
-
Q_INVOKABLE Units::Timespan & operator+=(Units::Timespan other)
Add time to this time.
Definition Timespan.h:100
-
Q_INVOKABLE bool isNegative() const
Checks if the time is negative.
Definition Timespan.h:89
-
static auto fromMS(double timeInMS) -> Timespan
Constructs a time.
Definition Timespan.h:58
-
Q_INVOKABLE double toM() const
Convert time to minutes.
Definition Timespan.h:127
-
Q_INVOKABLE double toS() const
Convert time to seconds.
Definition Timespan.h:118
+
Q_INVOKABLE Units::Timespan & operator+=(Units::Timespan other)
Add time to this time.
Definition Timespan.h:101
+
Q_INVOKABLE bool isNegative() const
Checks if the time is negative.
Definition Timespan.h:90
+
Q_INVOKABLE double toM() const
Convert time to minutes.
Definition Timespan.h:128
+
Q_INVOKABLE double toS() const
Convert time to seconds.
Definition Timespan.h:119
Q_INVOKABLE std::partial_ordering operator<=>(const Units::Timespan &rhs) const =default
Comparison.
-
Q_INVOKABLE bool isFinite() const
Checks if the time is valid.
Definition Timespan.h:80
+
Q_INVOKABLE bool isFinite() const
Checks if the time is valid.
Definition Timespan.h:81
static auto fromH(double timeInH) -> Timespan
Constructs a time.
Definition Timespan.h:46
-
Q_INVOKABLE double toH() const
Convert time to hours.
Definition Timespan.h:136
-
static auto fromS(double timeInS) -> Timespan
Constructs a time.
Definition Timespan.h:70
+
static Timespan fromMS(double timeInMS)
Constructs a time.
Definition Timespan.h:58
+
Q_INVOKABLE double toH() const
Convert time to hours.
Definition Timespan.h:137
+
static auto fromS(double timeInS) -> Timespan
Constructs a time.
Definition Timespan.h:71
Conversion between units used in aviation.
Definition Angle.h:34
diff --git a/APIdoc/html/TrafficDataProvider_8h_source.html b/APIdoc/html/TrafficDataProvider_8h_source.html index 5c7ad4890..d5ee1c8ce 100644 --- a/APIdoc/html/TrafficDataProvider_8h_source.html +++ b/APIdoc/html/TrafficDataProvider_8h_source.html @@ -121,223 +121,241 @@
85 Q_PROPERTY(QList<Traffic::TrafficDataSource_Abstract*> dataSources READ dataSources NOTIFY dataSourcesChanged)
86
87
-
94 Q_PROPERTY(bool receivingHeartbeat READ receivingHeartbeat WRITE setReceivingHeartbeat NOTIFY receivingHeartbeatChanged)
-
95
-
104 Q_PROPERTY(QList<Traffic::TrafficFactor_WithPosition*> trafficObjects READ trafficObjects CONSTANT)
+ +
96
+
105
- -
113
- -
122
- -
131
-
138 Q_PROPERTY(Traffic::Warning warning READ warning NOTIFY warningChanged)
-
139
-
140
+
114 Q_PROPERTY(QList<Traffic::TrafficFactor_WithPosition*> trafficObjects READ trafficObjects CONSTANT)
+
115
+ +
123
+ +
132
+
141
-
142 //
-
143 // Getter Methods
-
144 //
-
145
-
150 [[nodiscard]] QList<Traffic::TrafficDataSource_Abstract*> dataSources() const;
+
148 Q_PROPERTY(Traffic::Warning warning READ warning NOTIFY warningChanged)
+
149
+
150
151
-
-
156 [[nodiscard]] bool receivingHeartbeat() const
-
157 {
-
158 return m_receivingHeartbeat;
-
159 }
+
152 //
+
153 // Getter Methods
+
154 //
+
155
+
160 [[nodiscard]] QList<Traffic::TrafficDataSource_Abstract*> dataSources() const;
+
161
+
166 [[nodiscard]] Units::Distance pressureAltitude() const {return m_pressureAltitude.value();}
+
167
+
172 [[nodiscard]] QBindable<Units::Distance> bindablePressureAltitude() const {return &m_pressureAltitude;}
+
173
+
+
178 [[nodiscard]] bool receivingHeartbeat() const
+
179 {
+
180 return m_receivingHeartbeat.value();
+
181 }
-
160
-
-
165 [[nodiscard]] QList<Traffic::TrafficFactor_WithPosition*> trafficObjects() const
-
166 {
-
167 return m_trafficObjects;
-
168 }
+
182
+
+
187 [[nodiscard]] QBindable<bool> bindableReceivingHeartbeat() const
+
188 {
+
189 return &m_receivingHeartbeat;
+
190 }
-
169
-
- -
175 {
-
176 return m_trafficObjectWithoutPosition;
-
177 }
+
191
+
+
196 [[nodiscard]] QList<Traffic::TrafficFactor_WithPosition*> trafficObjects() const
+
197 {
+
198 return m_trafficObjects;
+
199 }
-
178
-
-
183 [[nodiscard]] QString trafficReceiverRuntimeError() const
-
184 {
-
185 return m_trafficReceiverRuntimeError;
-
186 }
+
200
+
+ +
206 {
+
207 return m_trafficObjectWithoutPosition;
+
208 }
-
187
-
-
192 [[nodiscard]] QString trafficReceiverSelfTestError() const
-
193 {
-
194 return m_trafficReceiverSelfTestError;
-
195 }
+
209
+
+
214 [[nodiscard]] QString trafficReceiverRuntimeError() const
+
215 {
+
216 return m_trafficReceiverRuntimeError;
+
217 }
-
196
-
-
201 [[nodiscard]] Traffic::Warning warning() const
-
202 {
-
203 return m_Warning;
-
204 }
+
218
+
+
223 [[nodiscard]] QString trafficReceiverSelfTestError() const
+
224 {
+
225 return m_trafficReceiverSelfTestError;
+
226 }
-
205
-
206
-
207
-
208 //
-
209 // Methods
-
210 //
-
211
- -
221
-
231 Q_INVOKABLE QString addDataSource(const Traffic::ConnectionInfo &connectionInfo);
-
232
-
241 Q_INVOKABLE QString addDataSource_UDP(quint16 port);
+
227
+
+
232 [[nodiscard]] Traffic::Warning warning() const
+
233 {
+
234 return m_Warning;
+
235 }
+
+
236
+
237
+
238
+
239 //
+
240 // Methods
+
241 //
242
-
251 Q_INVOKABLE QString addDataSource_SerialPort(const QString& portName);
+
252
-
263 Q_INVOKABLE QString addDataSource_TCP(const QString& host, quint16 port);
-
264
- +
262 Q_INVOKABLE QString addDataSource(const Traffic::ConnectionInfo &connectionInfo);
+
263
+
272 Q_INVOKABLE QString addDataSource_UDP(quint16 port);
273
-
274
-
275
-
276 //
-
277 // Constants
-
278 //
-
279
-
280
- -
287
- -
294
-
295signals:
- -
298
-
306 void passwordRequest(const QString& SSID);
-
307
-
314 void passwordStorageRequest(const QString& SSID, const QString& password);
-
315
- +
282 Q_INVOKABLE QString addDataSource_SerialPort(const QString& portName);
+
283
+
294 Q_INVOKABLE QString addDataSource_TCP(const QString& host, quint16 port);
+
295
+ +
304
+
305
+
306
+
307 //
+
308 // Constants
+
309 //
+
310
+
311
+
318
- -
321
- -
324
- -
327
-
328public slots:
- -
337
- -
343
-
354 void setPassword(const QString& SSID, const QString &password);
-
355
-
356private slots:
-
357 // Identical to addDataSource, but handles Bluetooth Classic connections only.
-
358 QString addDataSource_BluetoothClassic(const Traffic::ConnectionInfo &connectionInfo);
+ +
325
+
326
+
327signals:
+ +
330
+
338 void passwordRequest(const QString& SSID);
+
339
+
346 void passwordStorageRequest(const QString& SSID, const QString& password);
+
347
+ +
350
+ +
353
+ +
356
+
359
-
360 // Identical to addDataSource, but handles Bluetooth Low Energy connections only.
-
361 static QString addDataSource_BluetoothLowEnergy(const Traffic::ConnectionInfo &connectionInfo);
-
362
-
363 // Clear all data sources
-
364 void clearDataSources();
-
365
-
366 // Intializations that are moved out of the constructor, in order to avoid
-
367 // nested uses of constructors in Global.
-
368 void deferredInitialization() const;
+
360public slots:
+
369
-
370 // Sends out foreflight broadcast message See
-
371 // https://www.foreflight.com/connect/spec/
-
372 void foreFlightBroadcast();
-
373
-
374 // Load connection infos from file and create connections
-
375 void loadConnectionInfos();
-
376
-
377 // Called if one of the sources indicates a heartbeat change
-
378 void onSourceHeartbeatChanged();
-
379
-
380 // Called if one of the sources reports traffic (position unknown)
-
381 void onTrafficFactorWithPosition(const Traffic::TrafficFactor_WithPosition& factor);
-
382
-
383 // Called if one of the sources reports traffic (position known)
-
384 void onTrafficFactorWithoutPosition(const Traffic::TrafficFactor_DistanceOnly& factor);
-
385
-
386 // Called if one of the sources reports or clears an error string
-
387 void onTrafficReceiverSelfTestError();
-
388
-
389 // Called if one of the sources reports or clears an error string
-
390 void onTrafficReceiverRuntimeError();
+ +
375
+
386 void setPassword(const QString& SSID, const QString &password);
+
387
+
388private slots:
+
389 // Identical to addDataSource, but handles Bluetooth Classic connections only.
+
390 QString addDataSource_BluetoothClassic(const Traffic::ConnectionInfo &connectionInfo);
391
-
392 // Resetter method
-
393 void resetWarning();
+
392 // Identical to addDataSource, but handles Bluetooth Low Energy connections only.
+
393 static QString addDataSource_BluetoothLowEnergy(const Traffic::ConnectionInfo &connectionInfo);
394
-
395 // Save connection infos to file
-
396 void saveConnectionInfos();
+
395 // Clear all data sources
+
396 void clearDataSources();
397
-
398 // Setter method
-
399 void setReceivingHeartbeat(bool newReceivingHeartbeat);
-
400
-
401 // Setter method
-
402 void setWarning(const Traffic::Warning& warning);
-
403
-
404 // Updates the property statusString that is inherited from
-
405 // Positioning::PositionInfoSource_Abstract
-
406 void updateStatusString();
-
407
-
408private:
-
409 // UDP Socket for ForeFlight Broadcast messages.
-
410 // See https://www.foreflight.com/connect/spec/
-
411 QNetworkDatagram foreFlightBroadcastDatagram {R"({"App":"Enroute Flight Navigation","GDL90":{"port":4000}})", QHostAddress::Broadcast, 63093};
-
412 QUdpSocket foreFlightBroadcastSocket;
-
413 QTimer foreFlightBroadcastTimer;
-
414
-
415 // Targets
-
416 QList<Traffic::TrafficFactor_WithPosition *> m_trafficObjects;
-
417 QPointer<Traffic::TrafficFactor_DistanceOnly> m_trafficObjectWithoutPosition;
-
418
-
419 // TrafficData Sources
-
420 QList<QPointer<Traffic::TrafficDataSource_Abstract>> m_dataSources;
-
421 QPointer<Traffic::TrafficDataSource_Abstract> m_currentSource;
-
422
-
423 // Property cache
-
424 Traffic::Warning m_Warning;
-
425 QTimer m_WarningTimer;
-
426 QString m_trafficReceiverRuntimeError;
-
427 QString m_trafficReceiverSelfTestError;
-
428
-
429 // Reconnect
-
430 QTimer reconnectionTimer;
-
431
-
432 // Property Cache
-
433 bool m_receivingHeartbeat {false};
-
434
-
435 // Standard file name for saveConnectionInfos()
-
436 QString stdFileName{QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/connectionInfos.data"};
-
437};
+
398 // Intializations that are moved out of the constructor, in order to avoid
+
399 // nested uses of constructors in Global.
+
400 void deferredInitialization() const;
+
401
+
402 // Sends out foreflight broadcast message See
+
403 // https://www.foreflight.com/connect/spec/
+
404 void foreFlightBroadcast();
+
405
+
406 // Load connection infos from file and create connections
+
407 void loadConnectionInfos();
+
408
+
409 // Called if one of the sources indicates a heartbeat change
+
410 void onSourceHeartbeatChanged();
+
411
+
412 // Called if one of the sources reports traffic (position unknown)
+
413 void onTrafficFactorWithPosition(const Traffic::TrafficFactor_WithPosition& factor);
+
414
+
415 // Called if one of the sources reports traffic (position known)
+
416 void onTrafficFactorWithoutPosition(const Traffic::TrafficFactor_DistanceOnly& factor);
+
417
+
418 // Called if one of the sources reports or clears an error string
+
419 void onTrafficReceiverSelfTestError();
+
420
+
421 // Called if one of the sources reports or clears an error string
+
422 void onTrafficReceiverRuntimeError();
+
423
+
424 // Resetter method
+
425 void resetWarning();
+
426
+
427 // Save connection infos to file
+
428 void saveConnectionInfos();
+
429
+
430 // Setter method
+
431 void setWarning(const Traffic::Warning& warning);
+
432
+
433private:
+
434 //
+
435 // Compute Methods
+
436 //
+
437
+
438 QString computeStatusString();
+
439
+
440 // UDP Socket for ForeFlight Broadcast messages.
+
441 // See https://www.foreflight.com/connect/spec/
+
442 QNetworkDatagram foreFlightBroadcastDatagram {R"({"App":"Enroute Flight Navigation","GDL90":{"port":4000}})", QHostAddress::Broadcast, 63093};
+
443 QUdpSocket foreFlightBroadcastSocket;
+
444 QTimer foreFlightBroadcastTimer;
+
445
+
446 // Targets
+
447 QList<Traffic::TrafficFactor_WithPosition *> m_trafficObjects;
+
448 QPointer<Traffic::TrafficFactor_DistanceOnly> m_trafficObjectWithoutPosition;
+
449
+
450 // TrafficData Sources
+
451 QProperty<QList<QPointer<Traffic::TrafficDataSource_Abstract>>> m_dataSources;
+
452 QProperty<QPointer<Traffic::TrafficDataSource_Abstract>> m_currentSource;
+
453
+
454 // Property cache
+
455 Traffic::Warning m_Warning;
+
456 QTimer m_WarningTimer;
+
457 QString m_trafficReceiverRuntimeError;
+
458 QString m_trafficReceiverSelfTestError;
+
459
+
460 QProperty<Units::Distance> m_pressureAltitude;
+
461 Units::Distance computePressureAltitude();
+
462
+
463 // Reconnect
+
464 QTimer reconnectionTimer;
+
465
+
466 Q_OBJECT_BINDABLE_PROPERTY(Traffic::TrafficDataProvider, bool, m_receivingHeartbeat, &Traffic::TrafficDataProvider::receivingHeartbeatChanged);
+
467
+
468 // Standard file name for saveConnectionInfos()
+
469 QString stdFileName{QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/connectionInfos.data"};
+
470};
-
438
-
439} // namespace Traffic
+
471
+
472} // namespace Traffic
static Q_INVOKABLE Traffic::TrafficDataProvider * trafficDataProvider()
Pointer to appplication-wide static TrafficDataProvider instance.
-
Abstract base class for all classes that provide geographic position information.
+
Abstract base class for all classes that provide geographic position information.
Connection to a traffic data receiver.
-
QString trafficReceiverSelfTestError
String describing the traffic data receiver errors found in self-test.
-
QString trafficReceiverRuntimeError
String describing the current traffic data receiver errors.
+
QString trafficReceiverSelfTestError
String describing the traffic data receiver errors found in self-test.
+
QString trafficReceiverRuntimeError
String describing the current traffic data receiver errors.
void passwordStorageRequest(const QString &SSID, const QString &password)
Password storage request.
void passwordRequest(const QString &SSID)
Password request.
-
QString trafficReceiverSelfTestError() const
Getter function for the property with the same name.
-
void receivingHeartbeatChanged(bool)
Notifier signal.
-
Traffic::TrafficFactor_DistanceOnly * trafficObjectWithoutPosition() const
Getter method for property with the same name.
+
QString trafficReceiverSelfTestError() const
Getter function for the property with the same name.
+
Traffic::TrafficFactor_DistanceOnly * trafficObjectWithoutPosition() const
Getter method for property with the same name.
QList< Traffic::TrafficDataSource_Abstract * > dataSources
Traffic data sources.
+
QBindable< bool > bindableReceivingHeartbeat() const
Getter method for property with the same name.
Q_INVOKABLE QString addDataSource_TCP(const QString &host, quint16 port)
Add an additional data source.
-
Traffic::Warning warning
Current traffic warning.
+
Traffic::Warning warning
Current traffic warning.
Q_INVOKABLE QString addDataSource_UDP(quint16 port)
Add an additional data source.
-
QList< Traffic::TrafficFactor_WithPosition * > trafficObjects() const
Getter method for property with the same name.
-
QString trafficReceiverRuntimeError() const
Getter function for the property with the same name.
-
static constexpr Units::Distance maxVerticalDistance
Maximal vertical distance for relevant traffic.
-
bool receivingHeartbeat
Heartbeat indicator.
+
QList< Traffic::TrafficFactor_WithPosition * > trafficObjects() const
Getter method for property with the same name.
+
QString trafficReceiverRuntimeError() const
Getter function for the property with the same name.
+
static constexpr Units::Distance maxVerticalDistance
Maximal vertical distance for relevant traffic.
+
bool receivingHeartbeat() const
Getter method for property with the same name.
+
bool receivingHeartbeat
Heartbeat indicator.
+
Units::Distance pressureAltitude
Pressure altitude.
+
void receivingHeartbeatChanged()
Notifier signal.
void connectToTrafficReceiver()
Start attempt to connect to traffic receiver.
void trafficReceiverRuntimeErrorChanged()
Notifier signal.
Q_INVOKABLE QString addDataSource_SerialPort(const QString &portName)
Add an additional data source.
@@ -346,21 +364,23 @@
void setPassword(const QString &SSID, const QString &password)
Send password to the traffic data sources.
Q_INVOKABLE void removeDataSource(Traffic::TrafficDataSource_Abstract *source)
Remove data sources.
void disconnectFromTrafficReceiver()
Disconnect from traffic receiver.
-
Traffic::Warning warning() const
Getter method for property with the same name.
+
Traffic::Warning warning() const
Getter method for property with the same name.
void addDataSource(Traffic::TrafficDataSource_Abstract *source)
Add an additional data source.
TrafficDataProvider(QObject *parent=nullptr)
Default constructor.
-
QList< Traffic::TrafficFactor_WithPosition * > trafficObjects
Traffic objects whose position is known.
-
static constexpr Units::Distance maxHorizontalDistance
Maximal horizontal distance for relevant traffic.
-
Traffic::TrafficFactor_DistanceOnly * trafficObjectWithoutPosition
Most relevant traffic object whose position is not known.
+
QBindable< Units::Distance > bindablePressureAltitude() const
Getter method for property with the same name.
+
QList< Traffic::TrafficFactor_WithPosition * > trafficObjects
Traffic objects whose position is known.
+
static constexpr Units::Distance maxHorizontalDistance
Maximal horizontal distance for relevant traffic.
+
Traffic::TrafficFactor_DistanceOnly * trafficObjectWithoutPosition
Most relevant traffic object whose position is not known.
void warningChanged(const Traffic::Warning &)
Notifier signal.
Q_INVOKABLE QString addDataSource(const Traffic::ConnectionInfo &connectionInfo)
Add an additional data source.
-
Base class for all traffic receiver data sources.
+
Base class for all traffic receiver data sources.
Traffic factor where only distance is known.
Traffic factor whose precise position is known.
Traffic warning.
Definition Warning.h:40
Convenience class for distance computations.
Definition Distance.h:35
static Q_INVOKABLE constexpr Units::Distance fromNM(double distanceInNM)
Constructs a distance.
Definition Distance.h:82
static Q_INVOKABLE constexpr Units::Distance fromM(double distanceInM)
Constructs a distance.
Definition Distance.h:56
+
Conversion between units used in aviation.
Definition Angle.h:34
@@ -409,7 +408,7 @@

Returns
Property acceptedTerms
-

Definition at line 187 of file GlobalSettings.h.

+

Definition at line 188 of file GlobalSettings.h.

@@ -467,7 +466,37 @@

Returns
Property alwaysOpenExternalWebsites
-

Definition at line 193 of file GlobalSettings.h.

+

Definition at line 194 of file GlobalSettings.h.

+ +

+
+ +

◆ bindablePositioningByTrafficDataReceiver()

+ +
+
+ + + + + +
+ + + + + + + +
QBindable< bool > GlobalSettings::bindablePositioningByTrafficDataReceiver () const
+
+inlinenodiscard
+
+ +

Getter function for property of the same name.

+
Returns
Property positioningByTrafficDataReceiver
+ +

Definition at line 272 of file GlobalSettings.h.

@@ -497,7 +526,7 @@

Returns
Property expandNotamAbbreviations
-

Definition at line 205 of file GlobalSettings.h.

+

Definition at line 206 of file GlobalSettings.h.

@@ -555,7 +584,7 @@

Returns
Property hideGlidingSectors
-

Definition at line 217 of file GlobalSettings.h.

+

Definition at line 218 of file GlobalSettings.h.

@@ -585,7 +614,7 @@

Returns
Property ignoreSSLProblems
-

Definition at line 223 of file GlobalSettings.h.

+

Definition at line 224 of file GlobalSettings.h.

@@ -644,7 +673,7 @@

Returns
Property lastWhatsNewHash
-

Definition at line 235 of file GlobalSettings.h.

+

Definition at line 236 of file GlobalSettings.h.

@@ -675,7 +704,7 @@

Returns
Property lastWhatsNewInMapsHash
-

Definition at line 244 of file GlobalSettings.h.

+

Definition at line 245 of file GlobalSettings.h.

@@ -733,12 +762,12 @@

Returns
Property night mode
-

Definition at line 259 of file GlobalSettings.h.

+

Definition at line 260 of file GlobalSettings.h.

- -

◆ positioningByTrafficDataReceiver()

+ +

◆ positioningByTrafficDataReceiver()

@@ -793,7 +822,7 @@

Returns
Property privacyHash
-

Definition at line 271 of file GlobalSettings.h.

+

Definition at line 278 of file GlobalSettings.h.

@@ -1224,7 +1253,7 @@

Returns
Property positioningByTrafficDataReceiver
-

Definition at line 277 of file GlobalSettings.h.

+

Definition at line 284 of file GlobalSettings.h.

@@ -1255,7 +1284,7 @@

Returns
Property voiceNotifications
-

Definition at line 283 of file GlobalSettings.h.

+

Definition at line 290 of file GlobalSettings.h.

@@ -1283,7 +1312,7 @@

-

Definition at line 98 of file GlobalSettings.h.

+

Definition at line 99 of file GlobalSettings.h.

@@ -1310,7 +1339,7 @@

Definition at line 106 of file GlobalSettings.h.

+

Definition at line 107 of file GlobalSettings.h.

@@ -1329,7 +1358,7 @@

Definition at line 118 of file GlobalSettings.h.

+

Definition at line 119 of file GlobalSettings.h.

@@ -1348,7 +1377,7 @@

Definition at line 112 of file GlobalSettings.h.

+

Definition at line 113 of file GlobalSettings.h.

@@ -1375,7 +1404,7 @@

Definition at line 127 of file GlobalSettings.h.

+

Definition at line 128 of file GlobalSettings.h.

@@ -1402,7 +1431,7 @@

This property is used in the app to determine if the message has been shown or not.

-

Definition at line 143 of file GlobalSettings.h.

+

Definition at line 144 of file GlobalSettings.h.

@@ -1429,7 +1458,7 @@

This property is used in the app to determine if the message has been shown or not.

-

Definition at line 150 of file GlobalSettings.h.

+

Definition at line 151 of file GlobalSettings.h.

@@ -1456,7 +1485,7 @@

This property is used in the app to determine if the message has been shown or not.

-

Definition at line 163 of file GlobalSettings.h.

+

Definition at line 167 of file GlobalSettings.h.

@@ -1483,7 +1512,7 @@

Notifications::Notification::Importance. It determines which notifications should be spoken.

-

Definition at line 176 of file GlobalSettings.h.

+

Definition at line 177 of file GlobalSettings.h.

diff --git a/APIdoc/html/classPositioning_1_1PositionInfo-members.html b/APIdoc/html/classPositioning_1_1PositionInfo-members.html index 1b852e579..05158101c 100644 --- a/APIdoc/html/classPositioning_1_1PositionInfo-members.html +++ b/APIdoc/html/classPositioning_1_1PositionInfo-members.html @@ -72,17 +72,18 @@ operator==(const Positioning::PositionInfo &rhs) constPositioning::PositionInfoinline positionErrorEstimate() constPositioning::PositionInfo PositionInfo()=defaultPositioning::PositionInfo - PositionInfo(const QGeoPositionInfo &info)Positioning::PositionInfoexplicit - terrainElevationAMSL()Positioning::PositionInfo - timestamp() constPositioning::PositionInfoinline - timestampString() constPositioning::PositionInfoinline - trueAltitudeAGL()Positioning::PositionInfo - trueAltitudeAMSL() constPositioning::PositionInfo - trueAltitudeErrorEstimate() constPositioning::PositionInfo - trueTrack() constPositioning::PositionInfo - trueTrackErrorEstimate() constPositioning::PositionInfo - variation() constPositioning::PositionInfo - verticalSpeed() constPositioning::PositionInfo + PositionInfo(const QGeoPositionInfo &info, const QString &source)Positioning::PositionInfoexplicit + source() constPositioning::PositionInfoinline + terrainElevationAMSL()Positioning::PositionInfo + timestamp() constPositioning::PositionInfoinline + timestampString() constPositioning::PositionInfoinline + trueAltitudeAGL()Positioning::PositionInfo + trueAltitudeAMSL() constPositioning::PositionInfo + trueAltitudeErrorEstimate() constPositioning::PositionInfo + trueTrack() constPositioning::PositionInfo + trueTrackErrorEstimate() constPositioning::PositionInfo + variation() constPositioning::PositionInfo + verticalSpeed() constPositioning::PositionInfo