34 enum FreqUnits {Hz, KHz, MHz, GHz, THz};
45 Frequency(
const Frequency &f) : QObject(), freq(f.freq), bandInMHz(f.bandInMHz), tolerance(f.tolerance) {}
46 Frequency(
const double _f, FreqUnits _u = MHz);
51 bool fromDouble(
const double _f, FreqUnits _u = MHz);
52 bool fromQString(
const QString &_f, FreqUnits _u = MHz);
54 double toDouble(FreqUnits _u = MHz)
const;
55 QString toQString(FreqUnits _u = MHz)
const;
56 void setTolerance(
const double _t, FreqUnits _u = Hz);
64 bool operator==(
const Frequency &other)
const;
65 bool operator!=(
const Frequency &other)
const;
66 bool operator>(
const Frequency &other)
const;
67 bool operator<(
const Frequency &other)
const;
68 bool operator>=(
const Frequency &other)
const;
69 bool operator<=(
const Frequency &other)
const;
72 double normalize(
const double _f,
const FreqUnits _u = MHz)
const;
73 double deNormalize(
const double _f,
const FreqUnits _u = MHz)
const;
74 int getDecimals(
const FreqUnits _u = MHz)
const;
76 QString bandInMHz = QString();
77 double tolerance = 0.0;
Definition: tst_frequency.cpp:34
Definition: frequency.h:36