When changing the theme to a dark theme, also change the
statistics theme. The code is a mess, because it crashes
when setting the theme right at the beginning. Therefore,
there is a "theme has been set" flag. Also, this directly
accesses the ThemeInterface singleton object. I have no
time to fight QML, sorry.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Create a QML ChartListModel in the StatisticsPage and pass that to the
StatsManager on initialization.
[extracted from a slightly larger commit]
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use Q_PROPERTYs of the StatsManager to correctly set
the current index of comboboxes after a state changed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This adds a reasonably flexibile mobile page that tries to do the right
thing for both portrait and landscape mode. In order to get the most out
of a mobile screen, it's implemented in a way that always gives it the
full screen (it does so by emptying out the page stack and being the
only page shown - brutal, but effective).
This commit also contains a bunch of other random cleanups that didn't
really justify being in separate commits.
Parts of this was written by Berthold, hence the double SOB.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In analogy to "QMLManager", add a "StatsManager" class,
which manages the statistics module on mobile.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>