| 66 | } // namespace |
| 67 | |
| 68 | BandStackKeyResult resolveBandStackKey(const QString& bandName, |
| 69 | const QVector<Transverter>& xvtrs, |
| 70 | ModelCapabilities caps) |
| 71 | { |
| 72 | static const QMap<QString, int> kNumericBandSlots = { |
| 73 | { QStringLiteral("WWV"), 33 }, |
| 74 | { QStringLiteral("GEN"), 34 }, |
| 75 | }; |
| 76 | |
| 77 | const QString radioKey = normalizedNativeBandKey(bandName, caps); |
| 78 | if (isNativeBandKey(radioKey, caps)) |
| 79 | return {radioKey, {}}; |
| 80 | |
| 81 | if (kNumericBandSlots.contains(bandName)) |
| 82 | return {QString::number(kNumericBandSlots.value(bandName)), {}}; |
| 83 | |
| 84 | for (const auto& xvtr : xvtrs) { |
| 85 | if (!xvtr.isValid || xvtr.name != bandName) |
| 86 | continue; |
| 87 | |
| 88 | return {QString("X%1").arg(xvtr.index), {}}; |
| 89 | } |
| 90 | |
| 91 | return { |
| 92 | {}, |
| 93 | QString("Band %1 has no Flex display pan band= mapping").arg(bandName) |
| 94 | }; |
| 95 | } |
| 96 | |
| 97 | bool isWaterfallTileOutsidePan(double lowMhz, double highMhz, double panCenterMhz) |
| 98 | { |