1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-17 23:28:50 -05:00

Show frequency for highlighted marker on second line of frequency scale

This commit is contained in:
f4exb 2015-05-11 13:37:46 +02:00
parent fe85503130
commit 44bbc89ace

View File

@ -842,7 +842,7 @@ void GLSpectrum::applyChanges()
int waterfallHeight = 0;
int waterfallTop = 0;
int frequencyScaleHeight = fm.height() * 2;
int frequencyScaleHeight = fm.height() * 3; // +1 line for marker frequency scale
int frequencyScaleTop;
int histogramTop = 0;
int histogramHeight = 20;
@ -1123,6 +1123,19 @@ void GLSpectrum::applyChanges()
}
}
// Frequency overlay on highlighted marker
for(int i = 0; i < m_channelMarkerStates.size(); ++i) {
ChannelMarkerState* dv = m_channelMarkerStates[i];
if (dv->m_channelMarker->getHighlighted())
{
qreal xc;
//ChannelMarker::sidebands_t sidebands = dv->m_channelMarker->getSidebands();
xc = m_centerFrequency + dv->m_channelMarker->getCenterFrequency(); // marker center frequency
QString ftext = QString::number((m_centerFrequency + dv->m_channelMarker->getCenterFrequency())/1e6, 'f', 6);
painter.drawText(QPointF(leftMargin + m_frequencyScale.getPosFromValue(xc), 2*fm.height() + fm.ascent() / 2 - 1), ftext);
}
}
}
if(m_frequencyTextureAllocated)
deleteTexture(m_frequencyTexture);