diff options
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/divelocationmodel.cpp | 3 | ||||
-rw-r--r-- | qt-models/divelocationmodel.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index ff733f5ad..0ddd0eb49 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -109,8 +109,9 @@ QVariant LocationInformationModel::data(const QModelIndex &index, int role) cons else return QVariant(); } + case UUID_ROLE: + return ds->uuid; } - return QVariant(); } diff --git a/qt-models/divelocationmodel.h b/qt-models/divelocationmodel.h index 83bc97e67..d5b8705ce 100644 --- a/qt-models/divelocationmodel.h +++ b/qt-models/divelocationmodel.h @@ -17,6 +17,7 @@ class LocationInformationModel : public QAbstractTableModel { Q_OBJECT public: 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(); int columnCount(const QModelIndex &parent) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; |