aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/qmlmanager.cpp20
-rw-r--r--qt-mobile/qmlmanager.h2
2 files changed, 22 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index 0897dcff8..e684255c3 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -477,3 +477,23 @@ void QMLManager::showMap(QString location)
QDesktopServices::openUrl(link);
}
}
+
+QString QMLManager::getNumber(QString diveId)
+{
+ int dive_id = diveId.toInt();
+ struct dive *d = get_dive_by_uniq_id(dive_id);
+ QString number;
+ if (d)
+ number = QString::number(d->number);
+ return number;
+}
+
+QString QMLManager::getDate(QString diveId)
+{
+ int dive_id = diveId.toInt();
+ struct dive *d = get_dive_by_uniq_id(dive_id);
+ QString datestring;
+ if (d)
+ datestring = get_dive_date_string(d->when);
+ return datestring;
+}
diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h
index f6ed60aed..be37f5a74 100644
--- a/qt-mobile/qmlmanager.h
+++ b/qt-mobile/qmlmanager.h
@@ -79,6 +79,8 @@ public slots:
void clearGpsData();
void finishSetup();
void showMap(QString location);
+ QString getNumber(QString diveId);
+ QString getDate(QString diveId);
private:
QString m_cloudUserName;