Added a toggle button, and fields to set home and work addresses.
[ptas] / zouba / location.h
1 #ifndef LOCATION_H
2 #define LOCATION_H
3
4 #include "location_p.h"
5
6 #include <QString>
7 #include <QObject>
8 #include <QNetworkAccessManager>
9 #include <QNetworkReply>
10
11 class Location : public QObject
12 {
13     Q_OBJECT
14
15 public:
16   Location( QString x, QString y );
17   Location( const Location &from );
18   Location &operator=( const Location &from );
19   Location();
20
21   ~Location();
22
23   QString x() const;
24
25   QString y() const;
26
27   bool isValid() const;
28
29 public Q_SLOTS:
30   void resolveAddress( QString address );
31
32 Q_SIGNALS:
33   void becomeValid();
34
35 private Q_SLOTS:
36   void replyFinished( QNetworkReply * reply );
37
38 private:
39   LocationPrivate *q;
40   QNetworkAccessManager *manager;
41 };
42
43 #endif // LOCATION_H