diff options
| author | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
| commit | 37f727ac0746fd85504aa46c1f023c09b3eff33a (patch) | |
| tree | c8a7ce04545040a8f161ba279528730bd9a3e6ab /Radio.hpp | |
| parent | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff) | |
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'Radio.hpp')
| -rw-r--r-- | Radio.hpp | 33 |
1 files changed, 21 insertions, 12 deletions
@@ -1,10 +1,12 @@ -#ifndef RADIO_HPP_ -#define RADIO_HPP_ +#ifndef RADIO_HPP__ +#define RADIO_HPP__ #include <QObject> #include <QLocale> #include <QList> +#include "udp_export.h" + class QVariant; class QString; @@ -22,29 +24,36 @@ namespace Radio 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 frequency (QVariant const&, int scale); - FrequencyDelta frequency_delta (QVariant const&, int scale); + Frequency UDP_EXPORT frequency (QVariant const&, int scale, + bool * ok = nullptr, QLocale const& = QLocale ()); + FrequencyDelta UDP_EXPORT frequency_delta (QVariant const&, int scale, + bool * ok = nullptr, QLocale const& = QLocale ()); // // Frequency type formatting // - QString frequency_MHz_string (Frequency, QLocale const& = QLocale ()); - QString frequency_MHz_string (FrequencyDelta, QLocale const& = QLocale ()); - QString pretty_frequency_MHz_string (Frequency, QLocale const& = QLocale ()); - QString pretty_frequency_MHz_string (double, int scale, QLocale const& = QLocale ()); - QString pretty_frequency_MHz_string (FrequencyDelta, QLocale const& = QLocale ()); + 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 is_callsign (QString const&); - bool is_compound_callsign (QString const&); - QString base_callsign (QString); + 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); |
