diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-15 23:04:33 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-15 23:04:33 +0200 |
| commit | e1c678ef00f0159bbeb5571e5ebb0d4697121334 (patch) | |
| tree | 6547edef81a62a812a4d0f64e03fda226b5f0a7e /models | |
| parent | b9daa22c4c3ad51cd4bc0ef624a19f21d01c9305 (diff) | |
| parent | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (diff) | |
Update upstream source from tag 'upstream/3.0.0_rc1+repack'
Update to upstream version '3.0.0~rc1+repack'
with Debian dir 68c212e23136fecf9ebc6f12ff355579224d27ee
Diffstat (limited to 'models')
| -rwxr-xr-x | models/DecodeHighlightingModel.cpp | 25 | ||||
| -rwxr-xr-x | models/DecodeHighlightingModel.hpp | 1 | ||||
| -rwxr-xr-x | models/FoxLog.cpp | 72 | ||||
| -rwxr-xr-x | models/FoxLog.hpp | 3 | ||||
| -rwxr-xr-x | models/FrequencyList.cpp | 111 | ||||
| -rwxr-xr-x | models/IARURegions.cpp | 4 |
6 files changed, 180 insertions, 36 deletions
diff --git a/models/DecodeHighlightingModel.cpp b/models/DecodeHighlightingModel.cpp index e57ff91e..5b60b335 100755 --- a/models/DecodeHighlightingModel.cpp +++ b/models/DecodeHighlightingModel.cpp @@ -26,6 +26,7 @@ public: }
HighlightItems static const defaults_;
+ HighlightItems static const defaults2_;
HighlightItems data_;
QFont font_;
};
@@ -49,6 +50,25 @@ QList<DecodeHighlightingModel::HighlightInfo> const DecodeHighlightingModel::imp , {Highlight::Tx, true, {}, {Qt::yellow}}
};
+QList<DecodeHighlightingModel::HighlightInfo> const DecodeHighlightingModel::impl::defaults2_ = {
+ {Highlight::LotW, true, {Qt::black}, {}}
+ , {Highlight::MyCall, true, {{0xaa, 0x00, 0x00}}, {{0x00, 0xff, 0xff}}}
+ , {Highlight::Continent, true, {{0xaa, 0x00, 0x00}}, {{0xff, 0x50, 0xff}}}
+ , {Highlight::ContinentBand, true, {{0xaa, 0x00, 0x00}}, {{0xff, 0x82, 0xff}}}
+ , {Highlight::DXCC, true, {{0xaa, 0x00, 0x00}}, {Qt::yellow}}
+ , {Highlight::DXCCBand, true, {{0xaa, 0x00, 0x00}}, {{0xff, 0xff, 0x9b}}}
+ , {Highlight::CQZone, true, {{0xaa, 0x00, 0x00}}, {{0xaa, 0xaa, 0x00}}}
+ , {Highlight::CQZoneBand, true, {{0xaa, 0x00, 0x00}}, {{0xaa, 0xaa, 0x7f}}}
+ , {Highlight::ITUZone, true, {{0xaa, 0x00, 0x00}}, {{0x37, 0xbd, 0xff}}}
+ , {Highlight::ITUZoneBand, true, {{0xaa, 0x00, 0x00}}, {{0x91, 0xde, 0xff}}}
+ , {Highlight::Grid, true, {{0xaa, 0x00, 0x00}}, {{0xff, 0xa8, 0x80}}}
+ , {Highlight::GridBand, true, {{0xaa, 0x00, 0x00}}, {{0xff, 0xcd, 0x9b}}}
+ , {Highlight::Call, true, {{0xaa, 0x00, 0x00}}, {{0x64, 0xff, 0x64}}}
+ , {Highlight::CallBand, true, {{0xaa, 0x00, 0x00}}, {{0xb4, 0xff, 0xb4}}}
+ , {Highlight::CQ, true, {{0xaa, 0x00, 0x00}}, {{0xc3, 0xc3, 0xc3}}}
+ , {Highlight::Tx, true, {Qt::black}, {{0xff, 0xa5, 0xc6}}}
+};
+
bool operator == (DecodeHighlightingModel::HighlightInfo const& lhs, DecodeHighlightingModel::HighlightInfo const& rhs)
{
return lhs.type_ == rhs.type_
@@ -134,6 +154,11 @@ auto DecodeHighlightingModel::default_items () -> HighlightItems const& return impl::defaults_;
}
+auto DecodeHighlightingModel::default_items2 () -> HighlightItems const&
+{
+ return impl::defaults2_;
+}
+
auto DecodeHighlightingModel::items () const -> HighlightItems const&
{
return m_->data_;
diff --git a/models/DecodeHighlightingModel.hpp b/models/DecodeHighlightingModel.hpp index 48462989..b838e3b5 100755 --- a/models/DecodeHighlightingModel.hpp +++ b/models/DecodeHighlightingModel.hpp @@ -39,6 +39,7 @@ public: // access to raw items nd default items
static HighlightItems const& default_items ();
+ static HighlightItems const& default_items2 ();
HighlightItems const& items () const;
void items (HighlightItems const&);
diff --git a/models/FoxLog.cpp b/models/FoxLog.cpp index 81415d5d..c4fac283 100755 --- a/models/FoxLog.cpp +++ b/models/FoxLog.cpp @@ -11,6 +11,7 @@ #include <QSqlQuery>
#include <QTextStream>
#include <QDebug>
+#include "Logger.hpp"
#include "Configuration.hpp"
#include "qt_db_helpers.hpp"
#include "pimpl_impl.hpp"
@@ -37,6 +38,10 @@ public: Configuration const * configuration_;
QSqlQuery mutable dupe_query_;
QSqlQuery mutable export_query_;
+ // queries for rates
+ QSqlQuery mutable rate_n_query_;
+ QSqlQuery mutable rate60m_query_;
+ QString rate();
};
#include "FoxLog.moc"
@@ -118,6 +123,25 @@ FoxLog::impl::impl (Configuration const * configuration) " ORDER BY "
" \"when\"");
+ SQL_error_check (rate_n_query_, &QSqlQuery::prepare,
+ "SELECT "
+ " \"when\""
+ " FROM "
+ " fox_log "
+ " ORDER BY "
+ " \"when\" DESC"
+ " LIMIT :limitn"
+ );
+
+ SQL_error_check (rate60m_query_, &QSqlQuery::prepare,
+ "SELECT "
+ " COUNT() "
+ " FROM "
+ " fox_log "
+ " where \"when\" > :one_hour_ago"
+ " ORDER BY "
+ " \"when\" DESC"
+ );
setEditStrategy (QSqlTableModel::OnFieldChange);
setTable ("fox_log");
setHeaderData (fieldIndex ("when"), Qt::Horizontal, tr ("Date & Time(UTC)"));
@@ -135,6 +159,13 @@ FoxLog::impl::impl (Configuration const * configuration) SQL_error_check (*this, &QSqlTableModel::select);
}
+QString FoxLog::rate()
+{
+ return QString("Last 10: %1, Last 100: %2, Last 60m: %3").arg(QString::number(this->rate_last_n(10),'f',0),
+ QString::number(this->rate_last_n(100),'f',0),
+ QString::number(this->rate_60m()));
+}
+
FoxLog::FoxLog (Configuration const * configuration)
: m_ {configuration}
{
@@ -221,6 +252,47 @@ void FoxLog::reset () }
}
+int FoxLog::rate_60m()
+{
+ int rate60m = 0;
+ qlonglong const& one_hour_ago = QDateTime::currentDateTime().addSecs(-3600).toMSecsSinceEpoch () / 1000;
+
+ // query the 60m rate
+ m_->rate60m_query_.bindValue (":one_hour_ago", one_hour_ago);
+ SQL_error_check (m_->rate60m_query_, static_cast<bool (QSqlQuery::*) ()> (&QSqlQuery::exec));
+ m_->rate60m_query_.next ();
+ rate60m = m_->rate60m_query_.value (0).toLongLong();
+ return rate60m;
+ //
+}
+
+double FoxLog::rate_last_n(int n)
+{
+ double rate_interval = 0;
+
+ qlonglong const& secs_now = QDateTime::currentDateTime().toMSecsSinceEpoch () / 1000;
+
+ // get last n or up to n
+ m_->rate_n_query_.bindValue (":limitn", n);
+ SQL_error_check (m_->rate_n_query_, static_cast<bool (QSqlQuery::*) ()> (&QSqlQuery::exec));
+
+ m_->rate_n_query_.next();
+ if (!m_->rate_n_query_.isValid()) {
+ LOG_ERROR(QString("rate_n result is not valid. Last error %1").arg(m_->rate_n_query_.lastError().text()));
+ return 0.0;
+ }
+ // size / (time_now - time_of_first)
+ m_->rate_n_query_.last();
+ rate_interval = secs_now - m_->rate_n_query_.value (0).toLongLong ();
+ if (rate_interval == 0) return 0.0;
+
+ m_->rate_n_query_.first(); // count the records
+
+ int size = 1;
+ while (m_->rate_n_query_.next() && m_->rate_n_query_.isValid()) size++;
+ return (size/rate_interval) * 3600;
+}
+
namespace
{
struct ADIF_field
diff --git a/models/FoxLog.hpp b/models/FoxLog.hpp index 67ea66bc..850ac1f1 100755 --- a/models/FoxLog.hpp +++ b/models/FoxLog.hpp @@ -26,6 +26,9 @@ public: QSqlTableModel * model ();
void reset ();
void export_qsos (QTextStream&) const;
+ QString rate();
+ double rate_last_n(int n); // get the rate for the last n
+ int rate_60m();
private:
class impl;
diff --git a/models/FrequencyList.cpp b/models/FrequencyList.cpp index 03176584..be1e2e47 100755 --- a/models/FrequencyList.cpp +++ b/models/FrequencyList.cpp @@ -70,7 +70,7 @@ namespace {1838000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // squeezed allocations
{1839000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{1839000, Modes::FST4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {1840000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {1840000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
// Band plans (all USB dial unless stated otherwise)
//
@@ -99,14 +99,21 @@ namespace // 3580 PSK31
// 3600 LSB EMCOMM
//
+ {3567000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // DXpedition
{3570000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // JA compatible
{3572000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {3573000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // above as below JT65 is out of DM allocation
+ {3573000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true}, // above as below JT65 is out of DM allocation
{3568600, Modes::WSPR, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // needs guard marker and lock out
- {3575000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // provisional
+ {3568600, Modes::FST4W, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // needs guard marker and lock out
+ {3575000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true}, // provisional
{3568000, Modes::FT4, IARURegions::R3, "","", QDateTime(), QDateTime(), false}, // provisional
- // Band plans (all USB dial unless stated otherwise)
+ {5357000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // provisional
+ {5357000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // provisional
+ {5357000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true}, // provisional
+ {5357000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true}, // provisional
+
+ // Band plans (all USB dial unless stated otherwise)
//
// R1: 7040 - 7050 DM NB(<500Hz) with 7047 - 7050 ACDS
// 7050 - 7060 DM WB(<2700Hz) with 7050 - 7053 ACDS
@@ -138,10 +145,12 @@ namespace // 7110 LSB EMCOMM
//
{7038600, Modes::WSPR, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {7074000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {7038600, Modes::FST4W, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {7056000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // DXpedition
+ {7074000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
{7076000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{7078000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {7047500, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // provisional - moved
+ {7047500, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true}, // provisional - moved
// up 500Hz to clear
// W1AW code practice QRG
@@ -171,11 +180,13 @@ namespace // 10142.25 OLIVIA, Contestia, etc.
// 10143.25 OLIVIA, Contestia, etc. (main QRG)
//
- {10136000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {10131000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // DXpedition
+ {10136000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
{10138000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{10138700, Modes::WSPR, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {10138700, Modes::FST4W, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{10140000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {10140000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // provisional
+ {10140000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true}, // provisional
// Band plans (all USB dial unless stated otherwise)
//
@@ -215,10 +226,13 @@ namespace // 14106.5 OLIVIA 1000 (main QRG)
//
{14095600, Modes::WSPR, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {14074000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {14095600, Modes::FST4W, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {14074000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
+ {14090000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // DXpedition
{14076000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{14078000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {14080000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // provisional
+ {14080000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true}, // provisional
+
// Band plans (all USB dial unless stated otherwise)
//
@@ -247,33 +261,41 @@ namespace // 18104.4 OLIVIA, Contestia, etc.
// 18110 NCDXF beacons
//
- {18100000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {18095000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // DXpedition
+ {18100000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
{18102000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{18104000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {18104000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // provisional
+ {18104000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true}, // provisional
{18104600, Modes::WSPR, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {18104600, Modes::FST4W, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {21074000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {21074000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
+ {21091000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // DXpedition
{21076000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{21078000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{21094600, Modes::WSPR, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {21140000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {21094600, Modes::FST4W, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {21140000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
- {24915000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {24911000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // DXpedition
+ {24915000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
{24917000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{24919000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {24919000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // provisional
+ {24919000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true}, // provisional
{24924600, Modes::WSPR, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {24924600, Modes::FST4W, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {28074000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {28074000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
+ {28091000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // DXpedition
{28076000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{28078000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{28124600, Modes::WSPR, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {28180000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {28124600, Modes::FST4W, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {28180000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
{50200000, Modes::Echo, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {50211000, Modes::Q65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {50275000, Modes::Q65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {50211000, Modes::Q65, IARURegions::ALL, "EME","", QDateTime(), QDateTime(), false},
+ {50275000, Modes::Q65, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
{50276000, Modes::JT65, IARURegions::R2, "","", QDateTime(), QDateTime(), false},
{50276000, Modes::JT65, IARURegions::R3, "","", QDateTime(), QDateTime(), false},
{50380000, Modes::MSK144, IARURegions::R1, "","", QDateTime(), QDateTime(), false},
@@ -281,36 +303,43 @@ namespace {50260000, Modes::MSK144, IARURegions::R3, "","", QDateTime(), QDateTime(), false},
{50293000, Modes::WSPR, IARURegions::R2, "","", QDateTime(), QDateTime(), false},
{50293000, Modes::WSPR, IARURegions::R3, "","", QDateTime(), QDateTime(), false},
+ {50293000, Modes::FST4W, IARURegions::R2, "","", QDateTime(), QDateTime(), false},
+ {50293000, Modes::FST4W, IARURegions::R3, "","", QDateTime(), QDateTime(), false},
{50310000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{50312000, Modes::JT9, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {50313000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {50318000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // provisional
- {50323000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {50313000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
+ {50318000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true}, // provisional
+ {50323000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false}, // intercontinental
{70102000, Modes::JT65, IARURegions::R1, "","", QDateTime(), QDateTime(), false},
{70104000, Modes::JT9, IARURegions::R1, "","", QDateTime(), QDateTime(), false},
{70091000, Modes::WSPR, IARURegions::R1, "","", QDateTime(), QDateTime(), false},
- {70154000, Modes::FT8, IARURegions::R1, "","", QDateTime(), QDateTime(), false},
+ {70091000, Modes::FST4W, IARURegions::R1, "","", QDateTime(), QDateTime(), false},
+ {70154000, Modes::FT8, IARURegions::R1, "","", QDateTime(), QDateTime(), true},
{70230000, Modes::MSK144, IARURegions::R1, "","", QDateTime(), QDateTime(), false},
- {144116000, Modes::Q65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {144116000, Modes::Q65, IARURegions::ALL, "EME","", QDateTime(), QDateTime(), false},
{144120000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{144120000, Modes::Echo, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {144170000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {144174000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {144170000, Modes::FT4, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
+ {144174000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
+ {144180000, Modes::Q65, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
{144360000, Modes::MSK144, IARURegions::R1, "","", QDateTime(), QDateTime(), false},
{144150000, Modes::MSK144, IARURegions::R2, "","", QDateTime(), QDateTime(), false},
{144489000, Modes::WSPR, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
+ {144489000, Modes::FST4W, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
{222065000, Modes::Echo, IARURegions::R2, "","", QDateTime(), QDateTime(), false},
{222065000, Modes::JT65, IARURegions::R2, "","", QDateTime(), QDateTime(), false},
{222065000, Modes::Q65, IARURegions::R2, "","", QDateTime(), QDateTime(), false},
+ {222174000, Modes::FT8, IARURegions::R2, "","", QDateTime(), QDateTime(), true},
{432065000, Modes::Echo, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{432065000, Modes::JT65, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
+ {432174000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
{432300000, Modes::WSPR, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
{432360000, Modes::MSK144, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
- {432065000, Modes::Q65, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
+ {432065000, Modes::Q65, IARURegions::ALL,"EME","", QDateTime(), QDateTime(), false},
{902065000, Modes::JT65, IARURegions::R2, "","", QDateTime(), QDateTime(), false},
{902065000, Modes::Q65, IARURegions::R2, "","", QDateTime(), QDateTime(), false},
@@ -319,6 +348,7 @@ namespace {1296065000, Modes::JT65, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
{1296500000, Modes::WSPR, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
{1296065000, Modes::Q65, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
+ {1296174000, Modes::FT8, IARURegions::ALL, "","", QDateTime(), QDateTime(), true},
{2301000000, Modes::Echo, IARURegions::ALL, "","", QDateTime(), QDateTime(), false},
{2301065000, Modes::JT4, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
@@ -334,6 +364,7 @@ namespace {2320065000, Modes::JT4, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
{2320065000, Modes::JT65, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
{2320065000, Modes::Q65, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
+ {2400040000, Modes::ALL, IARURegions::ALL,"QO-100 Uplink","", QDateTime(), QDateTime(), false},
{3400065000, Modes::Echo, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
{3400065000, Modes::JT4, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
@@ -348,6 +379,7 @@ namespace {10368100000, Modes::Echo, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
{10368200000, Modes::JT4, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
{10368200000, Modes::Q65, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
+ {10489540000, Modes::ALL, IARURegions::ALL,"QO-100 Downlink","", QDateTime(), QDateTime(), false},
{24048100000, Modes::Echo, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
{24048200000, Modes::JT4, IARURegions::ALL,"","", QDateTime(), QDateTime(), false},
@@ -659,7 +691,7 @@ QModelIndex FrequencyList_v2_101::impl::add (Item f) endInsertRows ();
// if we added one that had a preferred frequency, unprefer everything else
- unprefer_all_but(f, row, {Qt::DisplayRole, Qt::CheckStateRole});
+ if (f.preferred_) unprefer_all_but(f, row, {Qt::DisplayRole, Qt::CheckStateRole});
return index (row, 0);
}
@@ -824,7 +856,7 @@ QVariant FrequencyList_v2_101::impl::data (QModelIndex const& index, int role) c Radio::pretty_frequency_MHz_string(frequency_item.frequency_)
+ " MHz (" + (band.isEmpty() ? "OOB" : band) + ")" +
(((frequency_item.start_time_.isValid() && !frequency_item.start_time_.isNull()) ||
- (frequency_item.end_time_.isValid() && !frequency_item.end_time_.isNull())) ? " \u2016 " : "")
+ (frequency_item.end_time_.isValid() && !frequency_item.end_time_.isNull())) ? " \u2502 " : "")
+ desc_text;
}
break;
@@ -1335,8 +1367,10 @@ FrequencyList_v2_101::FrequencyItems FrequencyList_v2_101::from_json_file(QFile {
throw ReadFileException{tr ("No Frequencies were found")};
}
+#ifdef DUMP_ENTRY_COUNTS
int valid_entry_count = 0;
int skipped_entry_count = 0;
+#endif
for (auto const &item: arr)
{
QString mode_s, region_s;
@@ -1359,15 +1393,24 @@ FrequencyList_v2_101::FrequencyItems FrequencyList_v2_101::from_json_file(QFile freq.isSane())
{
list.push_back(freq);
+#ifdef DUMP_ENTRY_COUNTS
valid_entry_count++;
- } else
+#endif
+ } else {
+#ifdef DUMP_ENTRY_COUNTS
skipped_entry_count++;
+#endif
+ }
}
- //MessageBox::information_message(this, tr("Loaded Frequencies from %1").arg(file_name),
- // tr("Entries Valid/Skipped %1").arg(QString::number(valid_entry_count) + "/" +
- // QString::number(skipped_entry_count)));
+
+#ifdef DUMP_ENTRY_COUNTS
+ MessageBox::information_message(this, tr("Loaded Frequencies from %1").arg(file_name),
+ tr("Entries Valid/Skipped %1").arg(QString::number(valid_entry_count) + "/" +
+ QString::number(skipped_entry_count)));
+#endif
return list;
}
+
// write JSON format to a file
void FrequencyList_v2_101::to_json_file(QFile *output_file, QString magic_s, QString version_s,
FrequencyItems const &frequency_items)
diff --git a/models/IARURegions.cpp b/models/IARURegions.cpp index a472de9d..f1a7dda4 100755 --- a/models/IARURegions.cpp +++ b/models/IARURegions.cpp @@ -39,7 +39,7 @@ IARURegions::Region IARURegions::value (QString const& s) auto end = region_names + region_names_size;
auto p = std::find_if (region_names, end
, [&s] (char const * const name) {
- return name == s;
+ return tr (name) == s;
});
return p != end ? static_cast<Region> (p - region_names) : ALL;
}
@@ -64,7 +64,7 @@ QVariant IARURegions::data (QModelIndex const& index, int role) const case Qt::DisplayRole:
case Qt::AccessibleTextRole:
- item = region_names[row];
+ item = tr (region_names[row]);
break;
case Qt::TextAlignmentRole:
|
