projects
/
ptas
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changes: added GPS class and made app get from location from GPS
[ptas]
/
zouba
/
main.cpp
diff --git
a/zouba/main.cpp
b/zouba/main.cpp
index
277faf1
..
182e723
100644
(file)
--- a/
zouba/main.cpp
+++ b/
zouba/main.cpp
@@
-3,6
+3,7
@@
#include "ui_zouba.h"
#include "uicontroller.h"
#include "location.h"
#include "ui_zouba.h"
#include "uicontroller.h"
#include "location.h"
+#include "gpscontroller.h"
#include "ytv.h"
#include "ytv.h"
@@
-25,41
+26,29
@@
int main(int argc, char *argv[] )
uiController, SLOT( displayRoute( RouteData ) )
);
uiController, SLOT( displayRoute( RouteData ) )
);
- Location *from = new Location();
+ GpsController *gpsController = new GpsController();
Location *to = new Location();
QObject::connect(
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() )
);
);
QObject::connect(
to, SIGNAL( becomeValid() ),
route, SLOT( setToLocation() )
);
- ui.homeaddress->setText( home );
+ ui.homeaddress->setText( "GPS" );
ui.workaddress->setText( work );
ui.workaddress->setText( work );
- from->resolveAddress( home );
+ gpsController->startGps();
to->resolveAddress( work );
QObject::connect(
to->resolveAddress( work );
QObject::connect(
- uiController, SIGNAL( homeAddressChanged( QString ) ),
- from, SLOT( resolveAddress( QString ) )
- );
-
- QObject::connect(
uiController, SIGNAL( workAddressChanged( QString ) ),
to, SLOT( resolveAddress( QString ) )
);
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();
}
widget->show();
return app.exec();
}