Signed-off-by: Joakim Bygdell <[email protected]>
---
 subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 7 +++++++
 subsurface-core/subsurface-qt/DiveObjectHelper.h   | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp 
b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
index 8a44c0e..38ffffb 100644
--- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
+++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
@@ -292,3 +292,10 @@ QString DiveObjectHelper::endPressure() const
        QString endPressure = getPressures(m_dive, END_PRESSURE);
        return endPressure;
 }
+
+QString DiveObjectHelper::firstGas() const
+{
+       QString gas;
+       gas = get_gas_string(m_dive->cylinder[0].gasmix);
+       return gas;
+}
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.h 
b/subsurface-core/subsurface-qt/DiveObjectHelper.h
index 5d8abfd..a4a425a 100644
--- a/subsurface-core/subsurface-qt/DiveObjectHelper.h
+++ b/subsurface-core/subsurface-qt/DiveObjectHelper.h
@@ -37,6 +37,7 @@ class DiveObjectHelper : public QObject {
     Q_PROPERTY(QString getCylinder READ getCylinder CONSTANT)
     Q_PROPERTY(QString startPressure READ startPressure CONSTANT)
     Q_PROPERTY(QString endPressure READ endPressure CONSTANT)
+    Q_PROPERTY(QString firstGas READ firstGas CONSTANT)
 public:
        DiveObjectHelper(struct dive *dive = NULL);
        ~DiveObjectHelper();
@@ -72,6 +73,7 @@ public:
        QString getCylinder() const;
        QString startPressure() const;
        QString endPressure() const;
+       QString firstGas() const;
 
 private:
        struct dive *m_dive;
-- 
2.4.9 (Apple Git-60)

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to