mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 13:35:34 +08:00
Ref T26, 1st implementation using flight plan remarks
This commit is contained in:
committed by
Mathew Sutcliffe
parent
ae2eb66721
commit
e3fd0e20c1
@@ -13,6 +13,7 @@
|
||||
#define BLACKMISC_AVIATION_FLIGHTPLANUTILS_H
|
||||
|
||||
#include "blackmisc/blackmiscexport.h"
|
||||
#include <QString>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -22,11 +23,28 @@ namespace BlackMisc
|
||||
class BLACKMISC_EXPORT CFlightPlanUtils
|
||||
{
|
||||
public:
|
||||
//! Useful value in flight plan remarks
|
||||
struct AirlineRemarks
|
||||
{
|
||||
QString radioTelephony; //!< radio telephony designator
|
||||
QString flightOperator; //!< operator, i.e. normally the airline name
|
||||
|
||||
//! Any remarks available
|
||||
bool hasAnyRemarks() const
|
||||
{
|
||||
return !radioTelephony.isEmpty() || !flightOperator.isEmpty();
|
||||
}
|
||||
};
|
||||
|
||||
//! Constructor
|
||||
CFlightPlanUtils() = delete;
|
||||
|
||||
//! Parse remarks from a flight plan
|
||||
static void parseFlightPlanRemarks(const QString &remarks);
|
||||
static AirlineRemarks parseFlightPlanAirlineRemarks(const QString &remarks);
|
||||
|
||||
private:
|
||||
//! Cut the remarks part
|
||||
static QString cut(const QString &remarks, const QString &marker);
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user