X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=zouba%2Fmain.cpp;h=182e723b703e279c998f56cccb8807315dbd53a3;hb=5614aafa30d804dfe692671003d9d94f3b3dd182;hp=277faf1c9fc784bdb651e495dcee6d5161f7aac4;hpb=0e395576fcb11ccf19ebf6a936a07607bb3c821d;p=ptas diff --git a/zouba/main.cpp b/zouba/main.cpp index 277faf1..182e723 100644 --- a/zouba/main.cpp +++ b/zouba/main.cpp @@ -3,6 +3,7 @@ #include "ui_zouba.h" #include "uicontroller.h" #include "location.h" +#include "gpscontroller.h" #include "ytv.h" @@ -25,41 +26,29 @@ int main(int argc, char *argv[] ) uiController, SLOT( displayRoute( RouteData ) ) ); - Location *from = new Location(); + GpsController *gpsController = new GpsController(); Location *to = new Location(); QObject::connect( - from, SIGNAL( becomeValid() ), - route, SLOT( setFromLocation() ) + gpsController, SIGNAL( locationChanged( Location ) ), + route, SLOT( setFromLocation( Location ) ) ); QObject::connect( to, SIGNAL( becomeValid() ), route, SLOT( setToLocation() ) ); - ui.homeaddress->setText( home ); + ui.homeaddress->setText( "GPS" ); ui.workaddress->setText( work ); - from->resolveAddress( home ); + gpsController->startGps(); to->resolveAddress( work ); QObject::connect( - uiController, SIGNAL( homeAddressChanged( QString ) ), - from, SLOT( resolveAddress( QString ) ) - ); - - QObject::connect( uiController, SIGNAL( workAddressChanged( QString ) ), to, SLOT( resolveAddress( QString ) ) ); - /* toggle doesn't work yet because 'from' is connected to 'homeAddressChanged' - QObject::connect( - uiController, SIGNAL( directionChanged() ), - route, SLOT( toggleDirection() ) - ); - */ - widget->show(); return app.exec(); }