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. | |
![]() | |
enum | ColumnIndex |
Column indexes. | |
![]() | |
using | base_type = CEmpty |
Base class. | |
![]() | |
using | base_type = CEmpty |
Base class is alias of itself. | |
![]() | |
enum | ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString } |
Base class enums. | |
![]() | |
enum | ColumnIndex |
Base class enums. | |
Public Member Functions | |
CComSystem () | |
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. | |
![]() | |
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... | |
![]() | |
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. | |
![]() | |
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. | |
![]() | |
void | marshalToDataStream (QDataStream &stream) const |
Marshal a value to a QDataStream. | |
void | unmarshalFromDataStream (QDataStream &stream) |
Unmarshal a value from a QDataStream. | |
![]() | |
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. | |
![]() | |
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. | |
![]() | |
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? | |
![]() | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. | |
![]() | |
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. | |
![]() | |
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 void | registerMetadata () |
Register metadata. | |
![]() | |
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 void | registerMetadata () |
Register metadata. | |
Additional Inherited Members | |
![]() | |
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. | |
![]() | |
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. | |
![]() | |
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 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 144 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.