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:
Klaus Basan
2014-12-22 21:17:13 +01:00
parent d0b5fc1249
commit b26fa651ed
25 changed files with 182 additions and 55 deletions

View File

@@ -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)