X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=zouba%2Fuicontroller.cpp;h=891886aed332fc81f1d52fc56eea4ee4a72a250e;hb=d74ef6b41b59eef3192a30a77c552b9dcc400234;hp=3d0e0cab1df4b68c5d48979b120085610ee04feb;hpb=038919ae6a4b9c8ab33b0846847ab84512954041;p=ptas diff --git a/zouba/uicontroller.cpp b/zouba/uicontroller.cpp index 3d0e0ca..891886a 100644 --- a/zouba/uicontroller.cpp +++ b/zouba/uicontroller.cpp @@ -4,6 +4,7 @@ #include "ytv.h" #include "location.h" #include "messagetable.h" +#include "locations.h" #include #include @@ -14,8 +15,12 @@ UiController::UiController( Ui *ui ) : ui(ui) { - Location *homeLocation = new Location(); - Location *workLocation = new Location(); + Location *homeLocation = new Location( "home" ); + Location *workLocation = new Location( "work" ); + + Locations locations; + locations.addLocation( homeLocation ); + locations.addLocation( workLocation ); connect( homeLocation, SIGNAL( becomeValid() ), @@ -36,7 +41,6 @@ UiController::UiController( Ui *ui ) : ui->destinationButtons, SIGNAL( buttonClicked( int ) ), this, SLOT( changeDestination( int ) ) ); - } UiController::~UiController() @@ -64,7 +68,7 @@ void UiController::changeDestination( int id ) bool destinationHasChanged = ( currentDestination != id ); if ( destinationHasChanged ) { - emit destinationChanged( *(destination[id]) ); + emit destinationChanged( destination[id] ); } // always want to emit this so that the gps position is update