GPSLocationItem Class Reference

Class for indicating current position and accuracy accuired from GPS on the map. More...

#include <gpslocationitem.h>

List of all members.

Public Member Functions

 GPSLocationItem ()
 Constructor.
QRectF boundingRect () const
 Implements the bounding rect.
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 Implements the painter.
void setEnabled (bool enable)
 Enable / disable item.
void updateItem (QPointF scenePosition, qreal accuracy, qreal sceneResolution)
 Update position item.

Private Member Functions

void setAccuracyRingRadius (qreal accuracy, qreal sceneResolution)
 Set new radius for the accuracy ring.
void setBoundingRect (qreal radius)
 Sets new bounding rect for this item based on the accuracy ring radius.

Private Attributes

bool m_showOnNextUpdate
 should the item be shown when next update arrives
qreal m_radius
 accuracy ring radius in scene pixels
QGraphicsPixmapItem * m_pixmapItem
 red led item
QRectF m_boundingRect
 item's bounding rect

Detailed Description

Class for indicating current position and accuracy accuired from GPS on the map.

Actual position spot image is a child item of this class and this class handles drawing the accuracy ring. GPS fix accuracy is indicated by the radius of the circle around the position item.


Member Function Documentation

QRectF GPSLocationItem::boundingRect (  )  const

Implements the bounding rect.

Returns:
Bounding rect of the item
void GPSLocationItem::setAccuracyRingRadius ( qreal  accuracy,
qreal  sceneResolution 
) [private]

Set new radius for the accuracy ring.

Calls setBoundingRect() if the radius changes

Parameters:
accuracy Accuracy (in meters)
sceneResolution Scene resolution (meters/pixel)
void GPSLocationItem::setBoundingRect ( qreal  radius  )  [private]

Sets new bounding rect for this item based on the accuracy ring radius.

Parameters:
radius Radius of the accuracy ring
void GPSLocationItem::setEnabled ( bool  enable  ) 

Enable / disable item.

Actual enabling is done when next position update is received, so the old value before hiding the item is not used.

Parameters:
enable True if item should be enabled, otherwise false
void GPSLocationItem::updateItem ( QPointF  scenePosition,
qreal  accuracy,
qreal  sceneResolution 
)

Update position item.

Parameters:
scenePosition Scene position
accuracy Accuracy of the GPS fix
sceneResolution Scene horizontal resolution at given coordinate latitude level

The documentation for this class was generated from the following files:

Generated on Fri Sep 3 12:05:41 2010 for Situare client for Maemo by  doxygen 1.6.1