Added a toggle button, and fields to set home and work addresses.
[ptas] / zouba / uicontroller.h
1 #ifndef UICONTROLLER_H
2 #define UICONTROLLER_H
3
4 #include "ui_zouba.h"
5 #include "routedata.h"
6
7 #include <QObject>
8
9 class UiController : public QObject
10 {
11   Q_OBJECT
12
13 public:
14   UiController( Ui::MainWindow *ui );
15   ~UiController();
16
17 public Q_SLOTS:
18   void displayRoute( const RouteData &routeData );
19
20 Q_SIGNALS:
21   void homeAddressChanged( QString );
22   void workAddressChanged( QString );
23   void directionChanged();
24
25 private Q_SLOTS:
26   void setHomeAddress();
27   void setWorkAddress();
28   void toggleRoute();
29
30 private:
31   Ui::MainWindow *ui;
32   enum Direction {
33     WorkToHome,
34     HomeToWork
35   };
36
37   Direction route;
38 };
39 #endif // UICONTROLLER_H
40