mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-08 01:26:16 +00:00
Add helper function to retrieve first gas
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6252d0cd3b
commit
a01bcd82aa
2 changed files with 9 additions and 0 deletions
|
@ -292,3 +292,10 @@ QString DiveObjectHelper::endPressure() const
|
||||||
QString endPressure = getPressures(m_dive, END_PRESSURE);
|
QString endPressure = getPressures(m_dive, END_PRESSURE);
|
||||||
return endPressure;
|
return endPressure;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString DiveObjectHelper::firstGas() const
|
||||||
|
{
|
||||||
|
QString gas;
|
||||||
|
gas = get_gas_string(m_dive->cylinder[0].gasmix);
|
||||||
|
return gas;
|
||||||
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@ class DiveObjectHelper : public QObject {
|
||||||
Q_PROPERTY(QString getCylinder READ getCylinder CONSTANT)
|
Q_PROPERTY(QString getCylinder READ getCylinder CONSTANT)
|
||||||
Q_PROPERTY(QString startPressure READ startPressure CONSTANT)
|
Q_PROPERTY(QString startPressure READ startPressure CONSTANT)
|
||||||
Q_PROPERTY(QString endPressure READ endPressure CONSTANT)
|
Q_PROPERTY(QString endPressure READ endPressure CONSTANT)
|
||||||
|
Q_PROPERTY(QString firstGas READ firstGas CONSTANT)
|
||||||
public:
|
public:
|
||||||
DiveObjectHelper(struct dive *dive = NULL);
|
DiveObjectHelper(struct dive *dive = NULL);
|
||||||
~DiveObjectHelper();
|
~DiveObjectHelper();
|
||||||
|
@ -72,6 +73,7 @@ public:
|
||||||
QString getCylinder() const;
|
QString getCylinder() const;
|
||||||
QString startPressure() const;
|
QString startPressure() const;
|
||||||
QString endPressure() const;
|
QString endPressure() const;
|
||||||
|
QString firstGas() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct dive *m_dive;
|
struct dive *m_dive;
|
||||||
|
|
Loading…
Add table
Reference in a new issue