Not the refactor I wanted to do, but the one I did.
I cleaned up and rewrote how annotations are displayed on the plot window. They are now a lot more flexible and should be easier to add to in the future, since 90% of them are set up and rendered in Plot::drawAnnotations(). The only other annotations that are rendered is in the Plot::PlotGraph() function, because I really didn't want to redo all the min/max/mean calculations again.
This now has the ability to show up to 4 graphs of min/max/mean numbers, all 4 cursors info (including Operation Buffer changes with CursorA), and has enough space to add future info. Oh, and a lot of the annotations are tied to the state of the objects they track, so if the cursors aren't on screen, those annotations won't show up. Same with the grid, and the three other graphs that can be rendered.
I also moved the overlay buffer (g_OverlayBuffer) from proxguiqt.cpp to graph.c to keep all the graphs together. Once I understand more about how the Demod buffer works, I'll probably move that over as well, but for right now those three are there.
There's also some random cleanup for graph.c that touched a lot of files in this PR, since I forgot to remove them before pushing. sorry 😅
Not the refactor I wanted to do, but the one I did.
I cleaned up and rewrote how annotations are displayed on the plot window. They are now a lot more flexible and should be easier to add to in the future, since 90% of them are set up and rendered in
Plot::drawAnnotations()
. The only other annotations that are rendered is in thePlot::PlotGraph()
function, because I really didn't want to redo all the min/max/mean calculations again.This now has the ability to show up to 4 graphs of min/max/mean numbers, all 4 cursors info (including Operation Buffer changes with CursorA), and has enough space to add future info. Oh, and a lot of the annotations are tied to the state of the objects they track, so if the cursors aren't on screen, those annotations won't show up. Same with the grid, and the three other graphs that can be rendered.
I also moved the overlay buffer (
g_OverlayBuffer
) fromproxguiqt.cpp
tograph.c
to keep all the graphs together. Once I understand more about how the Demod buffer works, I'll probably move that over as well, but for right now those three are there.There's also some random cleanup for
graph.c
that touched a lot of files in this PR, since I forgot to remove them before pushing. sorry 😅