statistics: turn ChartGrid into QSGNodes

Turn the background grid into QSGNodes. Each grid line is
represented by a QSG line item. An alternative would be
drawing the grid into a QImage and blasting that onto the
screen. It is unclear which one is preferred.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-14 12:37:26 +01:00 committed by bstoeger
parent c74975632e
commit 9b7565e81a
4 changed files with 17 additions and 20 deletions

View file

@ -317,7 +317,7 @@ void StatsView::setAxes(StatsAxis *x, StatsAxis *y)
xAxis = x;
yAxis = y;
if (x && y)
grid = std::make_unique<StatsGrid>(&scene, *x, *y);
grid = std::make_unique<StatsGrid>(*this, *x, *y);
}
void StatsView::reset()