diff options
Diffstat (limited to 'subsurface-core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp index bea9556b2..4a43f6f8b 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp @@ -201,6 +201,18 @@ QString DiveObjectHelper::sac() const return QString::number(value, 'f', decimal).append(unit); } +QString DiveObjectHelper::weightList() const +{ + QString weights; + for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++) { + QString w = getFormattedWeight(m_dive, i); + if (w == EMPTY_DIVE_STRING) + continue; + weights += w + "; "; + } + return weights; +} + QStringList DiveObjectHelper::weights() const { QStringList weights; @@ -226,6 +238,18 @@ QString DiveObjectHelper::suit() const return m_dive->suit ? m_dive->suit : EMPTY_DIVE_STRING; } +QString DiveObjectHelper::cylinderList() const +{ + QString cylinders; + for (int i = 0; i < MAX_CYLINDERS; i++) { + QString cyl = getFormattedCylinder(m_dive, i); + if (cyl == EMPTY_DIVE_STRING) + continue; + cylinders += cyl + "; "; + } + return cylinders; +} + QStringList DiveObjectHelper::cylinders() const { QStringList cylinders; |