3 Daemon::Daemon(QObject *parent) : QObject(parent) {
4 setting = new QSettings();
5 glatitude = new GoogleLatitude(this);
6 gps = new GpsMaemo5(this);
7 connect(gps, SIGNAL(fix()), this, SLOT(set()));
8 connect(glatitude, SIGNAL(OK()), this, SLOT(daemon_OK()));
9 connect(glatitude, SIGNAL(ERROR()), this, SLOT(daemon_ERROR()));
13 qDebug() << "Daemon: set";
14 glatitude->login(setting->value("user","my_username").toString(),
15 setting->value("pass","my_password").toString());
16 glatitude->freq(setting->value("freq","120").toInt());
17 glatitude->set(gps->get_lat(),
22 void Daemon::daemon_OK() {
23 qDebug() << "Daemon: send";
26 void Daemon::daemon_ERROR() {
27 qDebug() << "Daemon: no auth";
28 QCoreApplication::exit();