aboutsummaryrefslogtreecommitdiffstats
path: root/stats/statsgrid.h
blob: 0fdb2a188d2d82fc9001b8b28d69a3c05681bbc2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-License-Identifier: GPL-2.0
// The background grid of a chart

#include <memory>
#include <vector>
#include <QVector>
#include <QGraphicsLineItem>

class StatsAxis;
namespace QtCharts {
	class QChart;
};

class StatsGrid  {
public:
	StatsGrid(QtCharts::QChart *chart, const StatsAxis &xAxis, const StatsAxis &yAxis);
	void updatePositions();
private:
	QtCharts::QChart *chart;
	const StatsAxis &xAxis, &yAxis;
	std::vector<std::unique_ptr<QGraphicsLineItem>> lines;
};