Skip to content

Commit

Permalink
plotter: cursor measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
vladisslav2011 committed Aug 3, 2023
1 parent 56ad6ff commit 7ba91db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/qtgui/plotter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,11 @@ void CPlotter::mouseMoveEvent(QMouseEvent* event)
if (m_TooltipsEnabled)
{
qint64 hoverFrequency = freqFromX(pt.x());
QString toolTipText = QString("F: %1 kHz, %2db")
QString toolTipText = QString("F: %1 kHz, %2db\n Δ=%3 kHz")
.arg(hoverFrequency/1.e3, 0, 'f', 3)
.arg((m_OverlayPixmap.height() / m_DPR - pt.y()) * fabs(m_PandMindB - m_PandMaxdB) /
float(m_OverlayPixmap.height() / m_DPR) + float(m_PandMindB), 0, 'f', 1);
float(m_OverlayPixmap.height() / m_DPR) + float(m_PandMindB), 0, 'f', 1)
.arg((hoverFrequency - m_DemodCenterFreq)/1.e3, 0, 'f', 3);
QFontMetrics metrics(m_Font);
int bandTopY = (m_OverlayPixmap.height() / m_DPR) - metrics.height() - 2 * VER_MARGIN - m_BandPlanHeight;
QList<BandInfo> hoverBands = BandPlan::Get().getBandsEncompassing(hoverFrequency);
Expand Down

0 comments on commit 7ba91db

Please sign in to comment.