summaryrefslogtreecommitdiff
path: root/map65/decode_label.h
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
committerhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
commitc25cbdf6fb6d946175f4335fab77bfea601b56db (patch)
tree6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /map65/decode_label.h
parent71f5689252c9f13e70e1c24856904475b2307809 (diff)
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'map65/decode_label.h')
-rw-r--r--map65/decode_label.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/map65/decode_label.h b/map65/decode_label.h
new file mode 100644
index 00000000..ecf63145
--- /dev/null
+++ b/map65/decode_label.h
@@ -0,0 +1,51 @@
+#ifndef MAP65_DECODE_LABEL_H
+#define MAP65_DECODE_LABEL_H
+
+#include <QString>
+#include <QtGlobal>
+
+// One decoded-callsign label drawn on top of the WideGraph waterfall
+// at its audio-offset x-position. WideGraph maintains a list of these
+// (refreshed each time mainwindow taps the decode-append path); CPlotter
+// reads the list via setDecodeLabels() and overlays them in paintEvent.
+//
+// Lives in its own header so widegraph.h and plotter.h can both include
+// it without creating a circular dependency between the two larger
+// headers.
+//
+// Mirrors qmap/decode_label.h — MAP65 port (N6NU 2026-05-12) matches
+// the QMAP feature exactly.
+struct DecodeLabel {
+ double freq_khz; // audio offset (kHz), straight from the decode line
+ QString callsign; // sender's call extracted from the message field
+ qint64 last_seen_ms; // wall-clock of most recent fresh decode
+ int hits; // for tie-breaking when stacking
+ bool is_jt65; // true = JT65 (orange label); false = Q65 (yellow)
+
+ DecodeLabel(double f, const QString& c, qint64 t, int h, bool jt65)
+ : freq_khz(f), callsign(c), last_seen_ms(t), hits(h), is_jt65(jt65) {}
+ DecodeLabel() : freq_khz(0), last_seen_ms(0), hits(0), is_jt65(false) {}
+};
+
+// Font-size choice for the callsign overlay. Menu values:
+// 7 pt = Small (tightest packing, hardest to read at distance)
+// 8 pt = Normal (default — fits dense bands, still legible)
+// 10 pt = Medium (more readable, more stacking pressure)
+// 12 pt = Large (easiest to read, biggest stacking pressure)
+enum class DecodeLabelFontSize {
+ Small = 7,
+ Normal = 8,
+ Medium = 10,
+ Large = 12,
+};
+
+// Anchor position for the callsign overlay on the upper waterfall.
+// Mirrors qmap/decode_label.h. Top = stack down from waterfall top
+// (legacy); Bottom = stack up from the divider so fresh signals at
+// the top of the waterfall stay visible.
+enum class DecodeLabelPosition {
+ Top = 0,
+ Bottom = 1,
+};
+
+#endif // MAP65_DECODE_LABEL_H