2021-01-05 12:51:39 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
// The background grid of a chart
|
|
|
|
|
2021-01-18 21:29:34 +00:00
|
|
|
#include "statshelper.h"
|
|
|
|
|
2021-01-05 12:51:39 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class StatsAxis;
|
2021-02-16 16:05:39 +00:00
|
|
|
class StatsTheme;
|
2021-01-14 11:37:26 +00:00
|
|
|
class StatsView;
|
|
|
|
class ChartLineItem;
|
2021-01-05 12:51:39 +00:00
|
|
|
|
|
|
|
class StatsGrid {
|
|
|
|
public:
|
2021-01-14 11:37:26 +00:00
|
|
|
StatsGrid(StatsView &view, const StatsAxis &xAxis, const StatsAxis &yAxis);
|
2021-01-05 12:51:39 +00:00
|
|
|
void updatePositions();
|
|
|
|
private:
|
2021-01-14 11:37:26 +00:00
|
|
|
StatsView &view;
|
2021-02-16 16:05:39 +00:00
|
|
|
const StatsTheme &theme; // Initialized once in constructor.
|
2021-01-05 12:51:39 +00:00
|
|
|
const StatsAxis &xAxis, &yAxis;
|
2021-01-18 21:29:34 +00:00
|
|
|
std::vector<ChartItemPtr<ChartLineItem>> lines;
|
2021-01-05 12:51:39 +00:00
|
|
|
};
|