From 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Thu, 9 Jan 2025 22:12:06 +0100 Subject: New upstream version 2.7.0~rc8+repack --- Radio.hpp | 134 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 67 insertions(+), 67 deletions(-) (limited to 'Radio.hpp') diff --git a/Radio.hpp b/Radio.hpp index e1646cf6..385e07fc 100755 --- a/Radio.hpp +++ b/Radio.hpp @@ -1,67 +1,67 @@ -#ifndef RADIO_HPP__ -#define RADIO_HPP__ - -#include -#include -#include - -#include "udp_export.h" - -class QVariant; -class QString; - -// -// Declarations common to radio software. -// - -namespace Radio -{ - // - // Frequency types - // - using Frequency = quint64; - using Frequencies = QList; - 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 = 0, - bool * ok = nullptr, QLocale const& = QLocale ()); - FrequencyDelta UDP_EXPORT frequency_delta (QVariant const&, int scale = 0, - bool * ok = nullptr, QLocale const& = QLocale ()); - Frequency UDP_EXPORT frequency (double, int scale = 0, bool * ok = nullptr); - FrequencyDelta UDP_EXPORT frequency_delta (double, int scale = 0, bool * ok = nullptr); - - // - // Frequency type formatting - // - QString UDP_EXPORT frequency_MHz_string (Frequency, int precision = 6, QLocale const& = QLocale ()); - QString UDP_EXPORT frequency_MHz_string (FrequencyDelta, int precision = 6, 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&); - bool is_77bit_nonstandard_callsign (QString const&); - QString UDP_EXPORT base_callsign (QString); - QString UDP_EXPORT effective_prefix (QString); -} - -Q_DECLARE_METATYPE (Radio::Frequency); -Q_DECLARE_METATYPE (Radio::Frequencies); -Q_DECLARE_METATYPE (Radio::FrequencyDelta); - -#endif +#ifndef RADIO_HPP__ +#define RADIO_HPP__ + +#include +#include +#include + +#include "udp_export.h" + +class QVariant; +class QString; + +// +// Declarations common to radio software. +// + +namespace Radio +{ + // + // Frequency types + // + using Frequency = quint64; + using Frequencies = QList; + 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 = 0, + bool * ok = nullptr, QLocale const& = QLocale ()); + FrequencyDelta UDP_EXPORT frequency_delta (QVariant const&, int scale = 0, + bool * ok = nullptr, QLocale const& = QLocale ()); + Frequency UDP_EXPORT frequency (double, int scale = 0, bool * ok = nullptr); + FrequencyDelta UDP_EXPORT frequency_delta (double, int scale = 0, bool * ok = nullptr); + + // + // Frequency type formatting + // + QString UDP_EXPORT frequency_MHz_string (Frequency, int precision = 6, QLocale const& = QLocale ()); + QString UDP_EXPORT frequency_MHz_string (FrequencyDelta, int precision = 6, 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&); + bool is_77bit_nonstandard_callsign (QString const&); + QString UDP_EXPORT base_callsign (QString); + QString UDP_EXPORT effective_prefix (QString); +} + +Q_DECLARE_METATYPE (Radio::Frequency); +Q_DECLARE_METATYPE (Radio::Frequencies); +Q_DECLARE_METATYPE (Radio::FrequencyDelta); + +#endif -- cgit v1.2.3