m_location( QGeoPositionInfoSource::createDefaultSource(this) ),
currentLocation(0)
{
- m_location->setUpdateInterval( 1*60*1000 );
-
connect(
m_location, SIGNAL( positionUpdated( QGeoPositionInfo ) ),
this, SLOT( updateLocation( QGeoPositionInfo ) )
void GpsController::updateLocation( QGeoPositionInfo positionInfo )
{
- qDebug() << "new GPS position";
-
delete currentLocation;
currentLocation = new Location( positionInfo );
-
- qDebug() << "from location changed";
- emit locationChanged( currentLocation );
}
-void GpsController::startGps()
+void GpsController::getGps()
{
if ( currentLocation != 0 ) {
emit locationChanged( currentLocation );
QObject::connect(
uiController, SIGNAL( buttonClicked() ),
- gpsController, SLOT( startGps() )
+ gpsController, SLOT( getGps() )
);
mainWindow->show();