Incorporated changes from bus project.
[ptas] / src / route_p.h
1 #ifndef ROUTE_P_H
2 #define ROUTE_P_H
3
4 #include "routedata.h"
5
6 #include "location.h"
7
8 #include <QObject>
9
10 class RoutePrivate: public QObject
11 {
12     Q_OBJECT
13
14     Q_PROPERTY(Location* fromLocation READ fromLocation WRITE setFromLocation)
15     Q_PROPERTY(Location* toLocation READ toLocation WRITE setToLocation)
16
17 public:
18     RoutePrivate(QObject *parent=0);
19     ~RoutePrivate();
20
21     QList<RouteData> parseReply(const QByteArray &reply);
22
23     void setFromLocation(Location *fromLocation);
24     Location *fromLocation() const;
25
26     void setToLocation(Location *toLocation);
27     Location *toLocation() const;
28
29     bool toValid();
30     bool fromValid();
31
32 private:
33     bool      m_fromValid;
34     bool      m_toValid;
35     Location *m_fromLocation;
36     Location *m_toLocation;
37
38     QString parseJORECode(const QString &joreCode) const;
39 };
40 #endif // ROUTE_P_H