summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-07-23 06:00:21 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-07-23 10:07:01 (GMT)
commit30c7eee07501688c0f32de3eeeaff63a9209e364 (patch)
tree3f8a2188fd89880700849f61ee090c355fb9530c
parent93f97f5c3a20a54fe2ad4ec7eee994060c7bd2e3 (diff)
Return data for icon path role
-rw-r--r--src/lib/marble/GeoDataTreeModel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/marble/GeoDataTreeModel.cpp b/src/lib/marble/GeoDataTreeModel.cpp
index 8ece7fc..393eddd 100644
--- a/src/lib/marble/GeoDataTreeModel.cpp
+++ b/src/lib/marble/GeoDataTreeModel.cpp
@@ -442,6 +442,11 @@ QVariant GeoDataTreeModel::data( const QModelIndex &index, int role ) const
return container->customStyle() ? QVariant( QBrush( container->customStyle()->listStyle().backgroundColor() )) : QVariant();
}
}
+ } else if (role == MarblePlacemarkModel::IconPathRole) {
+ if (object->nodeType() == GeoDataTypes::GeoDataPlacemarkType) {
+ GeoDataPlacemark *placemark = static_cast<GeoDataPlacemark*>(object);
+ return placemark->style()->iconStyle().iconPath();
+ }
}
return QVariant();