diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-18 12:08:46 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2021-01-20 08:47:18 +0100 |
commit | b068b2b0e70c131ee146cc7962979684a0b3a527 (patch) | |
tree | 949c2a4b4ca0d7b219af435e29286e26fc65e4ee /stats/statsview.cpp | |
parent | b07a7fe5f10529f7fde0b7d5f614aa311b18dcc7 (diff) | |
download | subsurface-b068b2b0e70c131ee146cc7962979684a0b3a527.tar.gz |
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>
Diffstat (limited to 'stats/statsview.cpp')
-rw-r--r-- | stats/statsview.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/stats/statsview.cpp b/stats/statsview.cpp index 455589976..e616c3e12 100644 --- a/stats/statsview.cpp +++ b/stats/statsview.cpp @@ -187,6 +187,11 @@ QSizeF StatsView::size() const return boundingRect().size(); } +QRectF StatsView::plotArea() const +{ + return plotRect; +} + void StatsView::plotAreaChanged(const QSizeF &s) { // Make sure that image is at least one pixel wide / high, otherwise |