mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 18:25:37 +08:00
Allow to select COM frequencies from ATC view (context menu)
* added functions in component to select COM frequencies * changed views to contain ObjectType in template * function to obtain selected objects in view base class
This commit is contained in:
@@ -30,9 +30,7 @@ namespace BlackMisc
|
||||
|
||||
namespace Aviation
|
||||
{
|
||||
/*!
|
||||
* COM system (aka "radio")
|
||||
*/
|
||||
//! COM system (aka "radio")
|
||||
class CComSystem : public CValueObjectStdTuple<CComSystem, CModulator<CComSystem>>
|
||||
{
|
||||
public:
|
||||
@@ -44,6 +42,14 @@ namespace BlackMisc
|
||||
ChannelSpacing8_33KHz
|
||||
};
|
||||
|
||||
//! COM unit
|
||||
enum ComUnit
|
||||
{
|
||||
Com1,
|
||||
Com2,
|
||||
Com3
|
||||
};
|
||||
|
||||
//! Default constructor
|
||||
CComSystem() : m_channelSpacing(ChannelSpacing25KHz) {}
|
||||
|
||||
@@ -166,17 +172,19 @@ namespace BlackMisc
|
||||
virtual bool validValues() const override;
|
||||
|
||||
private:
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CComSystem)
|
||||
ChannelSpacing m_channelSpacing;
|
||||
ChannelSpacing m_channelSpacing; //!< channel spacing
|
||||
|
||||
/*!
|
||||
* Give me channel spacing in KHz
|
||||
* \remarks Just a helper method, that is why no CFrequency is returned
|
||||
*/
|
||||
static double channelSpacingToFrequencyKHz(ChannelSpacing channelSpacing);
|
||||
|
||||
BLACK_ENABLE_TUPLE_CONVERSION(CComSystem)
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CComSystem, (o.m_channelSpacing))
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CComSystem)
|
||||
|
||||
Reference in New Issue
Block a user