diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2018-01-28 15:21:28 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2018-01-31 14:48:14 +0100 |
commit | 494ad2654082d85846cb902556921ab62a6dbb14 (patch) | |
tree | fc130087b7c90cf38b8bbf6513f1ed08cf05755f /qt-models/divelocationmodel.h | |
parent | 83259008e763d3cc120c826f58f91a0ff62b6b92 (diff) | |
download | subsurface-494ad2654082d85846cb902556921ab62a6dbb14.tar.gz |
mobile cleanup: restyle construction of locationlist
See also e6e1473e6. The construction of the locationlist
was not the same as the 3 previous lists, and it needs
the inclusion of a new model file (divelocationmodel.cpp)
in the mobile app. In addition, as the mobile app is mainly
interested in a simple stringList (model) to populate a HintsText
field (or maybe later a combobox), this stringlist is added
to the model, to easy interfacing with QML.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'qt-models/divelocationmodel.h')
-rw-r--r-- | qt-models/divelocationmodel.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-models/divelocationmodel.h b/qt-models/divelocationmodel.h index 0829abd30..404b66f48 100644 --- a/qt-models/divelocationmodel.h +++ b/qt-models/divelocationmodel.h @@ -17,6 +17,7 @@ bool filter_same_gps_cb (QAbstractItemModel *m, int sourceRow, const QModelIndex class LocationInformationModel : public QAbstractTableModel { Q_OBJECT public: + LocationInformationModel(QObject *obj = 0); enum Columns { UUID, NAME, LATITUDE, LONGITUDE, COORDS, DESCRIPTION, NOTES, TAXONOMY_1, TAXONOMY_2, TAXONOMY_3, COLUMNS}; enum Roles { UUID_ROLE = Qt::UserRole + 1 }; static LocationInformationModel *instance(); @@ -29,9 +30,10 @@ public: public slots: void update(); + QStringList allSiteNames() const; private: - LocationInformationModel(QObject *obj = 0); int internalRowCount; + QStringList locationNames; QLineEdit *textField; }; |