diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-13 15:17:54 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2021-01-20 08:47:18 +0100 |
commit | 785d5189f617bab7d5dde668563fc4889e46f695 (patch) | |
tree | 67a3d41998725d77aadc98c1d57de4a0c7f459d8 /stats/barseries.cpp | |
parent | d7878dad36e176ef0e2e1c54db891e115d29b489 (diff) | |
download | subsurface-785d5189f617bab7d5dde668563fc4889e46f695.tar.gz |
statistics: turn infobox into a QSGNode
A small step in converting from QGraphicsScene to QQuickItem.
This is the second item to be converted (after the legend)
and for now items are drawn in order of creation, which means
that the infobox is on top of the legend. This will have
to be made deterministic in follow-up commits.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/barseries.cpp')
-rw-r--r-- | stats/barseries.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stats/barseries.cpp b/stats/barseries.cpp index 91ab1c941..733549d3d 100644 --- a/stats/barseries.cpp +++ b/stats/barseries.cpp @@ -4,6 +4,7 @@ #include "statscolors.h" #include "statshelper.h" #include "statstranslations.h" +#include "statsview.h" #include "zvalues.h" #include <math.h> // for lrint() @@ -403,7 +404,7 @@ bool BarSeries::hover(QPointF pos) Item &item = items[highlighted.bar]; item.highlight(index.subitem, true, binCount()); if (!information) - information = createItemPtr<InformationBox>(scene); + information = view.createChartItem<InformationBox>(); information->setText(makeInfo(item, highlighted.subitem), pos); } else { information.reset(); |