mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
UI code to merge dive sites
Get the Qt data structures and convert to something that we can use in our C - core. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
560426bf82
commit
e36e4d1faa
6 changed files with 24 additions and 2 deletions
|
@ -109,8 +109,9 @@ QVariant LocationInformationModel::data(const QModelIndex &index, int role) cons
|
|||
else
|
||||
return QVariant();
|
||||
}
|
||||
case UUID_ROLE:
|
||||
return ds->uuid;
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue