mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
9b7565e81a
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>
19 lines
408 B
C++
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;
|
|
};
|