diff options
| author | Christoph Berg <myon@debian.org> | 2018-12-19 22:58:32 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2018-12-19 22:58:32 +0100 |
| commit | e0737c56c1e384e05064a0c6e1ac46979371041b (patch) | |
| tree | a0123d694a2d36c43dabdf0a3907392fce11d457 /logbook/AD1CCty.hpp | |
| parent | b4aebf2d137b892f53503b13785ecae900062ff7 (diff) | |
New upstream version 2.0.0+repackupstream/2.0.0+repack
Diffstat (limited to 'logbook/AD1CCty.hpp')
| -rw-r--r-- | logbook/AD1CCty.hpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/logbook/AD1CCty.hpp b/logbook/AD1CCty.hpp new file mode 100644 index 00000000..37cada3e --- /dev/null +++ b/logbook/AD1CCty.hpp @@ -0,0 +1,55 @@ +#ifndef AD1C_CTY_HPP_ +#define AD1C_CTY_HPP_ + +#include <boost/core/noncopyable.hpp> +#include <QObject> +#include "pimpl_h.hpp" + +// +// AD1CCty - Fast access database of Jim Reisert, AD1C's, cty.dat +// entity and entity override information file. +// +class AD1CCty final + : public QObject + , private boost::noncopyable +{ + Q_OBJECT + +public: + // + // Continent enumeration + // + enum class Continent {UN, AF, AN, AS, EU, NA, OC, SA}; + static Continent continent (QString const& continent_id); + static char const * continent (Continent); + Q_ENUM (Continent) + + struct Record + { + explicit Record (); + + Continent continent; + int CQ_zone; + int ITU_zone; + QString entity_name; + bool WAE_only; + float latitude; + float longtitude; + int UTC_offset; + QString primary_prefix; + }; + + explicit AD1CCty (); + ~AD1CCty (); + Record lookup (QString const& call) const; + +private: + class impl; + pimpl<impl> m_; +}; + +#if !defined (QT_NO_DEBUG_STREAM) +QDebug operator << (QDebug, AD1CCty::Record const&); +#endif + +#endif |
