diff options
author | Juha Vuolle <juha.vuolle@nokia.com> | 2011-11-30 12:54:26 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-01 08:17:47 +0100 |
commit | cfb215c98866b00f11d3e20b4b92b1fe22387be4 (patch) | |
tree | 5590137ca4930ecf228deb70181ec9cf7e6d4a72 /src/imports/location/qdeclarativecirclemapitem.cpp | |
parent | 1b8b61028e37d6d4a8d8f069867f12f94a08225a (diff) | |
download | qtlocation-cfb215c98866b00f11d3e20b4b92b1fe22387be4.tar.gz |
Renamed and reorganized QML Map item files and elements.
Current plan is to have generic 'QML item' mapitem type
(map quick item) and selected map specific items
(at least map route item, map polygon item, map circle item).
Change-Id: I5a9d1705051595476098d346e5fd3c3500ec7810
Reviewed-by: Juha Vuolle <juha.vuolle@nokia.com>
Diffstat (limited to 'src/imports/location/qdeclarativecirclemapitem.cpp')
-rw-r--r-- | src/imports/location/qdeclarativecirclemapitem.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/imports/location/qdeclarativecirclemapitem.cpp b/src/imports/location/qdeclarativecirclemapitem.cpp index 2b94acdb..8cf4a3f1 100644 --- a/src/imports/location/qdeclarativecirclemapitem.cpp +++ b/src/imports/location/qdeclarativecirclemapitem.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "qdeclarativecirclemapitem_p.h" +#include "qdeclarativegeomapquickitem_p.h" #include "projection_p.h" #include <cmath> #include <QPen> @@ -103,8 +104,8 @@ static QPolygonF createPolygon(const Map& map, const QList<QGeoCoordinate> &path QDeclarativeCircleMapItem::QDeclarativeCircleMapItem(QQuickItem *parent): QDeclarativeGeoMapItemBase(parent), center_(0), - screenItem_(new QDeclarativeGeoMapScreenItem(this)), - circleMapPaintedItem_(new CircleMapPaintedItem(screenItem_)) + quickItem_(new QDeclarativeGeoMapQuickItem(this)), + circleMapPaintedItem_(new CircleMapPaintedItem(quickItem_)) { } @@ -187,14 +188,14 @@ void QDeclarativeCircleMapItem::update() if (!map()) return; - screenItem_->setCoordinate(new QDeclarativeCoordinate(circleMapPaintedItem_->screenItemCoordinate())); - screenItem_->setAnchorPoint(circleMapPaintedItem_->screenItemAnchorPoint()); + quickItem_->setCoordinate(new QDeclarativeCoordinate(circleMapPaintedItem_->quickItemCoordinate())); + quickItem_->setAnchorPoint(circleMapPaintedItem_->quickItemAnchorPoint()); - if (screenItem_->sourceItem() == 0) { + if (quickItem_->sourceItem() == 0) { connect(map(), SIGNAL(cameraDataChanged(CameraData)), this, SLOT(handleCameraDataChanged(CameraData))); circleMapPaintedItem_->setMap(map()); - screenItem_->setMap(quickMap(), map()); - screenItem_->setSourceItem(circleMapPaintedItem_); + quickItem_->setMap(quickMap(), map()); + quickItem_->setSourceItem(circleMapPaintedItem_); } } @@ -272,8 +273,8 @@ void CircleMapPaintedItem::updateGeometry() setHeight(h); setContentsSize(QSize(w, h)); - screenItemCoordinate_ = centerCoord_; - screenItemAnchorPoint_ = QPointF(w, h) / 2; + quickItemCoordinate_ = centerCoord_; + quickItemAnchorPoint_ = QPointF(w, h) / 2; initialized_ = true; update(); @@ -380,12 +381,12 @@ qreal CircleMapPaintedItem::radius() const return radius_; } -QGeoCoordinate CircleMapPaintedItem::screenItemCoordinate() const +QGeoCoordinate CircleMapPaintedItem::quickItemCoordinate() const { - return screenItemCoordinate_; + return quickItemCoordinate_; } -QPointF CircleMapPaintedItem::screenItemAnchorPoint() const +QPointF CircleMapPaintedItem::quickItemAnchorPoint() const { - return screenItemAnchorPoint_; + return quickItemAnchorPoint_; } |