mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-07 17:46:04 -05:00
8215f3412b
Settings option to highlight not worked before entities/grids/calls by mode. Fix issues with highlighting decodes and generally refactor the internal workings of ADIF and QSO recording for worked before detection.
31 lines
705 B
C++
31 lines
705 B
C++
/*
|
|
* Reads cty.dat file
|
|
* Establishes a map between prefixes and their country names
|
|
* VK3ACF July 2013
|
|
*/
|
|
|
|
#ifndef COUNTRY_DAT_H_
|
|
#define COUNTRY_DAT_H_
|
|
|
|
#include <boost/core/noncopyable.hpp>
|
|
#include <QString>
|
|
#include <QHash>
|
|
|
|
class CountryDat final
|
|
: private boost::noncopyable
|
|
{
|
|
public:
|
|
CountryDat ();
|
|
QString find (QString const& call) const; // return country name or ""
|
|
|
|
private:
|
|
QString extractName (QString const& line) const;
|
|
void removeBrackets (QString& line, QString const& a, QString const& b) const;
|
|
QStringList extractPrefix (QString& line, bool& more) const;
|
|
QString fixup (QString country, QString const& call) const;
|
|
|
|
QHash<QString, QString> data_;
|
|
};
|
|
|
|
#endif
|