summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subsurface-core/subsurface-qt/DiveObjectHelper.cpp5
-rw-r--r--subsurface-core/subsurface-qt/DiveObjectHelper.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
index 745379494..2f058f47f 100644
--- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
+++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
@@ -187,6 +187,11 @@ QStringList DiveObjectHelper::weights() const
return weights;
}
+bool DiveObjectHelper::singleWeight() const
+{
+ return weightsystem_none(&m_dive->weightsystem[1]);
+}
+
QString DiveObjectHelper::weight(int idx) const
{
if ( (idx < 0) || idx > MAX_WEIGHTSYSTEMS )
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.h b/subsurface-core/subsurface-qt/DiveObjectHelper.h
index f44971fcd..f9ed6a520 100644
--- a/subsurface-core/subsurface-qt/DiveObjectHelper.h
+++ b/subsurface-core/subsurface-qt/DiveObjectHelper.h
@@ -26,6 +26,7 @@ class DiveObjectHelper : public QObject {
Q_PROPERTY(QString gas READ gas CONSTANT)
Q_PROPERTY(QString sac READ sac CONSTANT)
Q_PROPERTY(QStringList weights READ weights CONSTANT)
+ Q_PROPERTY(bool singleWeight READ singleWeight CONSTANT)
Q_PROPERTY(QString suit READ suit CONSTANT)
Q_PROPERTY(QStringList cylinders READ cylinders CONSTANT)
Q_PROPERTY(QString trip READ trip CONSTANT)
@@ -57,6 +58,7 @@ public:
QString sac() const;
QStringList weights() const;
QString weight(int idx) const;
+ bool singleWeight() const;
QString suit() const;
QStringList cylinders() const;
QString cylinder(int idx) const;