Enroute Flight Navigation
A navigation app for VFR pilots
|
Connection to a traffic data receiver. More...
#include <ConnectionInfo.h>
Classes | |
struct | OgnInfo |
Constructor parameter for OGN connections. More... |
Public Types | |
enum | Type : quint8 { Invalid , BluetoothClassic , BluetoothLowEnergy , TCP , UDP , Serial , FLARMFile , OGN } |
Connection Type. More... |
Public Member Functions | |
ConnectionInfo ()=default | |
Default constructor. | |
ConnectionInfo (const QBluetoothDeviceInfo &info, bool canonical=false) | |
Constructor for Bluetooth Device Connections. | |
ConnectionInfo (quint16 port, bool canonical=false) | |
Constructor for UDP Connections. | |
ConnectionInfo (const QString &host, quint16 port, bool canonical=false) | |
Constructor for TCP Connections. | |
ConnectionInfo (const OgnInfo &info) | |
Constructor for OGN Connections. | |
bool | canConnect () const |
Getter function for the property with the same name. | |
bool | canonical () const |
Getter function for the property with the same name. | |
QString | description () const |
Getter function for the property with the same name. | |
QString | host () const |
Getter function for the property with the same name. | |
QString | icon () const |
Getter function for the property with the same name. | |
QString | name () const |
Getter function for the property with the same name. | |
Traffic::ConnectionInfo::Type | type () const |
Getter function for the property with the same name. | |
QBluetoothDeviceInfo | bluetoothDeviceInfo () const |
Bluetooth Device Info. | |
bool | operator== (const Traffic::ConnectionInfo &other) const =default |
Equality of ConnectionInfos. | |
quint16 | port () const |
Port. | |
bool | sameConnectionAs (const Traffic::ConnectionInfo &other) const |
Equality of connection. | |
bool | operator< (const Traffic::ConnectionInfo &other) const |
Comparison. |
Properties | |
bool | canConnect |
Connectability. | |
bool | canonical |
Canonicity. | |
QString | description |
Description. | |
QString | hostn |
Host. | |
QString | icon |
Icon. | |
QString | name |
Name. | |
Traffic::ConnectionInfo::Type | type |
Type. |
Friends | |
QDataStream & | operator<< (QDataStream &stream, const Traffic::ConnectionInfo &connectionInfo) |
Serialization. | |
QDataStream & | operator>> (QDataStream &stream, Traffic::ConnectionInfo &connectionInfo) |
Deserialization. |
Connection to a traffic data receiver.
This class describes a connection to a traffic data receiver. It exposes connection properties in a format that is suitable for QML.
Definition at line 41 of file ConnectionInfo.h.
enum Traffic::ConnectionInfo::Type : quint8 |
Connection Type.
Definition at line 50 of file ConnectionInfo.h.
|
default |
Default constructor.
This method constructs an invalid ConnectionInfo
|
explicit |
Constructor for Bluetooth Device Connections.
This method constructs a ConnectionInfo for a connection to a Bluetooth device. The type will either be BluetoothClassic or BluetoothLowEnergy.
info | QBluetoothDeviceInfo that describes the Bluetooth device |
canonical | Property 'canonical', as described below. |
|
explicit |
Constructor for UDP Connections.
This method constructs a ConnectionInfo for a UDP connection.
port | Port number |
canonical | Property 'canonical', as described below. |
|
explicit |
Constructor for TCP Connections.
This method constructs a ConnectionInfo for a TCP connection.
host | Host name or IP Address |
port | Port number |
canonical | Property 'canonical', as described below. |
|
explicit |
Constructor for OGN Connections.
This method constructs a ConnectionInfo for a OGN connection.
info | Info about the connection |
|
inlinenodiscard |
Bluetooth Device Info.
Definition at line 261 of file ConnectionInfo.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 203 of file ConnectionInfo.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 210 of file ConnectionInfo.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 217 of file ConnectionInfo.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 224 of file ConnectionInfo.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 231 of file ConnectionInfo.h.
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 238 of file ConnectionInfo.h.
bool Traffic::ConnectionInfo::operator< | ( | const Traffic::ConnectionInfo & | other | ) | const |
Comparison.
This operator can be used to sort ConnectionInfos in the GUI. Sorting is by connectability, type and name.
other | Other ConnectionInfo to compare with. |
|
nodiscarddefault |
Equality of ConnectionInfos.
other | Other ConnectionInfo to compare with. |
|
inlinenodiscard |
Port.
Definition at line 278 of file ConnectionInfo.h.
|
nodiscard |
Equality of connection.
This test for equality is not strict. It returns 'true' if the two connection infos describe the same connection. Still, they can differ in aspects such as the connection name or description. This is possible, e.g., for Bluetooth devices whose name was not know when one of the ConnectionInfos was constructed.
other | Other ConnectionInfo to compare with. |
|
inlinenodiscard |
Getter function for the property with the same name.
Definition at line 245 of file ConnectionInfo.h.
|
friend |
Serialization.
There are no checks for errors of any kind.
|
friend |
Deserialization.
There are no checks for errors of any kind.
|
read |
Connectability.
This property holds true if a connection is possible in principle. It does not guarantee that a connection attempt will be successful. Example: This property is 'false' for connections to Bluetooth Low Energy devices, which are currently unsupported.
Definition at line 144 of file ConnectionInfo.h.
|
read |
Canonicity.
This property holds true if the connection is canonical. Canonical connections are those that will always be in the connection library and cannot be edited or deleted in the GUI.
Definition at line 153 of file ConnectionInfo.h.
|
read |
Description.
This property holds a human-readable, translated, two-line description of the connection, in HTML format.
Definition at line 161 of file ConnectionInfo.h.
|
read |
Host.
For TCP connections, this property holds the host name.
Definition at line 168 of file ConnectionInfo.h.
|
read |
Icon.
This property holds the name of an icon file that can be used to represent the connection in the GUI.
Definition at line 176 of file ConnectionInfo.h.
|
read |
Name.
This property holds a human-readable, translated name of the connection.
Definition at line 183 of file ConnectionInfo.h.
|
read |
Type.
This property holds the type of the connection.
Definition at line 190 of file ConnectionInfo.h.