maplocationmodel: add a "uuid" property to MapLocation

The "uuid" property will be the one from the dive_site. At first it
will also be used to track the active marker/flag selection.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-19 02:02:43 +03:00 committed by Dirk Hohndel
parent ea5221bcf0
commit a9c0abd71a
3 changed files with 18 additions and 6 deletions

View file

@ -12,19 +12,25 @@
class MapLocation : public QObject
{
Q_OBJECT
Q_PROPERTY(quint32 uuid MEMBER m_uuid)
Q_PROPERTY(QGeoCoordinate coordinate MEMBER m_coordinate)
public:
static const char *PROPERTY_NAME_COORDINATE;
static const char *PROPERTY_NAME_UUID;
explicit MapLocation();
explicit MapLocation(QGeoCoordinate);
explicit MapLocation(quint32 uuid, QGeoCoordinate coord);
QVariant getRole(int role) const;
enum Roles {
RoleCoordinate = Qt::UserRole + 1,
RoleUuid = Qt::UserRole + 1,
RoleCoordinate
};
private:
quint32 m_uuid;
QGeoCoordinate m_coordinate;
};