diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-12 10:28:04 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-13 11:39:36 -0800 |
commit | 12842f4a86761569d867e54a523a586409a03dc5 (patch) | |
tree | 64e95fcc0f8b1fd171d98e0ea1f1393441ef9123 /mobile-widgets/statsmanager.h | |
parent | e610fb248115cb70bc3ded65ad3ac6985658a4a9 (diff) | |
download | subsurface-12842f4a86761569d867e54a523a586409a03dc5.tar.gz |
mobile/statistics: make charts model available to UI
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>
Diffstat (limited to 'mobile-widgets/statsmanager.h')
-rw-r--r-- | mobile-widgets/statsmanager.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mobile-widgets/statsmanager.h b/mobile-widgets/statsmanager.h index 82c7a6b89..6023342ff 100644 --- a/mobile-widgets/statsmanager.h +++ b/mobile-widgets/statsmanager.h @@ -7,6 +7,8 @@ #include <QStringList> +class ChartListModel; + class StatsManager : public QObject { Q_OBJECT public: @@ -23,13 +25,14 @@ public: StatsManager(); ~StatsManager(); - Q_INVOKABLE void init(StatsView *v, QObject *o); + Q_INVOKABLE void init(StatsView *v, ChartListModel *charts); Q_INVOKABLE void doit(); Q_INVOKABLE void var1Changed(int idx); Q_INVOKABLE void var1BinnerChanged(int idx); Q_INVOKABLE void var2Changed(int idx); Q_INVOKABLE void var2BinnerChanged(int idx); Q_INVOKABLE void var2OperationChanged(int idx); + Q_INVOKABLE void setChart(int idx); signals: void var1ListChanged(); void binner1ListChanged(); @@ -43,6 +46,7 @@ signals: void operation2IndexChanged(); private: StatsView *view; + ChartListModel *charts; StatsState state; QStringList var1List; QStringList binner1List; |