diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-02 04:41:36 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-02 04:46:26 -0800 |
commit | 3b37844708d0bcbac3dbec86a44d6dfff69639a0 (patch) | |
tree | db4674939cf3312662ae0eaa959cb6291a8d5462 /qt-mobile/qmlmanager.cpp | |
parent | b275e604c13004427e37cc1f42139d2f412158f2 (diff) | |
download | subsurface-3b37844708d0bcbac3dbec86a44d6dfff69639a0.tar.gz |
Add helper functions to identify the position of a dive in the dive list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qmlmanager.cpp')
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index 9a0a97f65..39b02e6a9 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -882,6 +882,14 @@ void QMLManager::showMap(const QString& location) } } +// where in the QML dive list is that dive? +int QMLManager::getIndex(const QString &diveId) +{ + int dive_id = diveId.toInt(); + int idx = DiveListModel::instance()->getDiveIdx(dive_id); + return idx; +} + QString QMLManager::getNumber(const QString& diveId) { int dive_id = diveId.toInt(); |