cursors: Connect cursors to time/freq display on dock

This commit is contained in:
Mike Walters
2016-03-05 17:10:40 +00:00
parent eaf422165f
commit bc2b1dc900
7 changed files with 32 additions and 0 deletions

View File

@@ -95,6 +95,10 @@ TracePlot* PlotView::createQuadratureDemodPlot(SampleSource<std::complex<float>>
void PlotView::cursorsMoved()
{
int selection = cursors.selection().length();
off_t sampleCount = coordToSample(selection);
float selectionTime = sampleCount / (float)mainSampleSource->rate();
emit timeSelectionChanged(selectionTime);
viewport()->update();
}