6 #ifndef SWIFT_MISC_NETWORK_FSDSETUP_H
7 #define SWIFT_MISC_NETWORK_FSDSETUP_H
20 namespace swift::misc::network
29 IndexTextCodec = CPropertyIndexRef::GlobalIndexCFsdSetup,
30 IndexSendReceiveDetails
37 SendAircraftParts = 1 << 0,
38 SendInterimPositions = 1 << 1,
40 ReceiveAircraftParts = 1 << 3,
41 ReceiveInterimPositions = 1 << 4,
42 ReceiveGndFlag = 1 << 5,
43 Force3LetterAirlineICAO = 1 << 6,
44 SendVisualPositions = 1 << 7,
45 ReceiveEuroscopeSimData = 1 << 8,
46 SendFplWithIcaoEquipment = 1 << 9,
47 AllSending = SendAircraftParts | SendInterimPositions | SendVisualPositions | SendGndFlag,
48 AllReceive = ReceiveAircraftParts | ReceiveInterimPositions | ReceiveGndFlag,
49 All = AllReceive | AllSending,
50 AllParts = SendAircraftParts | ReceiveAircraftParts,
51 AllSendingWithoutGnd = AllSending - SendGndFlag,
52 AllReceiveWithoutGnd = AllReceive - ReceiveGndFlag,
53 AllInterimPositions = SendInterimPositions | ReceiveInterimPositions,
54 AllWithoutGnd = AllReceiveWithoutGnd | AllSendingWithoutGnd,
55 VATSIMDefault = AllParts | Force3LetterAirlineICAO | SendVisualPositions | SendFplWithIcaoEquipment
57 Q_DECLARE_FLAGS(SendReceiveDetails, SendReceiveDetailsFlag)
62 static constexpr qint64 c_positionTimeOffsetMsec = 6000;
63 static constexpr qint64 c_interimPositionTimeOffsetMsec =
71 CFsdSetup(SendReceiveDetails sendReceive);
74 CFsdSetup(
const QString &codec, SendReceiveDetails sendReceive = All);
80 void setTextCodec(
const QString &codec) { m_textCodec = codec.trimmed(); }
83 SendReceiveDetails getSendReceiveDetails()
const;
95 void setSendReceiveDetails(
bool partsSend,
bool partsReceive,
bool gndSend,
bool gndReceive,
bool interimSend,
96 bool interimReceive,
bool visualSend,
bool euroscopeSimDataReceive,
101 bool sendAircraftParts()
const {
return this->getSendReceiveDetails().testFlag(SendAircraftParts); }
102 bool sendGndFlag()
const {
return this->getSendReceiveDetails().testFlag(SendGndFlag); }
107 bool receiveGndFlag()
const {
return this->getSendReceiveDetails().testFlag(ReceiveGndFlag); }
112 return this->getSendReceiveDetails().testFlag(SendFplWithIcaoEquipment);
120 return this->getSendReceiveDetails().testFlag(Force3LetterAirlineICAO);
122 void setForce3LetterAirlineCodes(
bool force);
138 QString convertToQString(
bool i18n =
false)
const;
141 static QString sendReceiveDetailsToString(SendReceiveDetails details);
144 static const CFsdSetup &vatsimStandard();
147 QString m_textCodec =
"latin1";
148 int m_sendReceive =
static_cast<int>(All);
158 Q_DECLARE_METATYPE(swift::misc::network::CFsdSetup::SendReceiveDetails)
160 Q_DECLARE_OPERATORS_FOR_FLAGS(swift::misc::network::CFsdSetup::SendReceiveDetails)
Non-owning reference to a CPropertyIndex with a subset of its features.
Status messages, e.g. from Core -> GUI.
Mix of the most commonly used mixin classes.
ColumnIndex
Base class enums.
Value object for a FSD setup.
bool sendInterimPositions() const
FSD setup flags.
bool receiveGndFlag() const
FSD setup flags.
bool sendGndFlag() const
FSD setup flags.
bool receiveInterimPositions() const
FSD setup flags.
bool shouldSendFlightPlanEquipmentInIcaoFormat() const
FSD setup flags.
void addSendReceiveDetails(SendReceiveDetails sendReceive)
Add send / receive details.
bool receiveAircraftParts() const
FSD setup flags.
void setSendReceiveDetails(SendReceiveDetails sendReceive)
Set send / receive details.
const QString & getTextCodec() const
Get codec.
bool sendAircraftParts() const
FSD setup flags.
bool force3LetterAirlineCodes() const
Airline codes.
bool receiveEuroscopeSimData() const
FSD setup flags.
bool sendVisualPositions() const
FSD setup flags.
void removeSendReceiveDetails(SendReceiveDetails sendReceive)
Remove send / receive details.
void setTextCodec(const QString &codec)
Set codec.
SendReceiveDetailsFlag
Send/receive details.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...