Enroute Flight Navigation
A navigation app for VFR pilots
NOTAM::NOTAM Class Reference

This extremely simple class holds a the data item of a NOTAM. More...

#include <NOTAM.h>

Public Member Functions

 NOTAM ()=default
 Constructs an invalid NOTAM.
 
 NOTAM (const QJsonObject &jsonObject)
 Constructs a NOTAM from GeoJSON data, as provided by the FAA.
 
Q_REQUIRED_RESULT QString affectedFIR () 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 QGeoCoordinate coordinate () const
 Getter function for the property with the same name.
 
Q_REQUIRED_RESULT QDateTime effectiveEnd () const
 Getter function for the property with the same name.
 
Q_REQUIRED_RESULT QDateTime effectiveStart () const
 Getter function for the property with the same name.
 
Q_REQUIRED_RESULT QJsonObject GeoJSON () const
 Getter function for the property with the same name.
 
Q_REQUIRED_RESULT QString icaoLocation () 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 number () 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.
 
Q_REQUIRED_RESULT QString traffic () const
 Getter function for the property with the same name.
 
Q_REQUIRED_RESULT Q_INVOKABLE bool operator== (const NOTAM &rhs) const =default
 Comparison.
 
Q_REQUIRED_RESULT bool isOutdated () const
 Check if effectiveEnd is valid and earlier than currentTime.
 
Q_REQUIRED_RESULT Q_INVOKABLE QString richText () const
 Rich text description of the NOTAM.
 
void updateSectionTitle ()
 Update section title according to the current time.
 

Properties

QString affectedFIR
 Flight Information Region of this NOTAM.
 
QString cancels
 Cancels other NOTAM.
 
QGeoCoordinate coordinate
 Coordinates of the NOTAM.
 
QDateTime effectiveEnd
 Effective end of the NOTAM, if date is given.
 
QDateTime effectiveStart
 Effective start of the NOTAM, if date is given.
 
QJsonObject GeoJSON
 Waypoint in GeoJSON format.
 
QString icaoLocation
 ICAO location of this NOTAM.
 
bool isValid
 Validity of this NOTAM.
 
QString number
 Number of this NOTAM.
 
QGeoCircle region
 Region where this NOTAM is valid.
 
QString sectionTitle
 Section title.
 
QString traffic
 Traffic entry of the NOTAM.
 

Friends

QDataStream & operator<< (QDataStream &stream, const NOTAM &notam)
 Serialization.
 
QDataStream & operator>> (QDataStream &stream, NOTAM &notam)
 Deserialization.
 

Detailed Description

This extremely simple class holds a the data item of a NOTAM.

Definition at line 33 of file NOTAM.h.

Constructor & Destructor Documentation

◆ NOTAM()

NOTAM::NOTAM::NOTAM ( const QJsonObject & jsonObject)
explicit

Constructs a NOTAM from GeoJSON data, as provided by the FAA.

Parameters
jsonObjectJSON object, as provided by the FAA

Member Function Documentation

◆ affectedFIR()

Q_REQUIRED_RESULT QString NOTAM::NOTAM::affectedFIR ( ) const
inline

Getter function for the property with the same name.

Returns
Property affectedFIR

Definition at line 119 of file NOTAM.h.

◆ cancels()

Q_REQUIRED_RESULT QString NOTAM::NOTAM::cancels ( ) const

Getter function for the property with the same name.

Returns
Property cancels

◆ coordinate()

Q_REQUIRED_RESULT QGeoCoordinate NOTAM::NOTAM::coordinate ( ) const
inline

Getter function for the property with the same name.

Returns
Property coordinate

Definition at line 131 of file NOTAM.h.

◆ effectiveEnd()

Q_REQUIRED_RESULT QDateTime NOTAM::NOTAM::effectiveEnd ( ) const
inline

Getter function for the property with the same name.

Returns
Property effectiveEnd

Definition at line 137 of file NOTAM.h.

◆ effectiveStart()

Q_REQUIRED_RESULT QDateTime NOTAM::NOTAM::effectiveStart ( ) const
inline

