mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-31 23:57:10 -04:00
ae3749bb46
Build now creates and installs a UDP library that contains the server side of the UDP messaging facility. This library is used by the udp_daemon and message_aggregator reference examples. The new library is currently a static archive but can also be built as a shared library. The library allows third party Qt applications to easily access UDP messages from WSJT-X. Refactored the message_aggregator reference example to split out classes into separate translation units. Added new functionality to exercise the new UDP status fields, highlight own call, CQ/QRZ messages and decodes near Rx DF. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6691 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
#ifndef RADIO_HPP__
|
|
#define RADIO_HPP__
|
|
|
|
#include <QObject>
|
|
#include <QLocale>
|
|
#include <QList>
|
|
|
|
#include "udp_export.h"
|
|
|
|
class QVariant;
|
|
class QString;
|
|
|
|
//
|
|
// Declarations common to radio software.
|
|
//
|
|
|
|
namespace Radio
|
|
{
|
|
//
|
|
// Frequency types
|
|
//
|
|
using Frequency = quint64;
|
|
using Frequencies = QList<Frequency>;
|
|
using FrequencyDelta = qint64;
|
|
|
|
//
|
|
// Qt type registration
|
|
//
|
|
void UDP_NO_EXPORT register_types ();
|
|
|
|
//
|
|
// Frequency type conversion.
|
|
//
|
|
// QVariant argument is convertible to double and is assumed to
|
|
// be scaled by (10 ** -scale).
|
|
//
|
|
Frequency UDP_EXPORT frequency (QVariant const&, int scale, QLocale const& = QLocale ());
|
|
FrequencyDelta UDP_EXPORT frequency_delta (QVariant const&, int scale, QLocale const& = QLocale ());
|
|
|
|
//
|
|
// Frequency type formatting
|
|
//
|
|
QString UDP_EXPORT frequency_MHz_string (Frequency, QLocale const& = QLocale ());
|
|
QString UDP_EXPORT frequency_MHz_string (FrequencyDelta, QLocale const& = QLocale ());
|
|
QString UDP_EXPORT pretty_frequency_MHz_string (Frequency, QLocale const& = QLocale ());
|
|
QString UDP_EXPORT pretty_frequency_MHz_string (double, int scale, QLocale const& = QLocale ());
|
|
QString UDP_EXPORT pretty_frequency_MHz_string (FrequencyDelta, QLocale const& = QLocale ());
|
|
|
|
//
|
|
// Callsigns
|
|
//
|
|
bool UDP_EXPORT is_callsign (QString const&);
|
|
bool UDP_EXPORT is_compound_callsign (QString const&);
|
|
QString UDP_EXPORT base_callsign (QString);
|
|
}
|
|
|
|
Q_DECLARE_METATYPE (Radio::Frequency);
|
|
Q_DECLARE_METATYPE (Radio::Frequencies);
|
|
Q_DECLARE_METATYPE (Radio::FrequencyDelta);
|
|
|
|
#endif
|