enable plugins, update todo
[googlelatitude] / src / glatitude.h
1 #ifndef GLATITUDE_H
2 #define GLATITUDE_H
3
4 #include <QtNetwork>
5
6 class GoogleLatitude : public QObject {
7     Q_OBJECT
8
9 signals:
10     void OK();
11     void ERROR();
12
13 public:
14     GoogleLatitude(QObject *parent = 0);
15     void login(QString username, QString password);
16     void set(double latitude, double longitude, double accuracy=1000.);
17     double get_lat() { return latitude; }
18     double get_lon() { return longitude; }
19     double get_acc() { return accuracy; }
20
21 private slots:
22     void finishedreply(QNetworkReply *r);
23
24 private:
25     // info
26     QString user;
27     QString pass;
28     double latitude;
29     double longitude;
30     double accuracy;
31     // stuff
32     QNetworkAccessManager *worker;
33     QUrl urllogin;
34     QUrl urldologin;
35     QUrl urlupdate;
36 };
37
38 #endif // GLATITUDE_H