diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2015-11-17 00:29:18 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-16 15:03:50 -0800 |
commit | dd944ab33f8f2984c9cc7f1d94a5aa632e3ad1f4 (patch) | |
tree | f7823600c06c7054b62c0f8b4f6d0badb8f83b99 /subsurface-core/qthelper.h | |
parent | a34dfe82847dce2db083f4b37554279df0b26307 (diff) | |
download | subsurface-dd944ab33f8f2984c9cc7f1d94a5aa632e3ad1f4.tar.gz |
qthelper: add means to retreive weight and cylinder info in Dive
The Dive helper class only picks the first cylinder and the total
weight. This patch adds the option to dump the cylinders and weights
as formatted lists (via cylinders() and weights()) or to retrieve
a specific cylinder or weight via (cylinder(index) and weight(index)).
Each cylinder and weight string contains detailed information:
cylinder:
- desc.
- pressure (+start/end)
- gasmix
- etc...
weight:
- desc.
- weight (in units e.g. kg)
If no description is found for a cylinder or weight the contents
for this particular unit is filled with EMPTY_DIVE_STRING ("--").
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/qthelper.h')
-rw-r--r-- | subsurface-core/qthelper.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/subsurface-core/qthelper.h b/subsurface-core/qthelper.h index 5fbc6dbe4..86be073f8 100644 --- a/subsurface-core/qthelper.h +++ b/subsurface-core/qthelper.h @@ -28,9 +28,9 @@ private: QString m_tags; QString m_gas; QString m_sac; - QString m_weight; + QStringList m_weights; QString m_suit; - QString m_cylinder; + QStringList m_cylinders; QString m_trip; struct dive *dive; void put_date_time(); @@ -93,9 +93,11 @@ public: QString tags() const; QString gas() const; QString sac() const; - QString weight() const; + QString weights() const; + QString weight(int idx) const; QString suit() const; - QString cylinder() const; + QString cylinders() const; + QString cylinder(int idx) const; QString trip() const; }; |