Adding checkbox to show / hide SigMF annotations

Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
This commit is contained in:
Jacob Gilbert
2021-07-16 22:37:28 -06:00
parent 02157c4321
commit 64928b2cd0
7 changed files with 33 additions and 1 deletions

View File

@@ -49,6 +49,8 @@ PlotView::PlotView(InputSource *input) : cursors(this), viewRange({0, 0})
enableScales(true);
enableAnnotations(true);
addPlot(spectrogramPlot);
mainSampleSource->subscribe(this);
@@ -602,6 +604,14 @@ void PlotView::enableScales(bool enabled)
viewport()->update();
}
void PlotView::enableAnnotations(bool enabled)
{
if (spectrogramPlot != nullptr)
spectrogramPlot->enableAnnotations(enabled);
viewport()->update();
}
int PlotView::sampleToColumn(size_t sample)
{
return sample / samplesPerColumn();