aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-core
diff options
context:
space:
mode:
Diffstat (limited to 'subsurface-core')
-rw-r--r--subsurface-core/subsurface-qt/DiveObjectHelper.cpp10
-rw-r--r--subsurface-core/subsurface-qt/DiveObjectHelper.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
index 78c1dfc63..e29bd3802 100644
--- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
+++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
@@ -219,6 +219,16 @@ QString DiveObjectHelper::trip() const
return m_dive->divetrip ? m_dive->divetrip->location : EMPTY_DIVE_STRING;
}
+// combine the pointer address with the trip location so that
+// we detect multiple, destinct trips to the same location
+QString DiveObjectHelper::tripMeta() const
+{
+ QString ret = EMPTY_DIVE_STRING;
+ if (m_dive->divetrip)
+ ret = QString::number((quint64)m_dive->divetrip, 16) + QLatin1Literal("::") + m_dive->divetrip->location;
+ return ret;
+}
+
QString DiveObjectHelper::maxcns() const
{
return QString(m_dive->maxcns);
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.h b/subsurface-core/subsurface-qt/DiveObjectHelper.h
index 4d1e1acb2..84c93465e 100644
--- a/subsurface-core/subsurface-qt/DiveObjectHelper.h
+++ b/subsurface-core/subsurface-qt/DiveObjectHelper.h
@@ -29,6 +29,7 @@ class DiveObjectHelper : public QObject {
Q_PROPERTY(QString suit READ suit CONSTANT)
Q_PROPERTY(QStringList cylinders READ cylinders CONSTANT)
Q_PROPERTY(QString trip READ trip CONSTANT)
+ Q_PROPERTY(QString tripMeta READ tripMeta CONSTANT)
Q_PROPERTY(QString maxcns READ maxcns CONSTANT)
Q_PROPERTY(QString otu READ otu CONSTANT)
public:
@@ -58,6 +59,7 @@ public:
QStringList cylinders() const;
QString cylinder(int idx) const;
QString trip() const;
+ QString tripMeta() const;
QString maxcns() const;
QString otu() const;