From 851ab68aa27107901c56a2088fdb0df57b11df49 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Sun, 19 Jan 2020 18:19:14 +0100 Subject: qt-models: add getters to diveplanner model diveplannermodel already contains set_ function that convert from screen value to real value; this adds get functions that convert real value to screen value, so now all conversions are done in one place. Use prefix Display to identify this is values prepared for the UI (both desktop and QML). Signed-off-by: jan Iversen Signed-off-by: Dirk Hohndel --- qt-models/diveplannermodel.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qt-models/diveplannermodel.h') diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h index 2a2aaa64d..88cca5879 100644 --- a/qt-models/diveplannermodel.h +++ b/qt-models/diveplannermodel.h @@ -47,6 +47,13 @@ public: bool tankInUse(int cylinderid); void setupCylinders(); bool updateMaxDepth(); + + int ascrate75Display(); + int ascrate50Display(); + int ascratestopsDisplay(); + int ascratelast6mDisplay(); + int descrateDisplay(); + /** * @return the row number. */ -- cgit v1.2.3-70-g09d2