statistics: add a model that describes a list of charts

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>
This commit is contained in:
Berthold Stoeger 2021-01-02 22:16:11 +01:00 committed by Dirk Hohndel
parent fbb17871c9
commit 319a7af31a
3 changed files with 176 additions and 0 deletions

View file

@ -9,6 +9,8 @@ set(SUBSURFACE_STATS_SRCS
barseries.cpp
boxseries.h
boxseries.cpp
chartlistmodel.h
chartlistmodel.cpp
informationbox.h
informationbox.cpp
legend.h
@ -25,6 +27,7 @@ set(SUBSURFACE_STATS_SRCS
statsseries.cpp
statsstate.h
statsstate.cpp
statstranslations.h
statsvariables.h
statsvariables.cpp
statsview.h