aboutsummaryrefslogtreecommitdiffstats
path: root/stats/chartlistmodel.cpp
AgeCommit message (Collapse)Author
2021-01-13statistics: add count property to chart listGravatar Dirk Hohndel
In order to be able to correctly size the chart type popup, we'll need access to the total count or rows as a property that signals changes to QML. The hack to use rowCount() as the READ function requires that rowCount() can be called without argument, therefore the addition of a default parent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-13mobile/statistics: export ChartListModel to QMLGravatar Berthold Stoeger
For QML, the roles have to be associated dynamically with name. Moreover, the model has to be registered as a QML type to make it accessible from QML. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-03statistics: charts drop down looks better with smaller iconsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-03statistics: add a model that describes a list of chartsGravatar Berthold Stoeger
Qt's comboboxes are controlled by models, there's no way around that. To customize the chart-selection widget this must therefore be abstracted into a model. On the upside, this hopefully can be used for desktop and mobile. The model provides icons and paints a warning-symbol on it if the statistics core code deems the chart to be not recommended. Notably, when plotting a categorical bar chart against a numerical value (in such a case histograms are preferred). Includes a fix for a silly oversight in CMakelist.txt: add the statstranslations.h header. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>