diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-03-21 13:42:53 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-04-16 18:55:30 +0000 |
commit | e7287e9f2ac9a6ad99c0c8c93a128655e15af565 (patch) | |
tree | 47e61f7fe3f545e19af8571db13dea89fe6d10e4 | |
parent | 4338e285a9930f1847925ea66ac0cccb0b12fde0 (diff) | |
download | qtlocation-e7287e9f2ac9a6ad99c0c8c93a128655e15af565.tar.gz |
Add documentation for QMapObjectView
Change-Id: I6cc147892b1fe2fce18df52335b0ffeaa56e2c6f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/location/labs/qmapobjectview.cpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/location/labs/qmapobjectview.cpp b/src/location/labs/qmapobjectview.cpp index 310775a1..e1161acd 100644 --- a/src/location/labs/qmapobjectview.cpp +++ b/src/location/labs/qmapobjectview.cpp @@ -41,9 +41,26 @@ QT_BEGIN_NAMESPACE +/*! + \qmltype MapObjectView + \instantiates QMapObjectView + \inqmlmodule Qt.labs.location + \ingroup qml-QtLocation5-maps + \inherits QGeoMapObject + + \brief The MapObjectView is used to populate Map with map objects from a model. + + The MapObjectView is used to populate Map with map objects, either from a model or via + \l addMapObject or \l removeMapObject. + + The MapObjectView type only makes sense when contained in a Map, meaning that it will not work when added inside + other QML elements. + This can also be intended as an object layer on top of a Map. +*/ + /* - QGeoMapLayerPrivate + QMapObjectViewPrivate */ @@ -67,7 +84,7 @@ QGeoMapObject::Type QMapObjectViewPrivate::type() const /* - QGeoMapLayerPrivateDefault + QMapObjectViewPrivateDefault */ @@ -181,11 +198,24 @@ void QMapObjectView::componentComplete() m_delegateModel->componentComplete(); } +/*! + \qmlproperty Variant Qt.labs.location::MapObjectView::model + + This property holds the model that provides data used for creating the map items defined by the + delegate. Only QAbstractItemModel based models are supported. +*/ QVariant QMapObjectView::model() const { return m_model; } +/*! + \qmlproperty Component Qt.labs.location::MapObjectView::delegate + + This property holds the delegate which defines how each item in the + model should be displayed. The Component must contain exactly one + QGeoMapObject -derived object as the root object. +*/ QQmlComponent *QMapObjectView::delegate() const { return m_delegate; |