aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlinterface.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-19 18:44:16 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-20 15:46:08 -0800
commit699665ce9e4c1bdb9a4e1027fc3d1533c1929054 (patch)
tree2c7db7c6105cccddd055abfae96409654cf2a256 /mobile-widgets/qmlinterface.cpp
parentd924afdf52b578c3afccfc7e702acdbb7800d38c (diff)
downloadsubsurface-699665ce9e4c1bdb9a4e1027fc3d1533c1929054.tar.gz
mobile-widgets: add asc/desc rates to pure interface
Make ascent/descent rates available to QML through the Backend interface. Remark signals from qPrefDivePlanner is used because the diveplanner model sets qPrefDivePlanner but does not issue its own signals. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlinterface.cpp')
-rw-r--r--mobile-widgets/qmlinterface.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/mobile-widgets/qmlinterface.cpp b/mobile-widgets/qmlinterface.cpp
index e4f2dd6e5..e422a5856 100644
--- a/mobile-widgets/qmlinterface.cpp
+++ b/mobile-widgets/qmlinterface.cpp
@@ -36,4 +36,15 @@ void QMLInterface::setup(QQmlContext *ct)
[=] (int value) { emit instance()->volumeChanged(VOLUME(value)); });
connect(qPrefUnits::instance(), &qPrefUnits::weightChanged,
[=] (int value) { emit instance()->weightChanged(WEIGHT(value)); });
+
+ connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::ascratelast6mChanged,
+ instance(), &QMLInterface::ascratelast6mChanged);
+ connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::ascratestopsChanged,
+ instance(), &QMLInterface::ascratestopsChanged);
+ connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::ascrate50Changed,
+ instance(), &QMLInterface::ascrate50Changed);
+ connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::ascrate75Changed,
+ instance(), &QMLInterface::ascrate75Changed);
+ connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::descrateChanged,
+ instance(), &QMLInterface::descrateChanged);
}