aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/maplocationmodel.h
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-27 23:07:37 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commit0955a5b36a5d67454826a0a2fe58d609486faaaa (patch)
tree0b33e6157cb6fe3f842a79e58efb4c20b21b7793 /qt-models/maplocationmodel.h
parent2dea6f514696ea8e740c9028b7426f958bfb2c96 (diff)
downloadsubsurface-0955a5b36a5d67454826a0a2fe58d609486faaaa.tar.gz
maplocationmodel: use READ method selectedUuid
Also emit the selectedUuidChanged signal. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-models/maplocationmodel.h')
-rw-r--r--qt-models/maplocationmodel.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-models/maplocationmodel.h b/qt-models/maplocationmodel.h
index 3da554a09..b3a059038 100644
--- a/qt-models/maplocationmodel.h
+++ b/qt-models/maplocationmodel.h
@@ -48,7 +48,7 @@ class MapLocationModel : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(int count READ count NOTIFY countChanged)
- Q_PROPERTY(quint32 selectedUuid MEMBER m_selectedUuid NOTIFY selectedLocationChanged)
+ Q_PROPERTY(quint32 selectedUuid READ selectedUuid NOTIFY selectedUuidChanged)
public:
MapLocationModel(QObject *parent = NULL);
@@ -64,6 +64,7 @@ public:
void clear();
MapLocation *getMapLocationForUuid(quint32 uuid);
Q_INVOKABLE void setSelectedUuid(QVariant uuid, QVariant fromClick = true);
+ quint32 selectedUuid();
protected:
QHash<int, QByteArray> roleNames() const;
@@ -75,6 +76,7 @@ private:
signals:
void countChanged(int c);
+ void selectedUuidChanged();
void selectedLocationChanged(MapLocation *);
};