summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlinterface.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-06 23:29:26 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-08 10:29:36 -0800
commitf7c73f1987a7069489d66316383b31b3248810b3 (patch)
tree1ec405daeef82b040c09b7c5135e14c79b13476f /mobile-widgets/qmlinterface.h
parent988ccba7105442f34d85ed81e13fd69162eb2b87 (diff)
downloadsubsurface-f7c73f1987a7069489d66316383b31b3248810b3.tar.gz
mobile/summary: implement firstDiveDate and lastDiveDate
Instead of transporting the global first and last dive date in the dive summary, calculate it in an external function. Since we already have time and date functions in qthelper.cpp implement those functions there. Provide a stub in QMLInterface so that QML can access these standalone functions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qmlinterface.h')
-rw-r--r--mobile-widgets/qmlinterface.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mobile-widgets/qmlinterface.h b/mobile-widgets/qmlinterface.h
index 9b05b927d..c8383387d 100644
--- a/mobile-widgets/qmlinterface.h
+++ b/mobile-widgets/qmlinterface.h
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef QMLINTERFACE_H
#define QMLINTERFACE_H
+#include "core/qthelper.h"
#include "core/settings/qPrefCloudStorage.h"
#include "core/settings/qPrefUnit.h"
#include "core/settings/qPrefDivePlanner.h"
@@ -265,6 +266,8 @@ public slots:
void set_display_transitions(bool value) { DivePlannerPointsModel::instance()->setDisplayTransitions(value); }
void set_verbatim_plan(bool value) { DivePlannerPointsModel::instance()->setVerbatim(value); }
void set_display_variations(bool value) { DivePlannerPointsModel::instance()->setDisplayVariations(value); }
+ QString firstDiveDate() { return get_first_dive_date_string(); }
+ QString lastDiveDate() { return get_last_dive_date_string(); }
signals:
void cloud_verification_statusChanged(CLOUD_STATUS);