diff options
author | jan Iversen <jan@casacondor.com> | 2020-01-20 20:10:35 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-24 20:20:42 -0800 |
commit | b0e46c208dd4fb13d5c3e6010c56cbc50742b4ec (patch) | |
tree | c60317a91592a80949816e84fc5660d39a61c807 /mobile-widgets/qmlinterface.cpp | |
parent | e22943fa21027917cd8d2de98cd13ae7d12d751a (diff) | |
download | subsurface-b0e46c208dd4fb13d5c3e6010c56cbc50742b4ec.tar.gz |
mobile: move dive planner notes access to pure interface
Make notes rates available to QML through the Backend interface.
Remove the corresponding variables from plannerShared.
Getters are from prefs. while setters are linked to diveplan model.
Remark: signals from qPrefDivePlanner is used, because the diveplanner model
sets qPrefDivePlanner but do not issue special 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.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mobile-widgets/qmlinterface.cpp b/mobile-widgets/qmlinterface.cpp index e422a5856..277db13ef 100644 --- a/mobile-widgets/qmlinterface.cpp +++ b/mobile-widgets/qmlinterface.cpp @@ -47,4 +47,15 @@ void QMLInterface::setup(QQmlContext *ct) instance(), &QMLInterface::ascrate75Changed); connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::descrateChanged, instance(), &QMLInterface::descrateChanged); + + connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::display_runtimeChanged, + instance(), &QMLInterface::display_runtimeChanged); + connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::display_durationChanged, + instance(), &QMLInterface::display_durationChanged); + connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::display_transitionsChanged, + instance(), &QMLInterface::display_transitionsChanged); + connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::verbatim_planChanged, + instance(), &QMLInterface::verbatim_planChanged); + connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::display_variationsChanged, + instance(), &QMLInterface::display_variationsChanged); } |