mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add helper functions to identify the position of a dive in the dive list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b275e604c1
commit
3b37844708
4 changed files with 20 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue