mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: return all used gasmixes as a list
Planning ahead for full edit capabilities of dives that uses multiple cylinders. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
parent
94428b9a18
commit
f9e81c7326
2 changed files with 8 additions and 5 deletions
|
@ -417,9 +417,12 @@ QString DiveObjectHelper::endPressure() const
|
|||
return endPressure;
|
||||
}
|
||||
|
||||
QString DiveObjectHelper::firstGas() const
|
||||
QStringList DiveObjectHelper::firstGas() const
|
||||
{
|
||||
QString gas;
|
||||
gas = get_gas_string(m_dive->cylinder[0].gasmix);
|
||||
QStringList gas;
|
||||
for (int i = 0; i < MAX_CYLINDERS; i++) {
|
||||
if (is_cylinder_used(m_dive, i))
|
||||
gas << get_gas_string(m_dive->cylinder[i].gasmix);
|
||||
}
|
||||
return gas;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class DiveObjectHelper : public QObject {
|
|||
Q_PROPERTY(QStringList 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)
|
||||
Q_PROPERTY(QStringList firstGas READ firstGas CONSTANT)
|
||||
public:
|
||||
DiveObjectHelper(struct dive *dive = NULL);
|
||||
~DiveObjectHelper();
|
||||
|
@ -92,7 +92,7 @@ public:
|
|||
QStringList getCylinder() const;
|
||||
QString startPressure() const;
|
||||
QString endPressure() const;
|
||||
QString firstGas() const;
|
||||
QStringList firstGas() const;
|
||||
|
||||
private:
|
||||
struct dive *m_dive;
|
||||
|
|
Loading…
Add table
Reference in a new issue