mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
refs #319, added column formatters
* Specialized formatters (e.g. for bool, for PQs etc.) allow specialized look and feel for each column * Fixed isValidComFrequency used for formatters * Changed models to use formatters * Outdated propertyByIndexAsString methods removed * During the above tasks: fixed override keyword in some places * Column tooltips * refs #323, wrong column name fix
This commit is contained in:
@@ -130,6 +130,7 @@ namespace BlackMisc
|
||||
//! Valid civil aviation frequency?
|
||||
static bool isValidCivilAviationFrequency(const BlackMisc::PhysicalQuantities::CFrequency &f)
|
||||
{
|
||||
if (f.isNull()) return false;
|
||||
double fr = f.valueRounded(BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz(), 3);
|
||||
return fr >= 118.0 && fr <= 136.975;
|
||||
}
|
||||
@@ -137,10 +138,17 @@ namespace BlackMisc
|
||||
//! Valid military aviation frequency?
|
||||
static bool isValidMilitaryFrequency(const BlackMisc::PhysicalQuantities::CFrequency &f)
|
||||
{
|
||||
if (f.isNull()) return false;
|
||||
double fr = f.valueRounded(BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz(), 3);
|
||||
return fr >= 220.0 && fr <= 399.95;
|
||||
}
|
||||
|
||||
//! Valid COM frequency (either civil or military)
|
||||
static bool isValidComFrequency(const BlackMisc::PhysicalQuantities::CFrequency &f)
|
||||
{
|
||||
return isValidCivilAviationFrequency(f) || isValidMilitaryFrequency(f);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Round to channel spacing, set MHz as unit
|
||||
* \see ChannelSpacing
|
||||
|
||||
Reference in New Issue
Block a user