Location Class Reference

The location class provides the functions required for determining the users location. More...

#include <Location.h>

List of all members.

Public Slots

void recvGeoAnswer (QNetworkReply *networkReply)
 Process answer received from geolocation service.
void setNoGps (QString reason)
 Emit a signal that GPS is not available.
void updateLocation (double lat, double lon)
 Emit a signal with the new location information.
void setStatus (QString msg)
 Emit a signal with the status.
void setCacheCenter (double lat, double lng)
 Set the center of the cache.
void updateProgress (QString src)
 Slot called on update of progress.

Signals

void locationReady (QString type, double lat, double lng)
void status (QString msg)
void noLocalization (QString reason)

Public Member Functions

 Location (QWidget *parent=0)
 Constructor of the Location class.
void sendGeoRequest ()
 Request location: send wifi & cell tower information to the geolocation service.
void setNbTraces (int nb)
 Set the number of dummies.
void setMode (int m)
 Set localization mode.
void getLocation ()
 Get location based on mode (mode is an instance variable).
void resetCache ()
 Reset the Cache.
void init ()
 Initialize the location (cache).
QGeoCoordinate getCacheCenter ()
 Get the cache's center.
void reinitCache ()
 Reinit the Cache.

Detailed Description

The location class provides the functions required for determining the users location.

It handles how the location should be retrieved and calls the corresponding functions (WLAN or GPS). It also includes the code for wlan scanning geopositining and major parts of GPS related code.

BETA class: not rules define when to use GPS, thus only WLAN will be used Issue: If error in wlan scanning, a default mac will be sent. (Because the emulator does not support wlan scanning)


Member Function Documentation

QGeoCoordinate Location::getCacheCenter (  ) 

Get the cache's center.

Returns:
the center
void Location::recvGeoAnswer ( QNetworkReply *  networkReply  )  [slot]

Process answer received from geolocation service.

is a pointer to the object that contains the network reply Called by an instance of QNetworkReply if it receives and async answer from the geolocation service containing the current position. The result is sent as signal to the calling class.

void Location::sendGeoRequest (  ) 

Request location: send wifi & cell tower information to the geolocation service.

Send a list of detected APs and Cell Tower infrormation the Geolocation service. The geolocation provider will also read and analyze the current IP address.

void Location::setCacheCenter ( double  lat,
double  lng 
) [slot]

Set the center of the cache.

Parameters:
lat is the latitude
lng is the longitude
void Location::setMode ( int  m  ) 

Set localization mode.

Parameters:
m is the mode
void Location::setNbTraces ( int  nb  ) 

Set the number of dummies.

Parameters:
nb is the number
void Location::setNoGps ( QString  reason  )  [slot]

Emit a signal that GPS is not available.

Parameters:
reson indicates the reason
void Location::setStatus ( QString  msg  )  [slot]

Emit a signal with the status.

is the msg send

void Location::updateLocation ( double  lat,
double  lon 
) [slot]

Emit a signal with the new location information.

Parameters:
lat is the latitude
lon is the longitude
void Location::updateProgress ( QString  src  )  [slot]

Slot called on update of progress.

Parameters:
src indicates the source who updates the progress

The documentation for this class was generated from the following files:
Generated on Thu Jun 24 21:31:43 2010 for PrivL by  doxygen 1.6.3