4 #include "uicontroller.h"
6 #include "gpscontroller.h"
8 #include "messagetable.h"
9 #include "messagehandler.h"
13 #include <QApplication>
14 #include <QMainWindow>
16 int main(int argc, char *argv[] )
18 //qInstallMsgHandler( messageHandler );
19 QApplication app(argc, argv);
21 QMainWindow *mainWindow = new QMainWindow;
23 ui->setupUi(mainWindow);
25 UiController *uiController = new UiController( ui );
26 Route *route = new Route();
27 GpsController *gpsController = new GpsController();
30 route, SIGNAL( routeReady( QList<RouteData> ) ),
31 uiController, SLOT( displayRoute( QList<RouteData> ) )
35 gpsController, SIGNAL( locationChanged( Location* ) ),
36 route, SLOT( setFromLocation( Location* ) )
40 uiController, SIGNAL( destinationChanged( Location* ) ),
41 route, SLOT( setToLocation( Location* ) )
45 uiController, SIGNAL( buttonClicked() ),
46 gpsController, SLOT( getGps() )
50 ui, SIGNAL( fakeGpsPressed( const QString & ) ),
51 gpsController, SLOT( useFakeGps( const QString & ) )
55 ui, SIGNAL( liveGpsPressed() ),
56 gpsController, SLOT( useLiveGps() )