summaryrefslogtreecommitdiffstats
path: root/stats/pieseries.cpp
AgeCommit message (Collapse)Author
2021-01-20statistics: turn infobox into a QSGNodeGravatar Berthold Stoeger
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>
2021-01-20statistics: pass view to seriesGravatar Berthold Stoeger
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>
2021-01-14Silence some compiler warningsGravatar Robert C. Helling
This is what clang suggested in compiler warnings. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2021-01-10build-system: compile stats code on mobile OSsGravatar Dirk Hohndel
Android and iOS use qmake, so add the code to the .pro file. This also removes all remnants of QCharts includes and uses and all the references to QCharts in our various build systems. That was a brief but extremely useful detour. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-10statistics: convert chart to QQuickItemGravatar Berthold Stoeger
It turns out that the wrong base class was used for the chart. QQuickWidget can only be used on desktop, not in a mobile UI. Therefore, turn this into a QQuickItem and move the container QQuickWidget into desktop-only code. Currently, this code is insane: The chart is rendered onto a QGraphicsScene (as it was before), which is then rendered into a QImage, which is transformed into a QSGTexture, which is then projected onto the device. This is performed on every mouse move event, since these events in general change the position of the info-box. The plan is to slowly convert elements such as the info-box into QQuickItems. Browsing the QtQuick documentation, this will not be much fun. Also note that the rendering currently tears, flickers and has antialiasing artifacts, most likely owing to integer (QImage) to floating point (QGraphicsScene, QQuickItem) conversion problems. The data flow is QGraphicsScene (float) -> QImage (int) -> QQuickItem (float). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-06statistics: replace QtCharts' axesGravatar Berthold Stoeger
Replace by custom implementation, with the ultimate goal to remove the QtCharts module. This doesn't yet display axis titles or a grid. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-02statistics: implement pie seriesGravatar Berthold Stoeger
Implement a simple count-based pie chart. Percentage labels are shown in the pie slices, the names outside the pie slices. On hovering over a slice, the actual counts are shown. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>