diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-10 18:00:19 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-10 15:16:52 -0800 |
commit | 9a0c5df74427fee8a9788fbb20165b03cf389906 (patch) | |
tree | 553ac06844244508ee1a48ddd154fc379c674ae3 /mobile-widgets/statsmanager.h | |
parent | 8f8ee5c589391e6bfa79e697cc83d7bc72182383 (diff) | |
download | subsurface-9a0c5df74427fee8a9788fbb20165b03cf389906.tar.gz |
statistics/mobile: set currentIndex of QML combo boxes
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>
Diffstat (limited to 'mobile-widgets/statsmanager.h')
-rw-r--r-- | mobile-widgets/statsmanager.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mobile-widgets/statsmanager.h b/mobile-widgets/statsmanager.h index bfdf6724b..c4afa6881 100644 --- a/mobile-widgets/statsmanager.h +++ b/mobile-widgets/statsmanager.h @@ -14,6 +14,10 @@ public: Q_PROPERTY(QStringList binner1List MEMBER binner1List NOTIFY binner1ListChanged) Q_PROPERTY(QStringList var2List MEMBER var2List NOTIFY var2ListChanged) Q_PROPERTY(QStringList binner2List MEMBER binner2List NOTIFY binner2ListChanged) + Q_PROPERTY(int var1Index MEMBER var1Index NOTIFY var1IndexChanged) + Q_PROPERTY(int binner1Index MEMBER binner1Index NOTIFY binner1IndexChanged) + Q_PROPERTY(int var2Index MEMBER var2Index NOTIFY var2IndexChanged) + Q_PROPERTY(int binner2Index MEMBER binner2Index NOTIFY binner2IndexChanged) StatsManager(); ~StatsManager(); @@ -28,6 +32,10 @@ signals: void binner1ListChanged(); void var2ListChanged(); void binner2ListChanged(); + void var1IndexChanged(); + void binner1IndexChanged(); + void var2IndexChanged(); + void binner2IndexChanged(); private: StatsView *view; StatsState state; @@ -35,6 +43,10 @@ private: QStringList binner1List; QStringList var2List; QStringList binner2List; + int var1Index; + int binner1Index; + int var2Index; + int binner2Index; StatsState::UIState uiState; // Remember UI state so that we can interpret indexes void updateUi(); |