diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-13 14:56:48 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2021-01-20 08:47:18 +0100 |
commit | d7878dad36e176ef0e2e1c54db891e115d29b489 (patch) | |
tree | c20493a14d868131b0a373d90ee8927ffd44336a /stats/barseries.h | |
parent | 1a869833d8896b01d04b49a58e08914658e038e9 (diff) | |
download | subsurface-d7878dad36e176ef0e2e1c54db891e115d29b489.tar.gz |
statistics: pass view to series
The series were passed a pointer to the QGraphicsScene to add
their item. In the future these items will be replaced by
QSGNodes. To add these, the series need a reference to the StatsView.
Therefore pass it in the constructor. Once everything is
replaces by QSGNodes, remove the QGraphicsScene member.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/barseries.h')
-rw-r--r-- | stats/barseries.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stats/barseries.h b/stats/barseries.h index 0c8c34ffd..33a36395e 100644 --- a/stats/barseries.h +++ b/stats/barseries.h @@ -47,13 +47,13 @@ public: // Note: this expects that all items are added with increasing pos // and that no bar is inside another bar, i.e. lowerBound and upperBound // are ordered identically. - BarSeries(QGraphicsScene *scene, StatsAxis *xAxis, StatsAxis *yAxis, + BarSeries(QGraphicsScene *scene, StatsView &view, StatsAxis *xAxis, StatsAxis *yAxis, bool horizontal, const QString &categoryName, const std::vector<CountItem> &items); - BarSeries(QGraphicsScene *scene, StatsAxis *xAxis, StatsAxis *yAxis, + BarSeries(QGraphicsScene *scene, StatsView &view, StatsAxis *xAxis, StatsAxis *yAxis, bool horizontal, const QString &categoryName, const StatsVariable *valueVariable, const std::vector<ValueItem> &items); - BarSeries(QGraphicsScene *scene, StatsAxis *xAxis, StatsAxis *yAxis, + BarSeries(QGraphicsScene *scene, StatsView &view, StatsAxis *xAxis, StatsAxis *yAxis, bool horizontal, bool stacked, const QString &categoryName, const StatsVariable *valueVariable, std::vector<QString> valueBinNames, const std::vector<MultiItem> &items); @@ -63,7 +63,7 @@ public: bool hover(QPointF pos) override; void unhighlight() override; private: - BarSeries(QGraphicsScene *scene, StatsAxis *xAxis, StatsAxis *yAxis, + BarSeries(QGraphicsScene *scene, StatsView &view, StatsAxis *xAxis, StatsAxis *yAxis, bool horizontal, bool stacked, const QString &categoryName, const StatsVariable *valueVariable, std::vector<QString> valueBinNames); |