projects
/
ptas
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changes: changed UI, walking speed, time format
[ptas]
/
zouba
/
main.cpp
diff --git
a/zouba/main.cpp
b/zouba/main.cpp
index
182e723
..
761cfcb
100644
(file)
--- a/
zouba/main.cpp
+++ b/
zouba/main.cpp
@@
-1,6
+1,6
@@
#include "routedata.h"
#include "route.h"
#include "routedata.h"
#include "route.h"
-#include "ui_zouba.h"
+#include "ui.h"
#include "uicontroller.h"
#include "location.h"
#include "gpscontroller.h"
#include "uicontroller.h"
#include "location.h"
#include "gpscontroller.h"
@@
-9,46
+9,44
@@
#include <QDebug>
#include <QObject>
#include <QDebug>
#include <QObject>
+#include <QApplication>
+#include <QMainWindow>
int main(int argc, char *argv[] )
{
QApplication app(argc, argv);
int main(int argc, char *argv[] )
{
QApplication app(argc, argv);
- QMainWindow *widget = new QMainWindow;
- Ui::MainWindow ui;
- ui.setupUi(widget);
+ QMainWindow *mainWindow = new QMainWindow;
+ Ui ui;
+ ui.setupUi(mainWindow);
- UiController *uiController = new UiController( &ui );
-
- Route *route = new Route();
+ UiController *uiController = new UiController( &ui );
+ Route *route = new Route();
+ GpsController *gpsController = new GpsController();
+ Location *to = new Location();
QObject::connect(
route, SIGNAL( routeReady( RouteData ) ),
uiController, SLOT( displayRoute( RouteData ) )
);
QObject::connect(
route, SIGNAL( routeReady( RouteData ) ),
uiController, SLOT( displayRoute( RouteData ) )
);
- GpsController *gpsController = new GpsController();
- Location *to = new Location();
-
QObject::connect(
gpsController, SIGNAL( locationChanged( Location ) ),
route, SLOT( setFromLocation( Location ) )
);
QObject::connect(
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( "GPS" );
- ui.workaddress->setText( work );
-
- gpsController->startGps();
- to->resolveAddress( work );
-
QObject::connect(
QObject::connect(
- uiController, SIGNAL( workAddressChanged( QString ) ),
- to, SLOT( resolveAddress( QString ) )
+ uiController, SIGNAL( homePressed() ),
+ gpsController, SLOT( startGps() )
);
);
- widget->show();
+ mainWindow->show();
+
+ to->resolveAddress( work );
+
return app.exec();
}
return app.exec();
}