From d83a420f0517d7fc47aeb288a6a0cf4891784fcc Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Mon, 22 Jun 2026 12:03:44 +0200 Subject: New upstream version 3.0.2+dfsg --- map65/plotter.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'map65/plotter.h') diff --git a/map65/plotter.h b/map65/plotter.h index 36f0bcd0..1147b12e 100644 --- a/map65/plotter.h +++ b/map65/plotter.h @@ -10,9 +10,11 @@ #include #include #include +#include #include #include #include "commons.h" +#include "decode_label.h" #define VERT_DIVS 7 //specify grid screen divisions #define HORZ_DIVS 20 @@ -75,6 +77,26 @@ public: double txFreq(); // void updateFreqLabel(); + // Decoded-callsign overlay (N6NU 2026-05-12, ported from QMAP). + // WideGraph maintains the list and pushes it here; we render the + // callsigns as labels on top of the waterfall at the audio-offset + // x-position. Triggers update() to schedule a paintEvent. + void setDecodeLabels(const QList& labels); + // Master alpha (0..255) scaling every label's background/tick/text + // alpha proportionally. 255 = no change to the legacy colours; lower + // values let more of the waterfall show through. View menu offers + // None=255, Medium=200, High=175. + void setDecodeLabelAlpha(int alpha); + // Font-size picker for the overlay (Small=7, Normal=8 default, + // Medium=10, Large=12). Triggers update() to repaint. + void setDecodeLabelFontSize(DecodeLabelFontSize sz); + DecodeLabelFontSize decodeLabelFontSize() const { return m_decodeFontSize; } + // Anchor position for the overlay (Top = legacy stack-down from + // waterfall top; Bottom = stack-up from the divider so fresh + // signals at the top of the waterfall remain visible). + void setDecodeLabelPosition(DecodeLabelPosition p); + DecodeLabelPosition decodeLabelPosition() const { return m_decodeLabelPosition; } + signals: void freezeDecode0(int n); void freezeDecode1(int n); @@ -92,6 +114,18 @@ private: int XfromFreq(float f); float FreqfromX(int x); qint64 RoundFreq(qint64 freq, int resolution); + // Render m_decodeLabels overlay on top of the waterfall pixmap. + // Stacks colliding labels vertically (max 5 rows) so a busy band + // doesn't paint labels on top of each other. + void paintDecodeLabels(QPainter& painter); + + QList m_decodeLabels; + // Overlay master alpha. 255 = legacy (fully opaque colours). + int m_decodeLabelAlpha {255}; + // Overlay font size. Default Normal=8 pt. + DecodeLabelFontSize m_decodeFontSize {DecodeLabelFontSize::Normal}; + // Overlay anchor. Top = legacy stacking down from upper-waterfall top. + DecodeLabelPosition m_decodeLabelPosition {DecodeLabelPosition::Top}; QPixmap m_WaterfallPixmap; QPixmap m_ZoomWaterfallPixmap; -- cgit v1.2.3