|
swift
|
COM system (aka "radio") More...
Public Types | |
| enum | ChannelSpacing { ChannelSpacing50KHz , ChannelSpacing25KHz , ChannelSpacing8_33KHz } |
| Channel spacing frequency. More... | |
| enum | ComUnit { Com1 , Com2 } |
| COM unit. | |
| using | base_type = CModulator< CComSystem > |
| Base type. | |
Public Types inherited from swift::misc::aviation::CModulator< CComSystem > | |
| enum | ColumnIndex |
| Column indexes. | |
Public Types inherited from swift::misc::CValueObject< Derived > | |
| using | base_type = CEmpty |
| Base class. | |
Public Types inherited from swift::misc::CEmpty | |
| using | base_type = CEmpty |
| Base class is alias of itself. | |
Public Types inherited from swift::misc::mixin::Index< Derived > | |
| enum | ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString } |
| Base class enums. | |
Public Types inherited from swift::misc::mixin::Index< CComSystem > | |
| enum | ColumnIndex |
| Base class enums. | |
Public Member Functions | |
| CComSystem ()=default | |
| Default constructor. | |
| CComSystem (const QString &name, const physical_quantities::CFrequency &activeFrequency, const physical_quantities::CFrequency &standbyFrequency={ 0, physical_quantities::CFrequencyUnit::nullUnit() }) | |
| Constructor. | |
| void | setFrequencyActiveMHz (double frequencyMHz) |
| Set active frequency. More... | |
| void | setFrequencyStandbyMHz (double frequencyMHz) |
| Set standby frequency. More... | |
| void | setFrequencyActive (const physical_quantities::CFrequency &frequency) |
| Set active frequency. More... | |
| void | setFrequencyStandby (const physical_quantities::CFrequency &frequency) |
| Set active frequency. More... | |
| bool | isActiveFrequencySameFrequency (const physical_quantities::CFrequency &comFrequency) const |
| Is active frequency the same frequency. | |
| void | setActiveUnicom () |
| Set UNICOM frequency as active. | |
| ChannelSpacing | getChannelSpacing () const |
| Get channel spacing. | |
| void | setChannelSpacing (ChannelSpacing spacing) |
| Set channel spacing. | |
Public Member Functions inherited from swift::misc::aviation::CModulator< CComSystem > | |
| void | toggleActiveStandby () |
| Toggle active and standby frequencies. | |
| swift::misc::physical_quantities::CFrequency | getFrequencyActive () const |
| Active frequency. | |
| swift::misc::physical_quantities::CFrequency | getFrequencyStandby () const |
| Standby frequency. | |
| int | getVolumeReceive () const |
| Output volume 0..100. | |
| int | getVolumeTransmit () const |
| Input volume 0..100. | |
| void | setVolumeReceive (int volume) |
| Output volume 0.100. | |
| void | setVolumeTransmit (int volume) |
| Input volume 0..100. | |
| QString | getName () const |
| Name. | |
| bool | isTransmitEnabled () const |
| Enabled? | |
| bool | isReceiveEnabled () const |
| Enabled? | |
| void | setTransmitEnabled (bool enable) |
| Enabled? | |
| void | setReceiveEnabled (bool enable) |
| Enabled? | |
| QVariant | propertyByIndex (swift::misc::CPropertyIndexRef index) const |
| Property by index. More... | |
| void | setPropertyByIndex (swift::misc::CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. More... | |
| int | comparePropertyByIndex (swift::misc::CPropertyIndexRef index, const CComSystem &compareValue) const |
| Compare by property index. | |
| QString | convertToQString (bool i18n=false) const |
| Cast as QString. More... | |
Public Member Functions inherited from swift::misc::mixin::MetaType< Derived > | |
| int | getMetaTypeId () const |
| Returns the Qt meta type ID of this object. More... | |
| QString | getClassName () const |
| Class name. | |
| bool | isA (int metaTypeId) const |
| Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
Public Member Functions inherited from swift::misc::mixin::DBusByMetaClass< Derived > | |
| void | marshallToDbus (QDBusArgument &arg, Tags...) const |
| Marshall without begin/endStructure, for when composed within another object. | |
| void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
| Unmarshall without begin/endStructure, for when composed within another object. | |
Public Member Functions inherited from swift::misc::mixin::DataStreamByMetaClass< Derived > | |
| void | marshalToDataStream (QDataStream &stream) const |
| Marshal a value to a QDataStream. | |
| void | unmarshalFromDataStream (QDataStream &stream) |
| Unmarshal a value from a QDataStream. | |
Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< Derived > | |
| QJsonObject | toJson () const |
| Cast to JSON object. | |
| QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
| Convenience function JSON as string. | |
| void | convertFromJson (const QJsonObject &json) |
| Assign from JSON object. | |
| void | convertFromJson (const QString &jsonString, bool acceptCacheFormat=false) |
| Assign from JSON object string. | |
Public Member Functions inherited from swift::misc::mixin::String< Derived > | |
| QString | toQString (bool i18n=false) const |
| Cast as QString. | |
| std::string | toStdString (bool i18n=false) const |
| To std string. | |
| QString | stringForStreaming () const |
| String for streaming operators. | |
Public Member Functions inherited from swift::misc::mixin::Index< Derived > | |
| CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
| Update by variant map. More... | |
| void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const Derived &compareValue) const |
| Compare for index. | |
| bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
| Is given variant equal to value of property index? | |
Public Member Functions inherited from swift::misc::mixin::Icon< Derived, IconIndex > | |
| CIcons::IconIndex | toIcon () const |
| As icon, not implemented by all classes. | |
Public Member Functions inherited from swift::misc::mixin::MetaType< CComSystem > | |
| int | getMetaTypeId () const |
| Returns the Qt meta type ID of this object. More... | |
| QString | getClassName () const |
| Class name. | |
| bool | isA (int metaTypeId) const |
| Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
Public Member Functions inherited from swift::misc::mixin::Index< CComSystem > | |
| CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
| Update by variant map. More... | |
| void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const CComSystem &compareValue) const |
| Compare for index. | |
| bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
| Is given variant equal to value of property index? | |
Static Public Member Functions | |
| static CComSystem | getCom1System (double activeFrequencyMHz, double standbyFrequencyMHz=-1) |
| COM1 unit. | |
| static CComSystem | getCom1System (const physical_quantities::CFrequency &activeFrequency, const physical_quantities::CFrequency &standbyFrequency={ 0, physical_quantities::CFrequencyUnit::nullUnit() }) |
| COM1 unit. | |
| static CComSystem | getCom2System (double activeFrequencyMHz, double standbyFrequencyMHz=-1) |
| COM2 unit. | |
| static CComSystem | getCom2System (const physical_quantities::CFrequency &activeFrequency, const physical_quantities::CFrequency &standbyFrequency={ 0, physical_quantities::CFrequencyUnit::nullUnit() }) |
| COM2 unit. | |
| static bool | isValidCivilAviationFrequency (const physical_quantities::CFrequency &f) |
| Valid civil aviation frequency? | |
| static bool | isValidMilitaryFrequency (const physical_quantities::CFrequency &f) |
| Valid military aviation frequency? | |
| static bool | isValidComFrequency (const physical_quantities::CFrequency &f) |
| Valid COM frequency (either civil or military) | |
| static void | roundToChannelSpacing (physical_quantities::CFrequency &frequency, ChannelSpacing channelSpacing) |
| Round to channel spacing, set MHz as unit. More... | |
| static bool | isSameFrequency (const physical_quantities::CFrequency &freq1, const physical_quantities::CFrequency &freq2) |
| Compare frequencies under consideration that on VATSIM frequencies .x20/.x25 and .x70/.x75 are the same. | |
| static bool | isValid8_33kHzChannel (int fKHz) |
| Is passed frequency in kHz a valid 8.33 channel. This does not check if the frequency is within the correct bounds. | |
| static int | round8_33kHzChannel (int fKHz) |
| Round passed frequency in kHz to 8.33 frequency spacing. | |
| static bool | isExclusiveWithin8_33kHzChannel (const physical_quantities::CFrequency &freq) |
| Is frequency a "new" 8.33 kHz frequency and not within 25 kHz spacing E.g. returns false for 122.825 but true for 118.305. | |
| static bool | isWithin25kHzChannel (const physical_quantities::CFrequency &freq) |
| Is frequency within 25 kHz frequency spacing. | |
| static physical_quantities::CFrequency | parseComFrequency (const QString &input, physical_quantities::CPqString::SeparatorMode sep) |
| Parses almost any shitty string to a valid COM frequency. | |
| static void | registerMetadata () |
| Register metadata. More... | |
Static Public Member Functions inherited from swift::misc::mixin::MetaType< Derived > | |
| static void | registerMetadata () |
| Register metadata. | |
Static Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< Derived > | |
| template<class DerivedObj = Derived> | |
| static DerivedObj | fromJson (const QJsonObject &json) |
| Get object from QJsonObject. | |
| template<class DerivedObj = Derived> | |
| static DerivedObj | fromJson (const QString &jsonString, bool acceptCacheJson=false) |
| Get object from JSON string. | |
| template<class DerivedObj = Derived> | |
| static DerivedObj | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
| Get object from JSON string. | |
Static Public Member Functions inherited from swift::misc::mixin::MetaType< CComSystem > | |
| static void | registerMetadata () |
| Register metadata. | |
Additional Inherited Members | |
Protected Member Functions inherited from swift::misc::aviation::CModulator< CComSystem > | |
| CModulator () | |
| Default constructor. | |
| CModulator (const QString &name, const swift::misc::physical_quantities::CFrequency &activeFrequency, const swift::misc::physical_quantities::CFrequency &standbyFrequency) | |
| Constructor. | |
| void | setFrequencyActive (const swift::misc::physical_quantities::CFrequency &frequency) |
| Set active frequency. | |
| void | setFrequencyStandby (const swift::misc::physical_quantities::CFrequency &frequency) |
| Set standby frequency. | |
| void | setFrequencyActiveKHz (double frequencyKHz) |
| Set active frequency. | |
| void | setFrequencyStandbyKHz (double frequencyKHz) |
| Set standby frequency. | |
Protected Member Functions inherited from swift::misc::CValueObject< Derived > | |
| CValueObject ()=default | |
| Default constructor. | |
| CValueObject (const CValueObject &)=default | |
| Copy constructor. | |
| CValueObject & | operator= (const CValueObject &)=default |
| Copy assignment operator. | |
| ~CValueObject ()=default | |
| Destructor. | |
| CEmpty ()=default | |
| Inheriting constructors. | |
| CEmpty (const CEmpty &)=default | |
| Inheriting constructors. | |
Protected Member Functions inherited from swift::misc::CEmpty | |
| CEmpty ()=default | |
| Protected default constructor. | |
| CEmpty (const CEmpty &)=default | |
| Protected copy constructor. | |
| CEmpty & | operator= (const CEmpty &)=default |
| Protected copy assignment operator. | |
| ~CEmpty ()=default | |
| Non-virtual protected destructor. | |
Static Protected Member Functions inherited from swift::misc::aviation::CModulator< CComSystem > | |
| static const QString & | NameCom1 () |
| COM1. | |
| static const QString & | NameCom2 () |
| COM2. | |
| static const QString & | NameCom3 () |
| COM3. | |
| static const QString & | NameNav1 () |
| NAV1. | |
| static const QString & | NameNav2 () |
| NAV2. | |
| static const QString & | NameNav3 () |
| NAV3. | |
COM system (aka "radio")
Definition at line 32 of file comsystem.h.
Channel spacing frequency.
| Enumerator | |
|---|---|
| ChannelSpacing50KHz | 50kHz |
| ChannelSpacing25KHz | 25kHz |
| ChannelSpacing8_33KHz | 8.33kHz |
Definition at line 46 of file comsystem.h.
|
static |
Register metadata.
Definition at line 18 of file comsystem.cpp.
|
static |
Round to channel spacing, set MHz as unit.
Definition at line 142 of file comsystem.cpp.
| void swift::misc::aviation::CComSystem::setFrequencyActive | ( | const physical_quantities::CFrequency & | frequency | ) |
Set active frequency.
Definition at line 37 of file comsystem.cpp.
| void swift::misc::aviation::CComSystem::setFrequencyActiveMHz | ( | double | frequencyMHz | ) |
Set active frequency.
Definition at line 25 of file comsystem.cpp.
| void swift::misc::aviation::CComSystem::setFrequencyStandby | ( | const physical_quantities::CFrequency & | frequency | ) |
Set active frequency.
Definition at line 45 of file comsystem.cpp.
| void swift::misc::aviation::CComSystem::setFrequencyStandbyMHz | ( | double | frequencyMHz | ) |
Set standby frequency.
Definition at line 31 of file comsystem.cpp.