diff options
| author | Dave Hibberd <hibby@debian.org> | 2026-10-20 22:35:06 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2026-10-20 22:35:06 +0100 |
| commit | 82ebb1ed1af30cee4dfbb1c628431d32885a00e0 (patch) | |
| tree | 1a1f782d3e576b758be0bc61171574a7cd8f2376 /models/FrequencyList.hpp | |
| parent | 061658210acb6425517733ea012dda803a7f72a1 (diff) | |
| parent | 61d684922b0f1c8455cc60eb3d123df058c9e1f5 (diff) | |
Merge tag 'debian/3.3.0_beta2+dfsg-1' into hibbian/trixie-backports
tagging wsjtx 3.3.0~beta2+dfsg-1
Diffstat (limited to 'models/FrequencyList.hpp')
| -rw-r--r-- | models/FrequencyList.hpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/models/FrequencyList.hpp b/models/FrequencyList.hpp index 04b51a86..b6af4b6d 100644 --- a/models/FrequencyList.hpp +++ b/models/FrequencyList.hpp @@ -4,6 +4,7 @@ #include "pimpl_h.hpp" #include <QList> +#include <QMap> #include <QSortFilterProxyModel> #include <QDateTime> #include <QJsonObject> @@ -70,6 +71,18 @@ public: using FrequencyItems = QList<Item>; using BandSet = QSet<QString>; + struct ImportReport + { + int entries {0}; + int imported {0}; + int invalid_frequency {0}; + QMap<QString, int> unknown_modes; + int invalid_region {0}; + int invalid_item {0}; + + int skipped () const { return entries - imported; } + }; + enum Column {region_column, mode_column, frequency_column, frequency_mhz_column, description_column, start_time_column, end_time_column, source_column, preferred_column, SENTINAL}; // an iterator that meets the requirements of the C++ for range statement @@ -100,10 +113,11 @@ public: // Load and store underlying items FrequencyItems frequency_list (FrequencyItems); FrequencyItems const& frequency_list () const; + static FrequencyItems const& default_items (); FrequencyItems frequency_list (QModelIndexList const&) const; void frequency_list_merge (FrequencyItems const&); void to_json_file(QFile *, QString, QString, FrequencyItems const&); - static FrequencyItems from_json_file(QFile *); + static FrequencyItems from_json_file(QFile *, ImportReport * = nullptr); // Iterators for the sorted and filtered items // |
