subsurface/stats/statsgrid.h
Berthold Stoeger 2eebae13dd stats: break out common QtQuick part of the code
Move most of the QtQuick code to its own directory, so that it
can be reused in the future for the chart.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-09-11 10:35:04 +02:00

23 lines
522 B
C++

// SPDX-License-Identifier: GPL-2.0
// The background grid of a chart
#include "qt-quick/chartitem_ptr.h"
#include <memory>
#include <vector>
class StatsAxis;
class StatsTheme;
class StatsView;
class ChartLineItem;
class StatsGrid {
public:
StatsGrid(StatsView &view, const StatsAxis &xAxis, const StatsAxis &yAxis);
void updatePositions();
private:
StatsView &view;
const StatsTheme &theme; // Initialized once in constructor.
const StatsAxis &xAxis, &yAxis;
std::vector<ChartItemPtr<ChartLineItem>> lines;
};