Baseclass for showing own and friends locations on the map. More...
#include <baselocationitem.h>
Public Member Functions | |
BaseLocationItem (QObject *parent=0) | |
Constructor of BaseLocationItem. Sets parent. | |
QRect | sceneTransformedBoundingRect (int zoomLevel) const |
Return item rect transformed to given zoom level. |
Baseclass for showing own and friends locations on the map.
BaseLocationItem::BaseLocationItem | ( | QObject * | parent = 0 |
) |
Constructor of BaseLocationItem. Sets parent.
parent |
QRect BaseLocationItem::sceneTransformedBoundingRect | ( | int | zoomLevel | ) | const |
Return item rect transformed to given zoom level.
Because of using ItemIgnoresTransformations, and not scaling the item, the default sceneBoundingRect can't be used because it always returns the lowest map tile level scene bounding rect. This method does return rect scaled to given zoom level. Rect's center point is also normalized to be inside the map.
zoomLevel | Zoom level for which the sceneBoundingRect should be transformed |