Getter function for the property with the same name.

Returns
Property effectiveStart

Definition at line 143 of file NOTAM.h.

◆ GeoJSON()

Q_REQUIRED_RESULT QJsonObject NOTAM::NOTAM::GeoJSON ( ) const

Getter function for the property with the same name.

Returns
Property GeoJSON

◆ icaoLocation()

Q_REQUIRED_RESULT QString NOTAM::NOTAM::icaoLocation ( ) const
inline

Getter function for the property with the same name.

Returns
Property icaoLocation

Definition at line 155 of file NOTAM.h.

◆ isOutdated()

Q_REQUIRED_RESULT bool NOTAM::NOTAM::isOutdated ( ) const
inline

Check if effectiveEnd is valid and earlier than currentTime.

Returns
True if effectiveEnd is valid and earlier than currentTime

Definition at line 199 of file NOTAM.h.

◆ isValid()

Q_REQUIRED_RESULT bool NOTAM::NOTAM::isValid ( ) const

Getter function for the property with the same name.

Returns
Property isValid

◆ number()

Q_REQUIRED_RESULT QString NOTAM::NOTAM::number ( ) const
inline

Getter function for the property with the same name.

Returns
Property number

Definition at line 167 of file NOTAM.h.

◆ operator==()

Q_REQUIRED_RESULT Q_INVOKABLE bool NOTAM::NOTAM::operator== ( const NOTAM & rhs) const
nodiscarddefault

Comparison.

Parameters
rhsRight hand side of the comparison
Returns
True on equality.

◆ region()

Q_REQUIRED_RESULT QGeoCircle NOTAM::NOTAM::region ( ) const
inline

Getter function for the property with the same name.

Returns
Property region

Definition at line 173 of file NOTAM.h.

◆ richText()

Q_REQUIRED_RESULT Q_INVOKABLE QString NOTAM::NOTAM::richText ( ) const

Rich text description of the NOTAM.

The description and changes with time (e.g. when passing the effective start date of the NOTAM.

Returns
HTML string

◆ traffic()

Q_REQUIRED_RESULT QString NOTAM::NOTAM::traffic ( ) const
inline

Getter function for the property with the same name.

Returns
Property traffic

Definition at line 179 of file NOTAM.h.

◆ updateSectionTitle()

void NOTAM::NOTAM::updateSectionTitle ( )

Update section title according to the current time.

This method uses the current time to set the NOTAM's section title to one of "Marked as read", "Current", "Next 24h", "Next 90 days", "> 90 days" or "NOTAM".

Friends And Related Symbol Documentation

◆ operator<<

QDataStream & operator<< ( QDataStream & stream,
const NOTAM & notam )
friend

Serialization.

There is no checks for errors of any kind.

◆ operator>>

QDataStream & operator>> ( QDataStream & stream,
NOTAM & notam )
friend

Deserialization.

There is no checks for errors of any kind.

Property Documentation

◆ cancels

QString NOTAM::NOTAM::cancels
read

Cancels other NOTAM.

If this is a cancel notam, then this property holds the number of the notam that is to be cancelled. Otherwise, this property holds an empty string.

Definition at line 64 of file NOTAM.h.

◆ effectiveEnd

QDateTime NOTAM::NOTAM::effectiveEnd
read

Effective end of the NOTAM, if date is given.

If the effectiveEnd field of the NOTAM specified a precise date/time, then this time is found here. If not, the property contains an invalid QDateTime.

Definition at line 75 of file NOTAM.h.

◆ effectiveStart

QDateTime NOTAM::NOTAM::effectiveStart
read

Effective start of the NOTAM, if date is given.

If the effectiveStart field of the NOTAM specified a precise date/time, then this time is found here. If not, the property contains an invalid QDateTime.

Definition at line 83 of file NOTAM.h.

◆ sectionTitle

QString NOTAM::NOTAM::sectionTitle

Section title.

This member can be set as desired, to allow for section titles when displaying NOTAMs in a QML ListView.

Definition at line 105 of file NOTAM.h.


The documentation for this class was generated from the following file: