27#include "units/Distance.h"
37 friend QDataStream& operator<<(QDataStream& stream, const
NOTAM& notam);
38 friend QDataStream& operator>>(QDataStream& stream,
NOTAM& notam);
48 explicit
NOTAM(const QJsonObject& jsonObject);
126 Q_REQUIRED_RESULT QString
affectedFIR()
const {
return m_affectedFIR; }
138 Q_REQUIRED_RESULT QGeoCoordinate
coordinate()
const {
return m_coordinate; }
144 Q_REQUIRED_RESULT QDateTime
effectiveEnd()
const {
return m_effectiveEnd; }
156 Q_REQUIRED_RESULT QJsonObject
GeoJSON()
const;
162 Q_REQUIRED_RESULT QString
icaoLocation()
const {
return m_icaoLocation; }
174 Q_REQUIRED_RESULT QString
number()
const {
return m_number; }
180 Q_REQUIRED_RESULT QGeoCircle
region()
const {
return m_region; }
186 Q_REQUIRED_RESULT QString
text()
const {
return m_text; }
192 Q_REQUIRED_RESULT QString
traffic()
const {
return m_traffic; }
218 Q_REQUIRED_RESULT [[nodiscard]] Q_INVOKABLE
bool operator==(
const NOTAM& rhs)
const =
default;
226 return m_effectiveEnd.isValid() && (m_effectiveEnd < QDateTime::currentDateTimeUtc());
242 Q_REQUIRED_RESULT Q_INVOKABLE QString
richText(
bool expandAbbreviations,
const QDateTime& now)
const;
254 QString m_affectedFIR;
255 QGeoCoordinate m_coordinate;
256 QString m_effectiveEndString;
257 QString m_effectiveStartString;
258 QString m_icaoLocation;
263 QString m_sectionTitle;
265 QString m_selectionCode;
270 QDateTime m_effectiveEnd;
271 QDateTime m_effectiveStart;
296QGeoCoordinate interpretNOTAMCoordinates(
const QString&
string);
302QDataStream& operator<<(QDataStream& stream,
const NOTAM& notam);
308QDataStream& operator>>(QDataStream& stream,
NOTAM& notam);
This extremely simple class holds a the data item of a NOTAM.
QString icaoLocation
ICAO location of this NOTAM.
QString affectedFIR
Flight Information Region of this NOTAM.
Q_REQUIRED_RESULT QJsonObject GeoJSON() const
Getter function for the property with the same name.
Q_REQUIRED_RESULT bool isValid() const
Getter function for the property with the same name.
Q_REQUIRED_RESULT QString traffic() const
Getter function for the property with the same name.
QString cancels
Cancels other NOTAM.
QDateTime effectiveStart
Effective start of the NOTAM, if date is given.
QGeoCoordinate coordinate
Coordinates of the NOTAM.
Q_REQUIRED_RESULT QString icaoLocation() const
Getter function for the property with the same name.
Q_REQUIRED_RESULT QString cancels() const
Getter function for the property with the same name.
Q_REQUIRED_RESULT bool isOutdated() const
Check if effectiveEnd is valid and earlier than currentTime.
QString number
Number of this NOTAM.
Q_REQUIRED_RESULT Q_INVOKABLE QString richText(bool expandAbbreviations, const QDateTime &now) const
Rich text description of the NOTAM.
QString sectionTitle
Section title.
Q_REQUIRED_RESULT QDateTime effectiveEnd() const
Getter function for the property with the same name.
Q_REQUIRED_RESULT Q_INVOKABLE bool operator==(const NOTAM &rhs) const =default
Comparison.
NOTAM()=default
Constructs an invalid NOTAM.
QString text
Plain text of the NOTAM.
QDateTime effectiveEnd
Effective end of the NOTAM, if date is given.
Q_REQUIRED_RESULT QGeoCoordinate coordinate() const
Getter function for the property with the same name.
bool isValid
Validity of this NOTAM.
Q_REQUIRED_RESULT QDateTime effectiveStart() const
Getter function for the property with the same name.
Q_REQUIRED_RESULT QGeoCircle region() const
Getter function for the property with the same name.
QGeoCircle region
Region where this NOTAM is valid.
Q_REQUIRED_RESULT QString text() const
Getter function for the property with the same name.
Q_REQUIRED_RESULT QString category() const
Category of this NOTAM for map icon selection.
QJsonObject GeoJSON
Waypoint in GeoJSON format.
Q_REQUIRED_RESULT QString number() const
Getter function for the property with the same name.
void updateSectionTitle()
Update section title according to the current time.
QString traffic
Traffic entry of the NOTAM.
Convenience class for distance computations.