mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 04:25:42 +08:00
Ref T431, FSD setup allow to force 4 letter airline ICAO code
This commit is contained in:
@@ -45,13 +45,15 @@ namespace BlackMisc
|
||||
|
||||
QString CFsdSetup::sendReceiveDetailsToString(SendReceiveDetails details)
|
||||
{
|
||||
static const QString ds("Send parts; %1 gnd: %2 interim: %3 Receive parts: %4 gnd: %5 interim: %6");
|
||||
static const QString ds("Send parts; %1 gnd: %2 interim: %3 Receive parts: %4 gnd: %5 interim: %6 3letter: %7");
|
||||
return ds.arg(boolToYesNo(details.testFlag(SendAircraftParts)),
|
||||
boolToYesNo(details.testFlag(SendGndFlag)),
|
||||
boolToYesNo(details.testFlag(SendInterimPositions)),
|
||||
boolToYesNo(details.testFlag(ReceiveAircraftParts)),
|
||||
boolToYesNo(details.testFlag(ReceiveGndFlag)),
|
||||
boolToYesNo(details.testFlag(ReceiveInterimPositions)));
|
||||
boolToYesNo(details.testFlag(ReceiveInterimPositions)),
|
||||
boolToYesNo(details.testFlag(Force3LetterAirlineICAO))
|
||||
);
|
||||
}
|
||||
|
||||
void CFsdSetup::setSendReceiveDetails(bool partsSend, bool partsReceive, bool gndSend, bool gndReceive, bool interimSend, bool interimReceive)
|
||||
@@ -66,9 +68,16 @@ namespace BlackMisc
|
||||
this->setSendReceiveDetails(s);
|
||||
}
|
||||
|
||||
void CFsdSetup::setForce3LetterAirlineCodes(bool force)
|
||||
{
|
||||
SendReceiveDetails d = this->getSendReceiveDetails();
|
||||
d.setFlag(Force3LetterAirlineICAO, force);
|
||||
this->setSendReceiveDetails(d);
|
||||
}
|
||||
|
||||
const CFsdSetup &CFsdSetup::vatsimStandard()
|
||||
{
|
||||
static const CFsdSetup s(AllParts);
|
||||
static const CFsdSetup s(VATSIMDefault);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,13 +46,15 @@ namespace BlackMisc
|
||||
ReceiveAircraftParts = 1 << 3, //!< aircraft parts in
|
||||
ReceiveInterimPositions = 1 << 4, //!< fast position updates in
|
||||
ReceiveGndFlag = 1 << 5, //!< gnd.flag in (position)
|
||||
Force3LetterAirlineICAO = 1 << 6, //!< force 3 letter airline ICAO code
|
||||
AllSending = SendAircraftParts | SendInterimPositions | SendGndFlag, //!< all out
|
||||
AllReceive = ReceiveAircraftParts | ReceiveInterimPositions | ReceiveGndFlag, //!< all in
|
||||
All = AllReceive | AllSending, //!< all
|
||||
AllParts = SendAircraftParts | ReceiveAircraftParts, //!< send/receive parts
|
||||
AllSendingWithoutGnd = SendAircraftParts | SendInterimPositions, //!< all out, but no gnd.flag
|
||||
AllReceiveWithoutGnd = ReceiveAircraftParts | ReceiveInterimPositions, //!< all in, but no gnd.flag
|
||||
AllWithoutGnd = AllReceiveWithoutGnd | AllSendingWithoutGnd //!< all, but no gnd.flag
|
||||
AllWithoutGnd = AllReceiveWithoutGnd | AllSendingWithoutGnd, //!< all, but no gnd.flag
|
||||
VATSIMDefault = AllParts | Force3LetterAirlineICAO
|
||||
};
|
||||
Q_DECLARE_FLAGS(SendReceiveDetails, SendReceiveDetailsFlag)
|
||||
|
||||
@@ -98,6 +100,11 @@ namespace BlackMisc
|
||||
bool receiveInterimPositions() const { return this->getSendReceiveDetails().testFlag(ReceiveInterimPositions); }
|
||||
//! @}
|
||||
|
||||
//! Airline codes @{
|
||||
bool force3LetterAirlineCodes() const { return this->getSendReceiveDetails().testFlag(Force3LetterAirlineICAO); }
|
||||
void setForce3LetterAirlineCodes(bool force);
|
||||
//! @}
|
||||
|
||||
//! Validate, provide details about issues
|
||||
CStatusMessageList validate() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user