Added dialogs to change home and work locations.
[ptas] / zouba / route.h
1 #ifndef ROUTE_H
2 #define ROUTE_H
3
4 #include "routedata.h"
5 #include "location.h"
6
7 #include <QObject>
8 #include <QNetworkReply>
9 #include <QNetworkAccessManager>
10
11 class RoutePrivate;
12
13 class Route: public QObject
14 {
15   Q_OBJECT
16
17 public:
18   Route();
19   ~Route();
20
21   /*!
22     * \brief Gets the route data from the server
23     */
24   void getRoute();
25
26   /*!
27     \brief Get the from location
28     \return The from location
29     */
30   Location *fromLocation() const;
31
32   /*!
33     \brief Get the to location
34     \return The to location
35     */
36   Location *toLocation() const;
37
38 public Q_SLOTS:
39
40   /*!
41     * \brief Sets the from location
42     * \param fromLocation The from location
43     */
44   void setFromLocation( Location *location=0 );
45
46   /*!
47     * \brief Sets the to location
48     * \param toLocation The to location
49     */
50   void setToLocation( Location *location=0 );
51
52 Q_SIGNALS:
53   void routeReady( QList<RouteData> );
54
55 private Q_SLOTS:
56   void replyFinished( QNetworkReply* );
57
58 private:
59   RoutePrivate *q;
60   QNetworkAccessManager *manager;
61 };
62 #endif // ROUTE_H