mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
d7878dad36
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>
18 lines
436 B
C++
18 lines
436 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#include "statsseries.h"
|
|
#include "statsaxis.h"
|
|
|
|
StatsSeries::StatsSeries(QGraphicsScene *scene, StatsView &view, StatsAxis *xAxis, StatsAxis *yAxis) :
|
|
scene(scene), view(view), xAxis(xAxis), yAxis(yAxis)
|
|
{
|
|
}
|
|
|
|
StatsSeries::~StatsSeries()
|
|
{
|
|
}
|
|
|
|
QPointF StatsSeries::toScreen(QPointF p)
|
|
{
|
|
return xAxis && yAxis ? QPointF(xAxis->toScreen(p.x()), yAxis->toScreen(p.y()))
|
|
: QPointF(0.0, 0.0);
|
|
}
|