mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
fe07a47989
commit
4eaf6b20be
3 changed files with 23 additions and 43 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue