4 #include "uicontroller.h"
12 int main(int argc, char *argv[] )
14 QApplication app(argc, argv);
15 QMainWindow *widget = new QMainWindow;
19 UiController *uiController = new UiController( &ui );
21 Route *route = new Route();
24 route, SIGNAL( routeReady( RouteData ) ),
25 uiController, SLOT( displayRoute( RouteData ) )
28 Location *from = new Location();
29 Location *to = new Location();
32 from, SIGNAL( becomeValid() ),
33 route, SLOT( setFromLocation() )
36 to, SIGNAL( becomeValid() ),
37 route, SLOT( setToLocation() )
40 ui.homeaddress->setText( home );
41 ui.workaddress->setText( work );
43 from->resolveAddress( home );
44 to->resolveAddress( work );
47 uiController, SIGNAL( homeAddressChanged( QString ) ),
48 from, SLOT( resolveAddress( QString ) )
52 uiController, SIGNAL( workAddressChanged( QString ) ),
53 to, SLOT( resolveAddress( QString ) )
56 /* toggle doesn't work yet because 'from' is connected to 'homeAddressChanged'
58 uiController, SIGNAL( directionChanged() ),
59 route, SLOT( toggleDirection() )