X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=zouba%2Fgpscontroller.cpp;fp=zouba%2Fgpscontroller.cpp;h=0000000000000000000000000000000000000000;hb=c7108eea7242056e4685411a3113cbaf34a2982e;hp=33ba7e67ad95fb71b0152b5cdc13663a7310616a;hpb=e377f99e1701bb2f5d583954485d1a1e6d031d05;p=ptas diff --git a/zouba/gpscontroller.cpp b/zouba/gpscontroller.cpp deleted file mode 100644 index 33ba7e6..0000000 --- a/zouba/gpscontroller.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "gpscontroller.h" - -#include -#include -#include -#include - -QTM_USE_NAMESPACE - -GpsController::GpsController() : - m_location( QGeoPositionInfoSource::createDefaultSource(this) ), - currentLocation(0) -{ - connect( - m_location, SIGNAL( positionUpdated( QGeoPositionInfo ) ), - this, SLOT( updateLocation( QGeoPositionInfo ) ) - ); - - m_location->startUpdates(); -} - -GpsController::~GpsController() -{ - delete m_location; - m_location = 0; - delete currentLocation; - currentLocation = 0; -} - -void GpsController::updateLocation( QGeoPositionInfo positionInfo ) -{ - delete currentLocation; - currentLocation = new Location( positionInfo ); -} - -void GpsController::getGps() -{ - if ( currentLocation != 0 ) { - emit locationChanged( currentLocation ); - } -}