mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: move tripId from DiveObjectHelper to DiveListModel
The canonical way of displaying lists in Qt is via models. Thus, return the tripId directly from the DiveListModel instead of going indirectly via a DiveObjectHelper. In the future, this will allow us to make the DiveObjectHelper value-based, as it is not generated numerous times for every list item. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b7cddcc737
commit
1b9581369a
5 changed files with 8 additions and 11 deletions
|
@ -40,7 +40,6 @@ class DiveObjectHelper : public QObject {
|
|||
Q_PROPERTY(QStringList cylinderList READ cylinderList CONSTANT)
|
||||
Q_PROPERTY(QStringList cylinders READ cylinders CONSTANT)
|
||||
Q_PROPERTY(QVector<CylinderObjectHelper> cylinderObjects READ cylinderObjects CONSTANT)
|
||||
Q_PROPERTY(QString tripId READ tripId CONSTANT)
|
||||
Q_PROPERTY(int tripNrDives READ tripNrDives CONSTANT)
|
||||
Q_PROPERTY(int maxcns READ maxcns CONSTANT)
|
||||
Q_PROPERTY(int otu READ otu CONSTANT)
|
||||
|
@ -83,7 +82,6 @@ public:
|
|||
QStringList cylinders() const;
|
||||
QString cylinder(int idx) const;
|
||||
QVector<CylinderObjectHelper> cylinderObjects() const;
|
||||
QString tripId() const;
|
||||
int tripNrDives() const;
|
||||
int maxcns() const;
|
||||
int otu() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue