summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/DiveObjectHelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.h')
-rw-r--r--core/subsurface-qt/DiveObjectHelper.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.h b/core/subsurface-qt/DiveObjectHelper.h
index 5e6b0c7e1..639dae696 100644
--- a/core/subsurface-qt/DiveObjectHelper.h
+++ b/core/subsurface-qt/DiveObjectHelper.h
@@ -39,7 +39,6 @@ class DiveObjectHelper {
Q_PROPERTY(QString suit MEMBER suit CONSTANT)
Q_PROPERTY(QStringList cylinderList READ cylinderList CONSTANT)
Q_PROPERTY(QStringList cylinders MEMBER cylinders CONSTANT)
- Q_PROPERTY(QVector<CylinderObjectHelper> cylinderObjects MEMBER cylinderObjects CONSTANT)
Q_PROPERTY(int maxcns MEMBER maxcns CONSTANT)
Q_PROPERTY(int otu MEMBER otu CONSTANT)
Q_PROPERTY(QString sumWeight MEMBER sumWeight CONSTANT)
@@ -78,7 +77,6 @@ public:
QString suit;
QStringList cylinderList() const;
QStringList cylinders;
- QVector<CylinderObjectHelper> cylinderObjects;
int maxcns;
int otu;
QString sumWeight;
@@ -87,6 +85,21 @@ public:
QStringList endPressure;
QStringList firstGas;
};
- Q_DECLARE_METATYPE(DiveObjectHelper)
+
+// This is an extended version of DiveObjectHelper that also keeps track of cylinder data.
+// It is used by grantlee to display structured cylinder data.
+// Note: this grantlee feature is undocumented. If there turns out to be no users, we might
+// want to remove this class.
+class DiveObjectHelperGrantlee : public DiveObjectHelper {
+ Q_GADGET
+ Q_PROPERTY(QVector<CylinderObjectHelper> cylinderObjects MEMBER cylinderObjects CONSTANT)
+public:
+ DiveObjectHelperGrantlee();
+ DiveObjectHelperGrantlee(const struct dive *dive);
+ QVector<CylinderObjectHelper> cylinderObjects;
+};
+
+Q_DECLARE_METATYPE(DiveObjectHelper)
+Q_DECLARE_METATYPE(DiveObjectHelperGrantlee)
#endif