diff options
Diffstat (limited to 'qt-models/maplocationmodel.cpp')
-rw-r--r-- | qt-models/maplocationmodel.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/qt-models/maplocationmodel.cpp b/qt-models/maplocationmodel.cpp index 8e07a7489..e01b46621 100644 --- a/qt-models/maplocationmodel.cpp +++ b/qt-models/maplocationmodel.cpp @@ -92,3 +92,19 @@ void MapLocationModel::clear() m_mapLocations.clear();
endRemoveRows();
}
+
+quint32 MapLocationModel::selectedUuid()
+{
+ return m_selectedUuid;
+}
+
+void MapLocationModel::setSelectedUuid(quint32 uuid)
+{
+ m_selectedUuid = uuid;
+ MapLocation *location = NULL;
+ foreach(location, m_mapLocations) {
+ if (location->getRole(MapLocation::Roles::RoleUuid) == uuid)
+ break;
+ }
+ emit selectedLocationChanged(location);
+}
|