Conflict solved: mainwindow.cpp and calculate.cpp
[speedfreak] / Client / gpsdata.cpp
index 1fa4983..f0f53eb 100644 (file)
@@ -10,7 +10,7 @@
 #include <QDebug>
 
 /**
-  *Default constructor of this class.
+  * Default constructor of this class.
   */
 GPSData::GPSData(Maemo5Location *maemo5location)
 {
@@ -31,7 +31,7 @@ GPSData::GPSData(Maemo5Location *maemo5location)
 }
 
 /**
-  *Destructor of this class. Deletes all dynamic objects and sets them to NULL.
+  * Destructor of this class. Deletes all dynamic objects and sets them to NULL.
   */
 GPSData::~GPSData()
 {
@@ -43,7 +43,7 @@ GPSData::~GPSData()
 }
 
 /**
-  * This function reset all variables
+  * This function reset all variables.
   */
 void GPSData::resetAll()
 {
@@ -107,7 +107,7 @@ void GPSData::agnss()
         speed       = location->getSpeed();     //Returns current speed in km/h.
         track = location->getTrack(); //Returns direction of motion in degrees(0-359).
 
-        QFile routeTempFile("routetemp.xml");//Temp xml.
+        QFile routeTempFile("/home/user/MyDocs/speedfreak/route/routetemp.xml");//Temp xml.
 
         //If GPS find 4 or more satellite and signal stregth is 30 or more.
         if (location->getSatellitesInUse() >= 4 && location->getSignalStrength() >= 30)
@@ -147,64 +147,58 @@ void GPSData::agnss()
 }
 
 /**
-  *This slot function is called when gprs update location.
+  * This slot function is called when gprs update location.
   */
 void GPSData::awcp()
 {
-
 }
 
 /**
-  *This slot function is called when .
+  * This slot function is called when .
   */
 void GPSData::locationUpdated()
 {
-
 }
 
 /**
-  *This slot function is called when .
+  * This slot function is called when .
   */
 void GPSData::gpsConnected()
 {
-
 }
 
 /**
-  *This slot function is called when .
+  * This slot function is called when .
   */
 void GPSData::gpsDisconnected()
 {
-
 }
 
 /**
-  *This slot function is called when .
+  * This slot function is called when .
   */
 void GPSData::gpsError()
 {
-
 }
 
 /**
-  *This slot function is called when .
+  * This slot function is called when .
   */
 void GPSData::gpsdRunning()
 {
-
 }
 
 /**
-  *This slot function is called when .
+  * This slot function is called when .
   */
 void GPSData::gpsdStopped()
 {
-
 }
 
 /**
-  *This function start route recording.
-  *@param QString time recording start time.
+  * This function start route recording.
+  *
+  * @param QString time recording start time.
   */
 void GPSData::startRouteRecording()
 {
@@ -219,8 +213,9 @@ void GPSData::startRouteRecording()
 }
 
 /**
-  *This function stop route recording.
-  *@param QString time recording stop time.
+  * This function stop route recording.
+  *
+  * @param QString time recording stop time.
   */
 void GPSData::stopRouteRecording()
 {
@@ -232,7 +227,7 @@ void GPSData::stopRouteRecording()
         recordingStatus = false;
 
         //Write final xml.
-        QFile file("route.xml");
+        QFile file("/home/user/MyDocs/speedfreak/route/route.xml");
         if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
             return;
         writeRouteXml(&file, 1);
@@ -242,13 +237,16 @@ void GPSData::stopRouteRecording()
 }
 
 /**
-  *This function write route to .xml file.
+  * This function write route to .xml file.
+  *
+  * @param QIODevice *device
+  * @param int round
   */
 void GPSData::writeRouteXml(QIODevice *device, int round)
 {
     xmlwriter.setDevice(device);
 
-    //Write temp xml (routetemp.xml).
+    //Write temp xml (/home/user/MyDocs/speedfreak/route/routetemp.xml).
     if ( round == 0 )
     {
         xmlwriter.writeStartElement("Point");
@@ -259,7 +257,7 @@ void GPSData::writeRouteXml(QIODevice *device, int round)
         xmlwriter.writeEndElement();//Point
     }
 
-    //Write final xml (route.xml).
+    //Write final xml (/home/user/MyDocs/speedfreak/route/route.xml).
     else if ( round == 1 )
     {
         xmlwriter.writeStartDocument();
@@ -269,7 +267,7 @@ void GPSData::writeRouteXml(QIODevice *device, int round)
         xmlwriter.writeAttribute("Points", QString::number(roundCounter));
 
         //Open temp xml and read points
-        QFile tempFile("routetemp.xml");
+        QFile tempFile("/home/user/MyDocs/speedfreak/route/routetemp.xml");
         if (!tempFile.open(QIODevice::ReadOnly | QIODevice::Text))
             return;
         QTextStream readRoute(&tempFile);
@@ -283,7 +281,9 @@ void GPSData::writeRouteXml(QIODevice *device, int round)
 }
 
 /**
-  *This function returns distance traveled since recording started.
+  * This function returns distance traveled since recording started.
+  *
+  * @return double distance
   */
 double GPSData::getDistanceTraveled()
 {
@@ -291,8 +291,9 @@ double GPSData::getDistanceTraveled()
 }
 
 /**
-  *This function returns direction of motion in degrees(0-359).
-  *@return double track
+  * This function returns direction of motion in degrees(0-359).
+  *
+  * @return double track
   */
 double GPSData::getDirection()
 {