Skip to content
Newer
Older
100644 90 lines (79 sloc) 2.3 KB
17c9b95 @gnuvince Page class + MainMenuPage
authored Apr 14, 2011
1 #ifndef USERINTERFACE_H
2 #define USERINTERFACE_H
3
4 #include <QtGui>
5 #include <QMainWindow>
6 #include <QStackedWidget>
d4c277f @gnuvince Added the following:
authored Apr 14, 2011
7 #include <QMap>
8
0e47fe3 @gnuvince Moved Page and its subclasses to pages/ subdir
authored Apr 15, 2011
9 #include "pages/page.h"
527e4ab @gnuvince Added distance calculation and disabled next button
authored Apr 17, 2011
10 #include "station.h"
11 #include "stationmodel.h"
e64a8e4 @gnuvince Selecting a position on the map affects the selection of the station …
authored Apr 25, 2011
12 #include "stationsortproxy.h"
d73cbfd @gnuvince Started working on the inners of selecting a vehicle
authored Apr 26, 2011
13 #include "vehiculemodel.h"
9e588f1 @Gabriano User selection
Gabriano authored Apr 26, 2011
14 #include "usagermodel.h"
d73cbfd @gnuvince Started working on the inners of selecting a vehicle
authored Apr 26, 2011
15 #include "vehiculefilterproxy.h"
e477309 @gnuvince intermediate commit
authored Apr 26, 2011
16 #include "reservation.h"
17 #include "reservationmodel.h"
a88c343 @Gabriano Creating reservation view
Gabriano authored Apr 27, 2011
18 #include "reservationfilterproxy.h"
e64a8e4 @gnuvince Selecting a position on the map affects the selection of the station …
authored Apr 25, 2011
19 #include "geoposition.h"
9d6e217 @gnuvince Added comments widgets
authored Apr 28, 2011
20 #include "notemodel.h"
17c9b95 @gnuvince Page class + MainMenuPage
authored Apr 14, 2011
21
80e0a8d @gnuvince Some refactorings
authored Apr 15, 2011
22 enum PageName { Page_MainMenu,
23 Page_FindStation, Page_SelectPosition, Page_SelectStation, Page_SelectTime, Page_SelectCar, Page_Confirm,
6a5051c @Gabriano Added and connected new pages
Gabriano authored Apr 25, 2011
24 Page_Bookings, Page_Comments, Page_Unexpected, Page_Email, Page_WriteComment
80e0a8d @gnuvince Some refactorings
authored Apr 15, 2011
25 };
26
17c9b95 @gnuvince Page class + MainMenuPage
authored Apr 14, 2011
27 namespace Ui {
28 class UserInterface;
29 }
30
31 class UserInterface : public QMainWindow
32 {
33 Q_OBJECT
34
35 public:
527e4ab @gnuvince Added distance calculation and disabled next button
authored Apr 17, 2011
36 explicit UserInterface(
37 StationModel *smodel,
d73cbfd @gnuvince Started working on the inners of selecting a vehicle
authored Apr 26, 2011
38 VehiculeModel *vmodel,
9e588f1 @Gabriano User selection
Gabriano authored Apr 26, 2011
39 UsagerModel *umodel,
e477309 @gnuvince intermediate commit
authored Apr 26, 2011
40 ReservationModel *rmodel,
9d6e217 @gnuvince Added comments widgets
authored Apr 28, 2011
41 NoteModel *nmodel,
527e4ab @gnuvince Added distance calculation and disabled next button
authored Apr 17, 2011
42 QWidget *parent = 0);
17c9b95 @gnuvince Page class + MainMenuPage
authored Apr 14, 2011
43 ~UserInterface();
44
45 private:
46 Ui::UserInterface *ui;
9e588f1 @Gabriano User selection
Gabriano authored Apr 26, 2011
47 Usager *user;
80e0a8d @gnuvince Some refactorings
authored Apr 15, 2011
48 QMap<PageName, Page*> *pages;
9e588f1 @Gabriano User selection
Gabriano authored Apr 26, 2011
49 void createPages();
80e0a8d @gnuvince Some refactorings
authored Apr 15, 2011
50 Page* getPage(PageName name);
527e4ab @gnuvince Added distance calculation and disabled next button
authored Apr 17, 2011
51 StationModel *stationModel;
e64a8e4 @gnuvince Selecting a position on the map affects the selection of the station …
authored Apr 25, 2011
52 StationSortProxy *stationProxy;
d73cbfd @gnuvince Started working on the inners of selecting a vehicle
authored Apr 26, 2011
53 VehiculeModel *vehiculeModel;
54 VehiculeFilterProxy *vehiculeProxy;
9e588f1 @Gabriano User selection
Gabriano authored Apr 26, 2011
55 UsagerModel *usagerModel;
4735528 @Gabriano working on reservation viewing
Gabriano authored Apr 26, 2011
56 ReservationModel *reservationModel;
a88c343 @Gabriano Creating reservation view
Gabriano authored Apr 27, 2011
57 ReservationFilterProxy *reservationProxy;
d73cbfd @gnuvince Started working on the inners of selecting a vehicle
authored Apr 26, 2011
58 GeoPosition *currentPosition;
e477309 @gnuvince intermediate commit
authored Apr 26, 2011
59 Reservation *reservation;
9d6e217 @gnuvince Added comments widgets
authored Apr 28, 2011
60 NoteModel *noteModel;
f874f47 @Gabriano working on bookingsPage
Gabriano authored Apr 27, 2011
61 //ReservationModel *reservationModel;
d73cbfd @gnuvince Started working on the inners of selecting a vehicle
authored Apr 26, 2011
62
d4c277f @gnuvince Added the following:
authored Apr 14, 2011
63
64 public slots:
80e0a8d @gnuvince Some refactorings
authored Apr 15, 2011
65 void gotoPage(PageName name);
d4c277f @gnuvince Added the following:
authored Apr 14, 2011
66 void gotoMainMenu();
80e0a8d @gnuvince Some refactorings
authored Apr 15, 2011
67 void gotoFindStationPage();
68 void gotoSelectPosition();
69 void gotoSelectStation();
70 void gotoSelectTime();
71 void gotoSelectCar();
72 void gotoConfirm();
e12733e @Gabriano Added pages
Gabriano authored Apr 24, 2011
73 void gotoCommentPage();
74 void gotoUnexpected();
75 void gotoBookings();
76 void gotoEmailPage();
e64a8e4 @gnuvince Selecting a position on the map affects the selection of the station …
authored Apr 25, 2011
77 void setCurrentPosition(GeoPosition pos);
6a5051c @Gabriano Added and connected new pages
Gabriano authored Apr 25, 2011
78 void gotoWriteComment();
c683519 @gnuvince Added info station page
authored Apr 25, 2011
79 void showInfoStation(Station *station);
8e3c2fa @gnuvince Added infocarpage
authored Apr 27, 2011
80 void showInfoVehicule(Vehicule *vehicule);
e477309 @gnuvince intermediate commit
authored Apr 26, 2011
81 void setTimes(QDateTime start, QDateTime end);
82 void setStationId(qint64 stationId);
83 void setCarId(qint64 carId);
9e588f1 @Gabriano User selection
Gabriano authored Apr 26, 2011
84 void setUser(qint64 id);
3061d31 @gnuvince Confirmation page
authored Apr 27, 2011
85 void resetReservation();
86 void saveReservation();
17c9b95 @gnuvince Page class + MainMenuPage
authored Apr 14, 2011
87 };
88
89 #endif // USERINTERFACE_H
Something went wrong with that request. Please try again.