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

Flarmnet database. More...

#include <FlarmnetDB.h>

Public Member Functions

 FlarmnetDB (QObject *parent=nullptr)
 Default constructor.
Q_INVOKABLE QString registration (const QString &key)
 Find registration for a given key.

Detailed Description

Flarmnet database.

This simple class provides access to a Flarmnet database, which is in essence a glorified QHash<QString, QString>, where keys are Flarm IDs and values are aircraft registration strings.

Definition at line 37 of file FlarmnetDB.h.

Constructor & Destructor Documentation

◆ FlarmnetDB()

Traffic::FlarmnetDB::FlarmnetDB ( QObject * parent = nullptr)

Default constructor.

This default constructor will read the database from a file into memory.

Parameters
parentThe standard QObject parent pointer

Member Function Documentation

◆ registration()

Q_INVOKABLE QString Traffic::FlarmnetDB::registration ( const QString & key)

Find registration for a given key.

As a special case, if the key contains the character '!', this method does not perform a database lookup but returns the substring after the last '!'.

Parameters
keyFlarmID to look up
Returns
Aircraft registration, or an empty string if the database does not contain the key

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