mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: paint custom grid
With removal of QtCharts' axes, the grid was lost. Readd it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
8dfa3f6db3
commit
ab324ed769
9 changed files with 81 additions and 0 deletions
22
stats/statsgrid.h
Normal file
22
stats/statsgrid.h
Normal file
|
|
@ -0,0 +1,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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue