statistics: replace PieSeries by QSG nodes

Since there are no disk-segment QSG primitives (one could draw
a triangle fan, but that doesn't seem optimal), this draws
into a pixmap and blits that as a QSG node.

Since this is the only series without axis, it needs a function
that returns the size of the plot area. This didn't exist, so
add it.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-18 12:08:46 +01:00 committed by bstoeger
parent b07a7fe5f1
commit b068b2b0e7
6 changed files with 92 additions and 50 deletions

View file

@ -45,6 +45,7 @@ public:
void plot(const StatsState &state);
QQuickWindow *w() const; // Make window available to items
QSizeF size() const;
QRectF plotArea() const;
void addQSGNode(QSGNode *node, ChartZValue z); // Must only be called in render thread!
void registerDirtyChartItem(ChartItem &item);
void unregisterDirtyChartItem(ChartItem &item);