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:
Jocke 2018-07-16 18:25:21 +02:00 committed by Dirk Hohndel
parent 94428b9a18
commit f9e81c7326
2 changed files with 8 additions and 5 deletions

View file

@ -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;
}