diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-07-01 18:46:27 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-01 19:21:23 -0700 |
commit | db8b140c52c7589a81f1e3d6d37ba48225525313 (patch) | |
tree | feef9c99d5205666c6791164d628df71a05b23df /qt-models/divelocationmodel.h | |
parent | 324b6182aa46fa8eb6c2c60c9fdcb40e00da6b32 (diff) | |
download | subsurface-db8b140c52c7589a81f1e3d6d37ba48225525313.tar.gz |
More information on dive site model
All of dive site information is now exposed to the model
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/divelocationmodel.h')
-rw-r--r-- | qt-models/divelocationmodel.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qt-models/divelocationmodel.h b/qt-models/divelocationmodel.h index c7d8c2ed5..8cae3a08a 100644 --- a/qt-models/divelocationmodel.h +++ b/qt-models/divelocationmodel.h @@ -1,15 +1,16 @@ #ifndef DIVELOCATIONMODEL_H #define DIVELOCATIONMODEL_H -#include <QAbstractListModel> +#include <QAbstractTableModel> #include <QStringListModel> #include <stdint.h> -class LocationInformationModel : public QAbstractListModel { +class LocationInformationModel : public QAbstractTableModel { Q_OBJECT public: - enum { DIVE_SITE_UUID = Qt::UserRole+1}; + enum Columns { UUID, NAME, LATITUDE, LONGITUDE, COORDS, DESCRIPTION, NOTES, TAXONOMY_1, TAXONOMY_2, TAXONOMY_3, COLUMNS}; static LocationInformationModel *instance(); + int columnCount(const QModelIndex &parent) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index = QModelIndex(), int role = Qt::DisplayRole) const; int32_t addDiveSite(const QString& name, int lat = 0, int lon = 0); |