mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
DiveObjectHelper: expose number of dives in a trip
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4923aecc9d
commit
6a51c14365
2 changed files with 8 additions and 0 deletions
|
@ -360,6 +360,12 @@ QString DiveObjectHelper::tripMeta() const
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int DiveObjectHelper::tripNrDives() const
|
||||||
|
{
|
||||||
|
struct dive_trip *dt = m_dive->divetrip;
|
||||||
|
return dt ? dt->nrdives : 0;
|
||||||
|
}
|
||||||
|
|
||||||
int DiveObjectHelper::maxcns() const
|
int DiveObjectHelper::maxcns() const
|
||||||
{
|
{
|
||||||
return m_dive->maxcns;
|
return m_dive->maxcns;
|
||||||
|
|
|
@ -42,6 +42,7 @@ class DiveObjectHelper : public QObject {
|
||||||
Q_PROPERTY(QList<CylinderObjectHelper*> cylinderObjects READ cylinderObjects CONSTANT)
|
Q_PROPERTY(QList<CylinderObjectHelper*> cylinderObjects READ cylinderObjects CONSTANT)
|
||||||
Q_PROPERTY(QString trip READ trip CONSTANT)
|
Q_PROPERTY(QString trip READ trip CONSTANT)
|
||||||
Q_PROPERTY(QString tripMeta READ tripMeta CONSTANT)
|
Q_PROPERTY(QString tripMeta READ tripMeta CONSTANT)
|
||||||
|
Q_PROPERTY(int tripNrDives READ tripNrDives CONSTANT)
|
||||||
Q_PROPERTY(int maxcns READ maxcns CONSTANT)
|
Q_PROPERTY(int maxcns READ maxcns CONSTANT)
|
||||||
Q_PROPERTY(int otu READ otu CONSTANT)
|
Q_PROPERTY(int otu READ otu CONSTANT)
|
||||||
Q_PROPERTY(QString sumWeight READ sumWeight CONSTANT)
|
Q_PROPERTY(QString sumWeight READ sumWeight CONSTANT)
|
||||||
|
@ -85,6 +86,7 @@ public:
|
||||||
QList<CylinderObjectHelper*> cylinderObjects() const;
|
QList<CylinderObjectHelper*> cylinderObjects() const;
|
||||||
QString trip() const;
|
QString trip() const;
|
||||||
QString tripMeta() const;
|
QString tripMeta() const;
|
||||||
|
int tripNrDives() const;
|
||||||
int maxcns() const;
|
int maxcns() const;
|
||||||
int otu() const;
|
int otu() const;
|
||||||
QString sumWeight() const;
|
QString sumWeight() const;
|
||||||
|
|
Loading…
Add table
Reference in a new issue