summaryrefslogtreecommitdiffstats
path: root/qt-models/maplocationmodel.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-09-01 00:18:15 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-06 11:48:47 -0700
commit4eaf6b20bece25516d6ba29e372ac84de690cde7 (patch)
treeecabf091bf6166fd5f67b4acc6f83fae817891da /qt-models/maplocationmodel.h
parentfe07a47989fbcf4b95989d6d32e51da07a5cc211 (diff)
downloadsubsurface-4eaf6b20bece25516d6ba29e372ac84de690cde7.tar.gz
Cleanup: remove accessor functions from MapLocation
Let's face it: this is a value type. No point in having Java-style getters and setters. Replace by plain old and boring member variables. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/maplocationmodel.h')
-rw-r--r--qt-models/maplocationmodel.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h
index 5fdddf0f2..afb7e92ec 100644
--- a/qt-models/maplocationmodel.h
+++ b/qt-models/maplocationmodel.h
@@ -19,9 +19,6 @@ public:
explicit MapLocation(struct dive_site *ds, QGeoCoordinate coord, QString name, bool selected);
QVariant getRole(int role) const;
- QGeoCoordinate coordinate();
- void setCoordinate(QGeoCoordinate coord);
- struct dive_site *divesite();
enum Roles {
RoleDivesite = Qt::UserRole + 1,
@@ -32,12 +29,10 @@ public:
RoleIsSelected
};
-private:
- struct dive_site *m_ds;
- QGeoCoordinate m_coordinate;
- QString m_name;
-public:
- bool m_selected = false;
+ struct dive_site *divesite;
+ QGeoCoordinate coordinate;
+ QString name;
+ bool selected = false;
};
class MapLocationModel : public QAbstractListModel