First commit
[hikingdiary] / src / maemo5location.cpp
1 #include <QMessageBox>
2 #ifdef Q_WS_MAEMO_5
3 #include "maemo5locationprivate.h"
4 #else
5 #include "Maemo5Location_stub.h"
6 #endif
7 #include "maemo5location.h"
8
9 /**
10   *Default constructor of this class.
11   *@param QObject pointer to parent object. By default the value is NULL.
12   */
13 Maemo5Location::Maemo5Location(QObject* parent):QObject(parent)
14 {
15    // QMessageBox::about(new QWidget(),"Connect to gps","");
16     ptr = new Maemo5LocationPrivate(this);
17     connect(ptr,SIGNAL(agnss()),this,SIGNAL(agnss()));
18     connect(ptr,SIGNAL(awcp()),this,SIGNAL(awcp()));
19     connect(ptr,SIGNAL(locationUpdated()),this,SIGNAL(locationUpdated()));
20     connect(ptr,SIGNAL(connected()),this,SIGNAL(connected()));
21     ptr->get_agnss();
22 }
23
24 /**
25   *Destructor of this class. Should be used to release all allocated resources.
26   */
27 Maemo5Location::~Maemo5Location()
28 {
29     delete ptr;
30 }
31 double Maemo5Location::getLatitude()
32 {
33     return ptr->get_lat();
34 }
35 double Maemo5Location::getLongitude()
36 {
37     return ptr->get_lon();
38 }