subsurface/stats/statsgrid.h
Berthold Stoeger 9b7565e81a 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>
2021-01-20 08:47:18 +01:00

19 lines
408 B
C++

// SPDX-License-Identifier: GPL-2.0
// The background grid of a chart
#include <memory>
#include <vector>
class StatsAxis;
class StatsView;
class ChartLineItem;
class StatsGrid {
public:
StatsGrid(StatsView &view, const StatsAxis &xAxis, const StatsAxis &yAxis);
void updatePositions();
private:
StatsView &view;
const StatsAxis &xAxis, &yAxis;
std::vector<std::unique_ptr<ChartLineItem>> lines;
};