Conflict solved: mainwindow.cpp and calculate.cpp
authorToni Jussila <toni.jussila@gmail.com>
Fri, 28 May 2010 12:09:17 +0000 (15:09 +0300)
committerToni Jussila <toni.jussila@gmail.com>
Fri, 28 May 2010 12:09:17 +0000 (15:09 +0300)
32 files changed:
Client/accelerationstart.cpp
Client/accelerometer.cpp
Client/accrealtimedialog.cpp
Client/calculate.cpp
Client/calibratedialog.cpp
Client/categorylist.cpp
Client/creditsdialog.cpp
Client/custombutton.cpp
Client/filereader.cpp
Client/gpsdata.cpp
Client/helpaccelerationdialog.cpp
Client/helpdialog.cpp
Client/helpdialog.h
Client/helpresultsdialog.cpp
Client/helproutingdialog.cpp
Client/helpsettingsdialog.cpp
Client/httpclient.cpp
Client/instructionsdialog.cpp
Client/maemo5location.cpp
Client/maemo5locationprivate.cpp
Client/main.cpp
Client/mainwindow.cpp
Client/mainwindow.h
Client/movingaverage.cpp
Client/profiledialog.cpp
Client/registerdialog.cpp
Client/registerdialog.h
Client/resultdialog.cpp
Client/routedialog.cpp
Client/routesavedialog.cpp
Client/settingsdialog.cpp
Client/topresultdialog.cpp

index 00c3160..7a30534 100644 (file)
@@ -6,11 +6,15 @@
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
+
 #include "accelerationstart.h"
 #include "ui_accelerationstartdialog.h"
 #include <QMessageBox>
 #include <QDebug>
 
+/**
+  * Constructor of this class.
+  */
 accelerationstart::accelerationstart(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::accelerationstart)
@@ -24,7 +28,6 @@ accelerationstart::accelerationstart(QWidget *parent) :
     stopMeasureSpeed = 0;
 
     ui->categorComboBox->addItem("Select category");
-    //ui->categorComboBox->addItem("-");
     ui->categorComboBox->addItem("0 - 20 km/h",20);
     ui->categorComboBox->addItem("0 - 40 km/h");
     ui->categorComboBox->addItem("0 - 100 km/h");
@@ -38,6 +41,10 @@ accelerationstart::accelerationstart(QWidget *parent) :
     ui->pushButtonInfo->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
 }
 
+/**
+  * Destructor of this class.
+  * Deletes all dynamic objects and sets them to NULL.
+  */
 accelerationstart::~accelerationstart()
 {
     delete ui;
@@ -45,6 +52,9 @@ accelerationstart::~accelerationstart()
         delete accRealTimeDialog;
 }
 
+/**
+  *
+  */
 void accelerationstart::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
@@ -57,6 +67,9 @@ void accelerationstart::changeEvent(QEvent *e)
     }
 }
 
+/**
+  * This slot function called when ever calibration button clicked
+  */
 void accelerationstart::on_buttonCalib_clicked()
 {
     if(accRealTimeDialog == NULL)
@@ -69,6 +82,9 @@ void accelerationstart::on_buttonCalib_clicked()
     ui->buttonStart->setEnabled(true);
 }
 
+/**
+  * This slot function called when ever start button clicked
+  */
 void accelerationstart::on_buttonStart_clicked()
 {
     if( stopMeasureSpeed == 0 )
@@ -85,6 +101,11 @@ void accelerationstart::on_buttonStart_clicked()
     accRealTimeDialog->show();
 }
 
+/**
+  * This slot function called when ever category combobox index changed.
+  *
+  * @param int index
+  */
 void accelerationstart::on_categorComboBox_currentIndexChanged( int index )
 {
     stopMeasureSpeed = 0;
@@ -102,7 +123,11 @@ void accelerationstart::on_categorComboBox_currentIndexChanged( int index )
     }
 }
 
-
+/**
+  * Get measure categoty function.
+  *
+  * @return QString measure category
+  */
 QString accelerationstart::getMeasureCategory()
 {
     return measureCategory;
@@ -111,7 +136,8 @@ QString accelerationstart::getMeasureCategory()
 /**
   *This slot function emit mainwindow sendresult.
   *
-  **/
+  * @param double result
+  */
 void accelerationstart::sendResult(double result)
 {
     emit sendresult(measureCategory, result);
index cba6a78..4336b31 100644 (file)
@@ -4,6 +4,7 @@
  * @author      Rikhard Kuutti <rikhard.kuutti@fudeco.com>
  * @author      Kai Rasilainen <kai.rasilainen@fudeco.com>
  * @author      Jukka Kurttila <jktla@suomi24.fi>
+ * @author      Toni Jussila   <toni.jussila@fudeco.com>
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
@@ -19,9 +20,9 @@
 #define kIterations      100
 
 /**
- * Default constructor for Accelerometer class
- *
- */
+  * Default constructor for Accelerometer class.
+  *
+  */
 Accelerometer::Accelerometer()
 {
     initValues();
@@ -31,9 +32,9 @@ Accelerometer::Accelerometer()
 }
 
 /**
- * Default destructor for Accelerometer class
- *
- */
+  * Default destructor for Accelerometer class.
+  * Deletes all dynamic objects and sets them to NULL.
+  */
 Accelerometer::~Accelerometer()
 {
     if(calibrateDialog)
@@ -43,9 +44,9 @@ Accelerometer::~Accelerometer()
 }
 
 /**
- * Init class members
- *
- */
+  * Init class members.
+  *
+  */
 void Accelerometer::initValues()
 {
     previousAccelerationX = 0;
@@ -114,12 +115,12 @@ void Accelerometer::calibrate(void)
 }
 
 /**
- * Smooths Accelerometer data by applying a low pass filter to data
- *
- * @param x accelerometer's x-axis input
- * @param y accelerometer's y-axis input
- * @param z accelerometer's z-axis input
- */
+  * Smooths Accelerometer data by applying a low pass filter to data.
+  *
+  * @param x accelerometer's x-axis input
+  * @param y accelerometer's y-axis input
+  * @param z accelerometer's z-axis input
+  */
 void Accelerometer::smoothData(qreal &x, qreal &y, qreal &z)
 {
     x = (previousAccelerationX * (1 - kFilteringFactor)) + (x * kFilteringFactor);
@@ -132,12 +133,12 @@ void Accelerometer::smoothData(qreal &x, qreal &y, qreal &z)
 }
 
 /**
- * Gets the raw acceleration data from accelerometer
- *
- * @param x accelerometer's x-axis input
- * @param y accelerometer's y-axis input
- * @param z accelerometer's z-axis input
- */
+  * Gets the raw acceleration data from accelerometer.
+  *
+  * @param x accelerometer's x-axis input
+  * @param y accelerometer's y-axis input
+  * @param z accelerometer's z-axis input
+  */
 void Accelerometer::getAcceleration(qreal &x, qreal &y, qreal &z)
 {
 #ifdef FROM_FILE
@@ -157,30 +158,30 @@ void Accelerometer::getAcceleration(qreal &x, qreal &y, qreal &z)
 }
 
 /**
- * Get the x calibration component
- *
- * @return calibrationX x calibration component
- */
+  * Get the x calibration component.
+  *
+  * @return calibrationX x calibration component
+  */
 qreal Accelerometer::getCalibrationX()
 {
     return calibrationX;
 }
 
 /**
- * Get the y calibration component
- *
- * @return calibrationY y calibration component
- */
+  * Get the y calibration component.
+  *
+  * @return calibrationY y calibration component
+  */
 qreal Accelerometer::getCalibrationY()
 {
     return calibrationY;
 }
 
 /**
- * Get the z calibration component
- *
- * @return calibrationZ z calibration component
- */
+  * Get the z calibration component.
+  *
+  * @return calibrationZ z calibration component
+  */
 qreal Accelerometer::getCalibrationZ()
 {
     return calibrationZ;
index 4406a08..e572d27 100644 (file)
 #include "ui_accrealtimedialog.h"
 #include <math.h>
 
+/**
+  * Default constructor for AccRealTimeDialog class.
+  *
+  */
 AccRealTimeDialog::AccRealTimeDialog(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::AccRealTimeDialog)
@@ -32,6 +36,10 @@ AccRealTimeDialog::AccRealTimeDialog(QWidget *parent) :
     resultDialog = NULL;
 }
 
+/**
+  * Default destructor for AccRealTimeDialog class.
+  * Deletes all dynamic objects and sets them to NULL.
+  */
 AccRealTimeDialog::~AccRealTimeDialog()
 {
     delete ui;
@@ -44,6 +52,9 @@ AccRealTimeDialog::~AccRealTimeDialog()
         delete resultDialog;
 }
 
+/**
+  *
+  */
 void AccRealTimeDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
@@ -55,8 +66,9 @@ void AccRealTimeDialog::changeEvent(QEvent *e)
         break;
     }
 }
+
 /**
-  *This function is called to read (and process) data from the accelerometer
+  * This function is called to read (and process) data from the accelerometer
   */
 void AccRealTimeDialog::readAccelerometerData()
 {
@@ -66,15 +78,13 @@ void AccRealTimeDialog::readAccelerometerData()
 
     accelerometer->getAcceleration(x, y, z);
 
-    //  keep the following line as close to the SetKinematicsProperties method as possible
+    // keep the following line as close to the SetKinematicsProperties method as possible
     currentTime = elapsedTime.elapsed();
 
-    //accelerometer->smoothData(x, y, z);
-
-    //Calculate average for Z
+    // Calculate average for Z
     movingAverageZ->Enqueue(z);
     z = movingAverageZ->Average();
-    //Calculate average for Y
+    // Calculate average for Y
     movingAverageY->Enqueue(y);
     y = movingAverageY->Average();
 
@@ -91,7 +101,7 @@ void AccRealTimeDialog::readAccelerometerData()
     if(calZ < 0)
         calZ = -calZ;
 
-    //Take acceleration from more affecting axel
+    // Take acceleration from more affecting axel
     if(calZ < calY)
     {
         z = z*(1+calZ/2);
@@ -106,9 +116,9 @@ void AccRealTimeDialog::readAccelerometerData()
     //screen up: y = 0, z = -1
     //screen front: y = -1, z = 0
 
-//    QString str = QString("acc x: " + QString::number(x) + "\n" +
-//                          "acc y: " + QString::number(y) + "\n" +
-//                          "acc z: " + QString::number(z) + "\n");
+    //QString str = QString("acc x: " + QString::number(x) + "\n" +
+    //                      "acc y: " + QString::number(y) + "\n" +
+    //                      "acc z: " + QString::number(z) + "\n");
 
     //currentAcceleration = z;//sqrt(x*x + y*y + z*z);
     //qDebug("y: %f, calibZ: %f, calibY: %f\n",y,accelerometer->getCalibrationZ(),accelerometer->getCalibrationY());
@@ -210,11 +220,17 @@ void AccRealTimeDialog::resetAccelerometerMeasurements()
     stopMeasureSpeed = 0;
 }
 
+/**
+  *
+  */
 void AccRealTimeDialog::Calibrate()
 {
     accelerometer->calibrate();
 }
 
+/**
+  * This slot function called when ever abort button clicked.
+  */
 void AccRealTimeDialog::on_buttonAbort_clicked()
 {
     accelerometerTimer->stop();
@@ -222,6 +238,9 @@ void AccRealTimeDialog::on_buttonAbort_clicked()
     this->close();
 }
 
+/**
+  *
+  */
 void AccRealTimeDialog::startAccelerationMeasure()
 {
     double temp = stopMeasureSpeed;
@@ -230,6 +249,10 @@ void AccRealTimeDialog::startAccelerationMeasure()
     accelerometerTimer->start(40);
 }
 
+/**
+  *
+  * @param double speed
+  */
 void AccRealTimeDialog::SetStopMeasureSpeed(double speed)
 {
     stopMeasureSpeed = speed;
@@ -238,7 +261,8 @@ void AccRealTimeDialog::SetStopMeasureSpeed(double speed)
 /**
   *This slot function emit accelerationstart sendresult.
   *
-  **/
+  * @param double result
+  */
 void AccRealTimeDialog::sendResult(double result)
 {
     emit sendresult(result);
index 415655c..6201f8f 100644 (file)
@@ -1,15 +1,15 @@
 /*
  * Calculate class to process accelerometer data
  *
- * @author      Kai Rasilainen
+ * @author      Kai Rasilainen <kai.rasilainen@fudeco.com>
  * @author      Jukka Kurttila <jukka.kurttila@fudeco.com>
+ * @author      Toni Jussila   <toni.jussila@fudeco.com>
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
 
 #include "calculate.h"
 #include <math.h>
-
 #include <QFile>
 #include <QString>
 #include <QTimer>
@@ -19,21 +19,30 @@ const double G_ACCELERATION = 9.80665;
 const double SECONDS_IN_HOUR = 3600;
 const double AIR_DENSITY = 1.225;
 const double WATTS_PER_HORSEPOWER = 745.69987158227025;
-
 const double carFrontalArea = 1.5;
 const double dragCoefficient = 0.31;
 const int carWeight = 850;
 
+/**
+  * Default constructor for Calculate class.
+  */
 Calculate::Calculate()
 {
     this->reset();
 }
 
+/**
+  * Default destructor for Calculate class.
+  * Deletes all dynamic objects and sets them to NULL.
+  */
 Calculate::~Calculate()
 {
 
 }
 
+/**
+  * This function reset all variables.
+  */
 void Calculate::reset()
 {
     averageSpeed = 0;
@@ -63,21 +72,19 @@ void Calculate::reset()
         speedCheckPoints.append(90);
         speedCheckPoints.append(100);
     }
-
     checkPointCounter = 0;
     checkPoint = speedCheckPoints[checkPointCounter];
     valuesMap.clear();
-
 }
 
-
 /**
   * This is a main function for calculating various parameters. Accelerometer
   * provides currentAcceleration and calling function measures time (seconds).
   * This function should be called 20-30 times/second to minimize
   * calculation error.
-
-  * To be added: ---
+  *
+  * @param double current acceleration
+  * @param double seconds
   */
 void Calculate::calculateParameters(double currentAcceleration, double seconds)
 {
@@ -159,6 +166,8 @@ void Calculate::calculateParameters(double currentAcceleration, double seconds)
   * This function checks if acceleration has stopped for
   * a short period of time. Velocity is set to zero to avoid
   * distance errors.
+  *
+  * @param double current acceleration
   */
 void Calculate::accelStoppedCheck(double currentAcceleration)
 {
@@ -176,108 +185,211 @@ void Calculate::accelStoppedCheck(double currentAcceleration)
     }
 }
 
-// Getters and setters
-
+/**
+  * Get average speed.
+  *
+  * @return double average speed
+  */
 double Calculate::getAverageSpeed()
 {
     return averageSpeed;
 }
 
+/**
+  * Set average speed.
+  *
+  * @param double average speed
+  */
 void Calculate::setAverageSpeed(double value)
 {
     averageSpeed = value;
 }
 
+/**
+  * Get current speed.
+  *
+  * @return double current speed
+  */
 double Calculate::getCurrentSpeed()
 {
     return currentSpeed;
 }
 
+/**
+  * Set current speed.
+  *
+  * @param double current speed
+  */
 void Calculate::setCurrentSpeed(double value)
 {
     currentSpeed = value;
 }
 
+/**
+  * Get travelled distance.
+  *
+  * @return double travelled distance
+  */
 double Calculate::getDistanceTraveled()
 {
     return distanceTraveled;
 }
 
+/**
+  * Set travelled distance.
+  *
+  * @param double travelled distance
+  */
 void Calculate::setDistanceTraveled(double value)
 {
     distanceTraveled = value;
 }
 
+/**
+  * Get last acceleration.
+  *
+  * @return double last acceleration
+  */
 double Calculate::getLastAcceleration()
 {
     return lastAcceleration;
 }
 
+/**
+  * Set last acceleration.
+  *
+  * @param double last acceleration
+  */
 void Calculate::setLastAcceleration(double value)
 {
     lastAcceleration = value;
 }
 
+/**
+  * Get last distance.
+  *
+  * @return double last distance
+  */
 double Calculate::getLastDistance()
 {
     return lastDistance;
 }
 
+/**
+  * Set last distance.
+  *
+  * @param double last distance
+  */
 void Calculate::setLastDistance(double value)
 {
     lastDistance = value;
 }
 
+/**
+  * Get last speed.
+  *
+  * @return double last speed
+  */
 double Calculate::getLastSpeed()
 {
     return lastSpeed;
 }
 
+/**
+  * Set last speed.
+  *
+  * @param double last speed
+  */
 void Calculate::setLastSpeed(double value)
 {
     lastSpeed = value;
 }
 
+/**
+  * Get number of iterations.
+  *
+  * @return long number of iterations
+  */
 long Calculate::getNumOfIterations()
 {
     return numOfIterations;
 }
 
+/**
+  * Set number of iterations.
+  *
+  * @param long number of iterations
+  */
 void Calculate::setNumOfIterations(long value)
 {
     numOfIterations = value;
 }
 
+/**
+  * Get total time.
+  *
+  * @return double total time
+  */
 double Calculate::getTotalTime()
 {
     return totalTime;
 }
 
+/**
+  * Set total time.
+  *
+  * @param double total time
+  */
 void Calculate::setTotalTime(double value)
 {
     totalTime = value;
 }
 
+/**
+  * Get current power.
+  *
+  * @return double current power
+  */
 double Calculate::getCurrentPower()
 {
     return currentPower;
 }
 
+/**
+  * Set current power.
+  *
+  * @param double current power
+  */
 void Calculate::setCurrentPower(double value)
 {
     currentPower = value;
 }
 
+/**
+  * Get peek power.
+  *
+  * @return double peek power
+  */
 double Calculate::getPeakPower()
 {
     return peakPower;
 }
 
+/**
+  * Set peek power.
+  *
+  * @param double peek power
+  */
 void Calculate::setPeakPower(double value)
 {
     peakPower = value;
 }
 
+/**
+  * Get average power.
+  *
+  * @return double average power
+  */
 double Calculate::getAveragePower()
 {
     if (numOfIterations > 0)
@@ -290,21 +402,41 @@ double Calculate::getAveragePower()
     }
 }
 
+/**
+  * Set average power.
+  *
+  * @param double average power
+  */
 void Calculate::setAveragePower(double value)
 {
     averagePower = value;
 }
 
+/**
+  * Get max speed.
+  *
+  * @return double max speed
+  */
 double Calculate::getMaxSpeed()
 {
     return maxSpeed;
 }
 
+/**
+  * Set max speed.
+  *
+  * @param double max speed
+  */
 void Calculate::setMaxSpeed(double value)
 {
     maxSpeed = value;
 }
 
+/**
+  * Get values map.
+  *
+  * @return QMap<int,double> values map.
+  */
 QMap<int,double> Calculate::getValuesMap()
 {
     return valuesMap;
index 146e85c..39c93ab 100644 (file)
@@ -1,14 +1,19 @@
 /*
  * Calibrate dialog
  *
- * @author     Kai Rasilainen <kai.rasilainen@fudeco.com>
- * @copyright  (c) 2010 Speed Freak team
- * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @author      Kai Rasilainen <kai.rasilainen@fudeco.com>
+ * @author      Toni Jussila   <toni.jussila@fudeco.com>
+ * @copyright   (c) 2010 Speed Freak team
+ * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
 
 #include "calibratedialog.h"
 #include "ui_calibratedialog.h"
 
+/**
+  * Default constructor for Calibrate dialog class.
+  *
+  */
 CalibrateDialog::CalibrateDialog(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::CalibrateDialog)
@@ -17,11 +22,18 @@ CalibrateDialog::CalibrateDialog(QWidget *parent) :
     this->setWindowTitle("Calibrating...");
 }
 
+/**
+  * Default destructor for Calibrate dialog class.
+  * Deletes all dynamic objects and sets them to NULL.
+  */
 CalibrateDialog::~CalibrateDialog()
 {
     delete ui;
 }
 
+/**
+  *
+  */
 void CalibrateDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
@@ -34,21 +46,39 @@ void CalibrateDialog::changeEvent(QEvent *e)
     }
 }
 
+/**
+  * Set progressbar value.
+  *
+  * @param int progressbar value.
+  */
 void CalibrateDialog::setProgressValue(int value)
 {
     ui->progressBar->setValue(value);
 }
 
+/**
+  * Reset progressbar value.
+  */
 void CalibrateDialog::resetProgressValue()
 {
     ui->progressBar->reset();
 }
 
+/**
+  * Set max value.
+  *
+  * @param int max
+  */
 void CalibrateDialog::setMaxValue(int max)
 {
     ui->progressBar->setMaximum( max );
 }
 
+/**
+  * Set title.
+  *
+  * @param QString title
+  */
 void CalibrateDialog::setTitle(QString title)
 {
     this->setWindowTitle(title);
index 1f05ffb..aad2aa2 100644 (file)
@@ -11,7 +11,7 @@
 #include "categorylist.h"
 
 /**
-  *Constructor of this class.
+  * Constructor of this class.
   */
 CategoryList::CategoryList()
 {
@@ -19,7 +19,7 @@ CategoryList::CategoryList()
 }
 
 /**
-  *Destructor of this class. Should be used to release all allocated resources.
+  * Destructor of this class. Should be used to release all allocated resources.
   */
 CategoryList::~CategoryList()
 {
@@ -27,8 +27,9 @@ CategoryList::~CategoryList()
 }
 
 /**
-  *This is return function.
-  *@return QStringList categoryList
+  * This is return function.
+  *
+  * @return QStringList categoryList
   */
 QStringList CategoryList::getCategoryList()
 {
@@ -47,8 +48,9 @@ QStringList CategoryList::getCategoryList()
 }
 
 /**
-  *Append an item in the end of the categorylist.
-  *@param Item.
+  * Append an item in the end of the categorylist.
+  *
+  * @param Item.
   */
 void CategoryList::appendCategoryList(QString item)
 {
@@ -57,9 +59,10 @@ void CategoryList::appendCategoryList(QString item)
 }
 
 /**
-  *Input an item into the categorylist.
-  *@param Index.
-  *@param Item to be appended.
+  * Input an item into the categorylist.
+  *
+  * @param Index.
+  * @param Item to be appended.
   */
 void CategoryList::fillCategoryList(int index, QString item)
 {
@@ -68,8 +71,9 @@ void CategoryList::fillCategoryList(int index, QString item)
 }
 
 /**
-  *Show an item of the categorylist.
-  *@param Index.
+  * Show an item of the categorylist.
+  *
+  * @param int Index.
   */
 QString CategoryList::itemOfCategoryList(int index)
 {
@@ -78,7 +82,7 @@ QString CategoryList::itemOfCategoryList(int index)
 }
 
 /**
-  *Clear categorylist.
+  * Clear categorylist.
   */
 void CategoryList::clearCategoryList()
 {
@@ -87,7 +91,7 @@ void CategoryList::clearCategoryList()
 }
 
 /**
-  *Read size of categorylist.
+  * Read size of categorylist.
   */
 int CategoryList::sizeOfCategoryList()
 {
@@ -96,11 +100,12 @@ int CategoryList::sizeOfCategoryList()
 }
 
 /**
-  *Append an item in the end of the categoryelementable.
-  *@param Index.
-  *@param Description of category.
-  *@param Unit.
-  *@param Category.
+  * Append an item in the end of the categoryelementable.
+  *
+  * @param int Index.
+  * @param QString Description of category.
+  * @param QString Unit.
+  * @param QString Category.
   */
 void CategoryList::appendCats(int ind, QString des, QString uni, QString cat)
 {
@@ -111,8 +116,9 @@ void CategoryList::appendCats(int ind, QString des, QString uni, QString cat)
 }
 
 /**
-  *Search description for an index af cats table.
-  *@param Index.
+  * Search description for an index af cats table.
+  *
+  * @param int Index.
   */
 QString CategoryList::getRecentDescription(int ind)
 {
@@ -121,8 +127,9 @@ QString CategoryList::getRecentDescription(int ind)
 }
 
 /**
-  *Search category for an index af cats table.
-  *@param Index.
+  * Search category for an index af cats table.
+  *
+  * @param int Index.
   */
 QString CategoryList::getRecentCategory(int ind)
 {
@@ -131,7 +138,7 @@ QString CategoryList::getRecentCategory(int ind)
 }
 
 /**
-  *Clear cats.
+  * Clear cats.
   */
 void CategoryList::clearCats()
 {
@@ -145,10 +152,10 @@ void CategoryList::clearCats()
 }
 
 /**
-  *This function is used to get items to top list of the category that is chosen from combobox.
-  *@param QString category
-  *@param int size
-  *@todo Now there is only one (the latest top10List). Later picking up the requested category.
+  * This function is used to get items to top list of the category that is chosen from combobox.
+  *
+  * @param QString category
+  * @param int size
   */
 QString CategoryList::getTopList( QString category, int size)
 {
@@ -165,4 +172,3 @@ QString CategoryList::getTopList( QString category, int size)
         return emptyStr;
     }
 }
-
index eaba0f1..8e8d208 100644 (file)
@@ -1,17 +1,20 @@
 /*
  * Credits Dialog
  *
- * @author      Rikhard Kuutti <rikhard.kuutti@fudeco.com>
- * @copyright   (c) 2010 Speed Freak team
- * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @author     Rikhard Kuutti   <rikhard.kuutti@fudeco.com>
+ * @author     Toni Jussila     <toni.jussila@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  */
 
 #include "creditsdialog.h"
 #include "ui_creditsdialog.h"
-
 #include <QDesktopServices>
 #include <QUrl>
 
+/**
+  * Constructor of this class.
+  */
 CreditsDialog::CreditsDialog(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::CreditsDialog)
@@ -20,11 +23,17 @@ CreditsDialog::CreditsDialog(QWidget *parent) :
     this->setWindowTitle("Credits");
 }
 
+/**
+  * Destructor of this class. Should be used to release all allocated resources.
+  */
 CreditsDialog::~CreditsDialog()
 {
     delete ui;
 }
 
+/**
+  *
+  */
 void CreditsDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
index 3907267..6045bbc 100644 (file)
@@ -1,26 +1,26 @@
 /*
  * Custom button class for customized button.
  *
- * @author      Jukka Kurttila <jktla@suomi24.fi>
- * @copyright   (c) 2010 Speed Freak team
- * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @author     Jukka Kurttila   <jktla@suomi24.fi>
+ * @author     Toni Jussila     <toni.jussila@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  */
 
 #include "custombutton.h"
-
 #include <QPainter>
 #include <QIcon>
 
 /**
-  *Constructor of this class.
+  * Constructor of this class.
   */
 CustomButton::CustomButton(QWidget *parent, QIcon *icon) : QWidget(parent)
 {
     bPressed = false;
-    //Get size of the icon
+    // Get size of the icon
     QList<QSize> list = icon->availableSizes(QIcon::Normal,QIcon::On);
 
-    //If icon is empty, do not create pixmaps and leave
+    // If icon is empty, do not create pixmaps and leave
     if(list.isEmpty())
         return;
     QSize size = list.first();
@@ -30,8 +30,9 @@ CustomButton::CustomButton(QWidget *parent, QIcon *icon) : QWidget(parent)
         pict2 = new QPixmap(icon->pixmap(size.width(),size.height(),QIcon::Normal,QIcon::Off));
     }
 }
+
 /**
-  *Destructor of this class.
+  * Destructor of this class.
   */
 CustomButton::~CustomButton()
 {
@@ -41,6 +42,9 @@ CustomButton::~CustomButton()
         delete pict2;
 }
 
+/**
+  *
+  */
 void CustomButton::paintEvent(QPaintEvent *)
 {
     QPainter painter(this);
@@ -50,30 +54,48 @@ void CustomButton::paintEvent(QPaintEvent *)
     else
         painter.drawPixmap(0,0,*pict1);
 
-    //Debug print
-    //painter.drawText(50,50,"y: "+QString::number(mY));
+    // Debug print
+    // painter.drawText(50,50,"y: "+QString::number(mY));
 }
+
+/**
+  * Mouse press event.
+  *
+  * @param QMouseEvent me
+  */
 void CustomButton::mousePressEvent(QMouseEvent* me)
 {
     bPressed = true;
     repaint();
 }
+
+/**
+  * Mouse release event.
+  *
+  * @param QMouseEvent me
+  */
 void CustomButton::mouseReleaseEvent(QMouseEvent* me)
 {
     mX = me->x();
     mY = me->y();
-    //Emit open dialog signal if mouse is still over button
+    // Emit open dialog signal if mouse is still over button
     if( mY < this->height() && mY > 0 && mX < this->width() && mX > 0 )
         emit OpenDialog();
 
     bPressed = false;
     repaint();
 }
+
+/**
+  * Mouse move event.
+  *
+  * @param QMouseEvent me
+  */
 void CustomButton::mouseMoveEvent(QMouseEvent* me)
 {
     mX = me->x();
     mY = me->y();
-    //Is mouse moved outside button?
+    // Is mouse moved outside button?
     if( mY > this->height() || mY < 0 || mX > this->width() || mX < 0 )
         bPressed = false;
     else
index ebb3a08..343d9e5 100644 (file)
@@ -1,29 +1,44 @@
 /*
  * File reader class for reading acceleration data from file.
  *
- * @author      Jukka Kurttila <jktla@suomi24.fi>
+ * @author      Jukka Kurttila  <jktla@suomi24.fi>
+ * @author      Toni Jussila    <toni.jussila@fudeco.com>
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
 #include "filereader.h"
 #include <QFileDialog>
 
+/**
+  * Constructor of this class.
+  */
 filereader::filereader()
 {
 }
+
+/**
+  * Destructor of this class. Should be used to release all allocated resources.
+  */
 filereader::~filereader()
 {
     if(!fileName.isEmpty())
         file.close();
 }
 
+/**
+  * Read line.
+  *
+  * @param qreal &x
+  * @param qreal &y
+  * @param qreal &z
+  */
 void filereader::ReadLine( qreal &x, qreal &y, qreal &z )
 {
     if(fileName.isEmpty())
         return;
     QString line = file.readLine();
 
-    //Get x
+    // Get x
 
     std::string line2(line.toUtf8());
 
@@ -35,7 +50,7 @@ void filereader::ReadLine( qreal &x, qreal &y, qreal &z )
     QString temp2( temp.c_str() );
     x = temp2.toFloat();
 
-    //Get y
+    // Get y
 
     line2.erase(0,line2.find_first_of("y"));
     line2.erase(0,3);
@@ -45,12 +60,12 @@ void filereader::ReadLine( qreal &x, qreal &y, qreal &z )
     temp2 = temp.c_str();
     y = temp2.toFloat();
 
-    //Get z
+    // Get z
 
     line2.erase(0,line2.find_first_of("z"));
     line2.erase(0,3);
 
-    //Is there space character?
+    // Is there space character?
     if(line2.find_first_of(" ") != std::string::npos)
     {
         temp = line2.substr(0,line2.find_first_of(" "));
@@ -65,6 +80,12 @@ void filereader::ReadLine( qreal &x, qreal &y, qreal &z )
     temp2 = temp.c_str();
     z = temp2.toFloat();
 }
+
+/**
+  * Set file name.
+  *
+  * QString input file name
+  */
 void filereader::setFileName(QString inputFileName)
 {
     fileName = inputFileName;
index 250728a..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()
 {
@@ -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()
 {
@@ -242,7 +237,10 @@ 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)
 {
@@ -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()
 {
index 940e022..09d9edf 100644 (file)
@@ -1,6 +1,17 @@
+/*
+ * Help acceleration dialog.
+ *
+ * @author     Toni Jussila <toni.jussila@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
 #include "helpaccelerationdialog.h"
 #include "ui_helpaccelerationdialog.h"
 
+/**
+  * Default constructor of this class.
+  */
 HelpAccelerationDialog::HelpAccelerationDialog(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::HelpAccelerationDialog)
@@ -19,11 +30,17 @@ HelpAccelerationDialog::HelpAccelerationDialog(QWidget *parent) :
     ui->labelInfo4->hide();
 }
 
+/**
+  * Default destructor of this class.
+  */
 HelpAccelerationDialog::~HelpAccelerationDialog()
 {
     delete ui;
 }
 
+/**
+  *
+  */
 void HelpAccelerationDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
@@ -36,6 +53,9 @@ void HelpAccelerationDialog::changeEvent(QEvent *e)
     }
 }
 
+/**
+  * This slot function called when ever next button clicked.
+  */
 void HelpAccelerationDialog::on_pushButtonNext_clicked()
 {
     pageCounter ++;
@@ -83,6 +103,9 @@ void HelpAccelerationDialog::on_pushButtonNext_clicked()
     }
 }
 
+/**
+  * This slot function called when ever last button clicked.
+  */
 void HelpAccelerationDialog::on_pushButtonLast_clicked()
 {
     pageCounter --;
index cfb1b5a..e5e3dea 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Help dialog
  *
- * @author     Janne Ã„näkkälä <janne.anakkala@fudeco.com>
+ * @author     Janne Ã„näkkälä   <janne.anakkala@fudeco.com>
  * @author     Toni Jussila    <toni.jussila@fudeco.com>
  * @copyright  (c) 2010 Speed Freak team
  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
@@ -12,7 +12,7 @@
 #include <QDebug>
 
 /**
-  * Constructor
+  * Default constructor of this class.
   */
 HelpDialog::HelpDialog(QWidget *parent) :
     QDialog(parent),
@@ -27,7 +27,7 @@ HelpDialog::HelpDialog(QWidget *parent) :
 }
 
 /**
-  * Destructor
+  * Default destructor of this class.
   */
 HelpDialog::~HelpDialog()
 {
@@ -50,7 +50,7 @@ void HelpDialog::changeEvent(QEvent *e)
 }
 
 /**
-  *
+  * This slot function called when ever help results button clicked.
   */
 void HelpDialog::on_pushButtonHelpResults_clicked()
 {
@@ -63,7 +63,7 @@ void HelpDialog::on_pushButtonHelpResults_clicked()
 }
 
 /**
-  *
+  * This slot function called when ever help accelerate button clicked.
   */
 void HelpDialog::on_pushButtonHelpAccelerate_clicked()
 {
@@ -76,7 +76,7 @@ void HelpDialog::on_pushButtonHelpAccelerate_clicked()
 }
 
 /**
-  *
+  * This slot function called when ever help route button clicked.
   */
 void HelpDialog::on_pushButtonHelpRoute_clicked()
 {
@@ -89,7 +89,7 @@ void HelpDialog::on_pushButtonHelpRoute_clicked()
 }
 
 /**
-  *
+  * This slot function called when ever credits button clicked.
   */
 void HelpDialog::on_pushButtonCredits_clicked()
 {
@@ -102,7 +102,7 @@ void HelpDialog::on_pushButtonCredits_clicked()
 }
 
 /**
-  *
+  * This slot function called when ever help settings button clicked.
   */
 void HelpDialog::on_pushButtonHelpSettings_clicked()
 {
index ed68882..de88a27 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Help dialog
  *
- * @author     Janne Ã„näkkälä <janne.anakkala@fudeco.com>
+ * @author     Janne Ã„näkkälä   <janne.anakkala@fudeco.com>
  * @author     Toni Jussila    <toni.jussila@fudeco.com>
  * @copyright  (c) 2010 Speed Freak team
  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
@@ -14,8 +14,8 @@
 #include <helpresultsdialog.h>
 #include <helpaccelerationdialog.h>
 #include <helproutingdialog.h>
-#include "creditsdialog.h"
 #include <helpsettingsdialog.h>
+#include "creditsdialog.h"
 
 namespace Ui {
     class HelpDialog;
index 415bcd1..32bf166 100644 (file)
@@ -1,6 +1,18 @@
+/*
+ * Help result dialog
+ *
+ * @author     Janne Ã„näkkälä   <janne.anakkala@fudeco.com>
+ * @author     Toni Jussila    <toni.jussila@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
 #include "helpresultsdialog.h"
 #include "ui_helpresultsdialog.h"
 
+/**
+  * Default constructor of this class.
+  */
 HelpResultsDialog::HelpResultsDialog(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::HelpResultsDialog)
@@ -8,11 +20,17 @@ HelpResultsDialog::HelpResultsDialog(QWidget *parent) :
     ui->setupUi(this);
 }
 
+/**
+  * Default destructor of this class.
+  */
 HelpResultsDialog::~HelpResultsDialog()
 {
     delete ui;
 }
 
+/**
+  *
+  */
 void HelpResultsDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
index b1ead53..d0a0262 100644 (file)
@@ -1,6 +1,18 @@
+/*
+ * Help routing dialog
+ *
+ * @author     Janne Ã„näkkälä   <janne.anakkala@fudeco.com>
+ * @author     Toni Jussila    <toni.jussila@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
 #include "helproutingdialog.h"
 #include "ui_helproutingdialog.h"
 
+/**
+  * Default constructor of this class.
+  */
 HelpRoutingDialog::HelpRoutingDialog(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::HelpRoutingDialog)
@@ -18,11 +30,17 @@ HelpRoutingDialog::HelpRoutingDialog(QWidget *parent) :
     ui->labelSavePic->hide();
 }
 
+/**
+  * Default destructor of this class.
+  */
 HelpRoutingDialog::~HelpRoutingDialog()
 {
     delete ui;
 }
 
+/**
+  *
+  */
 void HelpRoutingDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
@@ -35,6 +53,9 @@ void HelpRoutingDialog::changeEvent(QEvent *e)
     }
 }
 
+/**
+  * This slot function called when ever next button clicked.
+  */
 void HelpRoutingDialog::on_pushButtonNext_clicked()
 {
     pageCounter ++;
@@ -71,6 +92,9 @@ void HelpRoutingDialog::on_pushButtonNext_clicked()
     }
 }
 
+/**
+  * This slot function called when ever last button clicked.
+  */
 void HelpRoutingDialog::on_pushButtonLast_clicked()
 {
     pageCounter --;
index 65b18f3..5cdbc9a 100644 (file)
@@ -1,6 +1,18 @@
+/*
+ * Help settings dialog
+ *
+ * @author     Janne Ã„näkkälä   <janne.anakkala@fudeco.com>
+ * @author     Toni Jussila    <toni.jussila@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
 #include "helpsettingsdialog.h"
 #include "ui_helpsettingsdialog.h"
 
+/**
+  * Default constructor of this class.
+  */
 HelpSettingsDialog::HelpSettingsDialog(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::HelpSettingsDialog)
@@ -13,11 +25,17 @@ HelpSettingsDialog::HelpSettingsDialog(QWidget *parent) :
     ui->pushButtonLast->hide();
 }
 
+/**
+  * Default destructor of this class.
+  */
 HelpSettingsDialog::~HelpSettingsDialog()
 {
     delete ui;
 }
 
+/**
+  *
+  */
 void HelpSettingsDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
@@ -30,6 +48,9 @@ void HelpSettingsDialog::changeEvent(QEvent *e)
     }
 }
 
+/**
+  * This slot function called when ever next button clicked.
+  */
 void HelpSettingsDialog::on_pushButtonNext_clicked()
 {
     pageCounter ++;
@@ -46,6 +67,9 @@ void HelpSettingsDialog::on_pushButtonNext_clicked()
     }
 }
 
+/**
+  * This slot function called when ever last button clicked.
+  */
 void HelpSettingsDialog::on_pushButtonLast_clicked()
 {
     pageCounter --;
index 6e43dfd..d1b6f2b 100644 (file)
@@ -2,8 +2,8 @@
  * Http client Connects application to server.
  *
  * @author      Tiina Kivilinna-Korhola <tiina.kivilinna-korhola@fudeco.com>
- * @author      Olavi Pulkkinen <olavi.pulkkinen@fudeco.com>
- * @author      Toni Jussila   <toni.jussila@fudeco.com>
+ * @author      Olavi Pulkkinen         <olavi.pulkkinen@fudeco.com>
+ * @author      Toni Jussila            <toni.jussila@fudeco.com>
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
@@ -15,8 +15,9 @@
 #include "mainwindow.h"
 
 /**
-  *@brief Constructor, connects object to GUI
-  *@param Pointer to carmainwindow, which is temporarily used during development
+  * Constructor, connects object to GUI
+  *
+  * @param Pointer to carmainwindow, which is temporarily used during development
   */
 HttpClient::HttpClient(MainWindow *myCarw)
 {
@@ -29,7 +30,7 @@ HttpClient::HttpClient(MainWindow *myCarw)
 }
 
 /**
-  *@brief Destructor
+  * Destructor
   */
 HttpClient::~HttpClient()
 {
@@ -42,8 +43,8 @@ HttpClient::~HttpClient()
 }
 
 /**
-  *@brief Sends registration information to the server in xml format.
-  *Reads user name, password and emaol address from resuldialogs internal variables.
+  * Sends registration information to the server in xml format.
+  * Reads user name, password and emaol address from resuldialogs internal variables.
   */
 void HttpClient::requestRegistration()
 {
@@ -83,7 +84,28 @@ void HttpClient::requestRegistration()
 
     qDebug() << "carmainwindow: regbuffer->data(): " << regbuffer->data();
 
-    currentDownload = netManager->post(request, ("xml=" + regbuffer->data()));
+    // Registration with picture. Send picture to server
+    if(myMainw->settingsDialog->registerDialog->getPicture() != "" )//&& error == false)
+    {
+        qDebug() << "__Registration with picture";
+        QFile pictureFile( myMainw->settingsDialog->registerDialog->getPicture() );
+        if (!pictureFile.open(QIODevice::ReadOnly))
+        {
+            qDebug() << "__picture read fail";
+            return;
+        }
+        //currentDownload = netManager->post(request, pictureFile.readAll());
+        currentDownload = netManager->post(request, ("xml=" + regbuffer->data(), "avatar=" + pictureFile.readAll()));
+        //connect(currentDownload, SIGNAL(finished()), this, SLOT(ackOfSendingPicture()));
+        pictureFile.close();
+    }
+    // Registration Without picture
+    else
+    {
+        qDebug() << "____Registration without picture";
+        currentDownload = netManager->post(request, ("xml=" + regbuffer->data()));
+    }
+
     connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfRegistration()));
     //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError)));
 
@@ -95,8 +117,8 @@ void HttpClient::requestRegistration()
 }
 
 /**
-  *@brief Sends result(s) to the server in xml format.
-  *Send authentication information in the header.
+  * Sends result(s) to the server in xml format.
+  * Send authentication information in the header.
   */
 void HttpClient::sendResultXml(QString category, double result)
 {
@@ -131,11 +153,11 @@ void HttpClient::sendResultXml(QString category, double result)
 }
 
 /**
-  * @brief Sends route to the server in xml format.
+  * Sends route to the server in xml format.
   * Send authentication information in the header.
+  *
   * @param QString filename
   * @param int 1(send to server) or 0(no send)
-  * @todo Check destination URL.
   */
 void HttpClient::sendRouteXml(QString oldName, QString newName, int i)
 {
@@ -185,10 +207,11 @@ void HttpClient::sendRouteXml(QString oldName, QString newName, int i)
 }
 
 /**
-  *@brief Request the Top10List of certain category from the server.
-  *Send authentication information in the header.
-  *@param Category of results.
-  *@param Limit, the number of results.
+  * Request the Top10List of certain category from the server.
+  * Send authentication information in the header.
+  *
+  * @param Category of results.
+  * @param Limit, the number of results.
   */
 void HttpClient::requestTopList(QString category, QString limit)
 {
@@ -215,8 +238,8 @@ void HttpClient::requestTopList(QString category, QString limit)
 }
 
 /**
-  *@brief Request categories list from the server.
-  *Send authentication information in the header.
+  * Request categories list from the server.
+  * Send authentication information in the header.
   */
 void HttpClient::requestCategories()
 {
@@ -241,8 +264,8 @@ void HttpClient::requestCategories()
 }
 
 /**
-  *@brief Check that username and password exist on the server.
-  *Send authentication information in the header.
+  * Check that username and password exist on the server.
+  * Send authentication information in the header.
   */
 void HttpClient::checkLogin()
 {
@@ -268,7 +291,7 @@ void HttpClient::checkLogin()
 }
 
 /**
-  *@brief React to servers responce after result has been sent.
+  * React to servers responce after result has been sent.
   */
 void HttpClient::ackOfResult()
 {
@@ -303,7 +326,7 @@ void HttpClient::ackOfResult()
 }
 
 /**
-  *@brief React to servers responce after route has been sent.
+  * React to servers responce after route has been sent.
   */
 void HttpClient::ackOfRoute()
 {
@@ -331,8 +354,7 @@ void HttpClient::ackOfRoute()
 }
 
 /**
-  *@brief React to servers responce after registration has been sent.
-  *@todo Implement consequencies of reply.
+  * React to servers responce after registration has been sent.
   */
 void HttpClient::ackOfRegistration()
 {
@@ -361,7 +383,7 @@ void HttpClient::ackOfRegistration()
 }
 
 /**
-  *@brief React to servers responce after request for categories has been sent.
+  * React to servers responce after request for categories has been sent.
   */
 void HttpClient::ackOfCategories()
 {
@@ -389,7 +411,7 @@ void HttpClient::ackOfCategories()
 }
 
 /**
-  *@brief React to servers responce after request of TopList in certain category has been sent.
+  * React to servers responce after request of TopList in certain category has been sent.
   */
 void HttpClient::ackOfLogin()
 {
@@ -427,7 +449,7 @@ void HttpClient::ackOfLogin()
 }
 
 /**
-  *@brief Reports errors, when server has sent error signal.
+  * Reports errors, when server has sent error signal.
   */
 void HttpClient::errorFromServer(QNetworkReply::NetworkError errorcode)
 {
@@ -446,7 +468,7 @@ void HttpClient::errorFromServer(QNetworkReply::NetworkError errorcode)
 }
 
 /**
-  *@brief React to servers responce after request of TopList in certain category has been sent.
+  * React to servers responce after request of TopList in certain category has been sent.
   */
 void HttpClient::ackOfToplist()
 {
@@ -593,9 +615,10 @@ void HttpClient::ackOfSendingPicture()
 }
 
 /**
-  *@brief Request the user information of certain user from the server.
-  *Send authentication information in the header.
-  *@param username which information we want.
+  * Request the user information of certain user from the server.
+  * Send authentication information in the header.
+  *
+  * @param QString username which information we want.
   */
 void HttpClient::requestUserInfo(QString username)
 {
@@ -618,7 +641,7 @@ void HttpClient::requestUserInfo(QString username)
 }
 
 /**
-  *@brief React to servers responce after request the user information of certain user.
+  * React to servers responce after request the user information of certain user.
   */
 void HttpClient::ackOfUserInfo()
 {
@@ -660,8 +683,8 @@ void HttpClient::ackOfUserInfo()
 }
 
 /**
-  *@brief Request the users list of all users from the server.
-  *Send authentication information in the header.
+  * Request the users list of all users from the server.
+  * Send authentication information in the header.
   */
 void HttpClient::requestUsers()
 {  
@@ -690,29 +713,11 @@ void HttpClient::requestUsers()
 }
 
 /**
-  *@brief React to servers responce after request the users list of all users.
+  * React to servers responce after request the users list of all users.
   */
 void HttpClient::ackOfUsers()
 {
     qDebug() << "ackUsers";
-   /* QString fileName = "jtn.xml";
-    QFile file(fileName);
-    //file.setFileName( "routetemp.xml");
-    if (!file.open(QFile::ReadOnly))
-    {
-        qDebug() << "_xmlShow fail";
-        return;
-    }
-
-    myXmlreader->xmlReadUsers(&file);
-    file.close();
-
-    for(int i = 0; i < myXmlreader->usersList->count(); i++)
-    {
-        myMainw->settingsDialog->sendUsernameToUsersDialog(myXmlreader->usersList->at(i));
-    }*/
-
-    qDebug() << "ackUsers";
 
     //if(myMainw->topResultDialog)
     //    myMainw->topResultDialog->setLabelInfoToUser("");
@@ -743,7 +748,8 @@ void HttpClient::ackOfUsers()
 
 /**
   * This slot function called when userInfo signal is emitted from xmlreader.
-   *@param usersInfo includes information from certain user.
+  *
+  * @param QStringList usersInfo includes information from certain user.
   */
 void HttpClient::sendUsersInfo(QStringList* usersInfo)
 {
index 8358b57..9585605 100644 (file)
@@ -2,6 +2,7 @@
  * Instructions dialog for speedFreak project
  *
  * @author      Rikhard Kuutti         <rikhard.kuutti@fudeco.com>
+ * @author      Toni Jussila    <toni.jussila@fudeco.com>
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
@@ -9,6 +10,9 @@
 #include "instructionsdialog.h"
 #include "ui_instructionsdialog.h"
 
+/**
+  * Default constructor of this class.
+  */
 InstructionsDialog::InstructionsDialog(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::InstructionsDialog)
@@ -17,11 +21,17 @@ InstructionsDialog::InstructionsDialog(QWidget *parent) :
     this->setWindowTitle("Help");
 }
 
+/**
+  * Default destructor of this class.
+  */
 InstructionsDialog::~InstructionsDialog()
 {
     delete ui;
 }
 
+/**
+  *
+  */
 void InstructionsDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
index 535cef3..9e953e2 100755 (executable)
@@ -12,8 +12,9 @@
 #include <QDebug>
 
 /**
-  *Default constructor of this class.
-  *@param QObject pointer to parent object. By default the value is NULL.
+  * Default constructor of this class.
+  *
+  * @param QObject pointer to parent object. By default the value is NULL.
   */
 Maemo5Location::Maemo5Location(QObject* parent):QObject(parent)
 {
@@ -31,7 +32,7 @@ Maemo5Location::Maemo5Location(QObject* parent):QObject(parent)
 }
 
 /**
-  *Destructor of this class. Should be used to release all allocated resources.
+  * Destructor of this class. Should be used to release all allocated resources.
   */
 Maemo5Location::~Maemo5Location()
 {
@@ -41,7 +42,7 @@ Maemo5Location::~Maemo5Location()
 }
 
 /**
-  *Start polling gps.
+  * Start polling gps.
   */
 void Maemo5Location::startPollingGPS()
 {
@@ -50,7 +51,7 @@ void Maemo5Location::startPollingGPS()
 }
 
 /**
-  *Stop polling gps.
+  * Stop polling gps.
   */
 void Maemo5Location::stopPollingGPS()
 {
@@ -59,7 +60,9 @@ void Maemo5Location::stopPollingGPS()
 }
 
 /**
-  *Returns number of satellites in use.
+  * Get number of satellites in use.
+  *
+  * @return int satellites in use
   */
 int Maemo5Location::getSatellitesInUse()
 {
@@ -67,7 +70,9 @@ int Maemo5Location::getSatellitesInUse()
 }
 
 /**
-  *Returns number of satellites in view.
+  * Get number of satellites in view.
+  *
+  * @return int satellites in view
   */
 int Maemo5Location::getSatellitesInView()
 {
@@ -75,7 +80,9 @@ int Maemo5Location::getSatellitesInView()
 }
 
 /**
-  *Returns average signal strength of satellites which are in use.
+  * Get average signal strength of satellites which are in use.
+  *
+  * @return int signal strength
   */
 int Maemo5Location::getSignalStrength()
 {
@@ -83,7 +90,9 @@ int Maemo5Location::getSignalStrength()
 }
 
 /**
-  *Returns gps online.
+  * Get gps online.
+  *
+  * @return bool gps online
   */
 bool Maemo5Location::getGpsOnline()
 {
@@ -91,7 +100,9 @@ bool Maemo5Location::getGpsOnline()
 }
 
 /**
-  *Returns latitude.
+  * Get latitude.
+  *
+  * @return double latitude
   */
 double Maemo5Location::getLatitude()
 {
@@ -99,7 +110,9 @@ double Maemo5Location::getLatitude()
 }
 
 /**
-  *Returns longitude.
+  * Get longitude.
+  *
+  * @return double longitude
   */
 double Maemo5Location::getLongitude()
 {
@@ -107,7 +120,9 @@ double Maemo5Location::getLongitude()
 }
 
 /**
-  *Returns timestamp of the update in seconds.
+  * Get timestamp of the update in seconds.
+  *
+  * @return double time
   */
 double Maemo5Location::getTime()
 {
@@ -115,7 +130,9 @@ double Maemo5Location::getTime()
 }
 
 /**
-  *Returns time accuracy in seconds.
+  * Get time accuracy in seconds.
+  *
+  * @return double ept
   */
 double Maemo5Location::getEpt()
 {
@@ -123,7 +140,9 @@ double Maemo5Location::getEpt()
 }
 
 /**
-  *Returns horizontal position accuracy in cm.
+  * Get horizontal position accuracy in cm.
+  *
+  * @return double eph
   */
 double Maemo5Location::getEph()
 {
@@ -131,7 +150,9 @@ double Maemo5Location::getEph()
 }
 
 /**
-  *Returns fix altitude in meters.
+  * Get fix altitude in meters.
+  *
+  * @return double altitude
   */
 double Maemo5Location::getAltitude()
 {
@@ -139,7 +160,9 @@ double Maemo5Location::getAltitude()
 }
 
 /**
-  *Returns altitude accuracy in meters.
+  * Get altitude accuracy in meters.
+  *
+  * @return double epv
   */
 double Maemo5Location::getEpv()
 {
@@ -147,7 +170,9 @@ double Maemo5Location::getEpv()
 }
 
 /**
-  *Returns direction of motion in degrees(0-359).
+  * Get direction of motion in degrees(0-359).
+  *
+  * @return double track
   */
 double Maemo5Location::getTrack()
 {
@@ -155,7 +180,9 @@ double Maemo5Location::getTrack()
 }
 
 /**
-  *Returns track accuracy in degrees.
+  * Get track accuracy in degrees.
+  *
+  * @return double epd
   */
 double Maemo5Location::getEpd()
 {
@@ -163,7 +190,9 @@ double Maemo5Location::getEpd()
 }
 
 /**
-  *Returns current speed in km/h.
+  * Get current speed in km/h.
+  *
+  * @return double speed
   */
 double Maemo5Location::getSpeed()
 {
@@ -171,7 +200,9 @@ double Maemo5Location::getSpeed()
 }
 
 /**
-  *Returns speed accuracy in km/h.
+  * Get speed accuracy in km/h.
+  *
+  * @return double eps
   */
 double Maemo5Location::getEps()
 {
@@ -179,7 +210,9 @@ double Maemo5Location::getEps()
 }
 
 /**
-  *Returns current rate of climb in m/s.
+  * Get current rate of climb in m/s.
+  *
+  * @return double climb
   */
 double Maemo5Location::getClimb()
 {
@@ -187,7 +220,9 @@ double Maemo5Location::getClimb()
 }
 
 /**
-  *Returns climb accuracy in m/s.
+  * Get climb accuracy in m/s.
+  *
+  * @return double epc
   */
 double Maemo5Location::getEpc()
 {
@@ -195,11 +230,13 @@ double Maemo5Location::getEpc()
 }
 
 /**
-  *Returns distance between two points in kilometers.
-  *@param latitude of first point
-  *@param longitude of first point
-  *@param latitude of second point
-  *@param longitude of second point
+  * Get distance between two points in kilometers.
+  *
+  * @param double latitude of first point
+  * @param double longitude of first point
+  * @param double latitude of second point
+  * @param double longitude of second point
+  * @return double distance
   */
 double Maemo5Location::distance_between_two_points(double latitude_s, double longitude_s, double latitude_f, double longitude_f)
 {
index 8935c8d..f92c335 100755 (executable)
@@ -10,8 +10,9 @@
 #include <QDebug>
 
 /**
-  *Default constructor of this class.
-  *@param Maemo5Location pointer to public interface.
+  * Default constructor of this class.
+  *
+  * @param Maemo5Location pointer to public interface.
   */
 Maemo5LocationPrivate::Maemo5LocationPrivate(Maemo5Location* location):QObject(location)
 {
@@ -37,7 +38,7 @@ Maemo5LocationPrivate::Maemo5LocationPrivate(Maemo5Location* location):QObject(l
 
 }
 /**
-  *Destructor of this class. Should be used to release all allocated resources.
+  * Destructor of this class. Should be used to release all allocated resources.
   */
 Maemo5LocationPrivate::~Maemo5LocationPrivate()
 {
@@ -47,7 +48,7 @@ Maemo5LocationPrivate::~Maemo5LocationPrivate()
 }
 
 /**
-  *This function is used to start to poll with gprs
+  * This function is used to start to poll with gprs
   */
 void Maemo5LocationPrivate::get_acwp()
 {
@@ -57,7 +58,7 @@ void Maemo5LocationPrivate::get_acwp()
 }
 
 /**
-  *This function starts to poll via gps interface
+  * This function starts to poll via gps interface
   */
 void Maemo5LocationPrivate::get_agnss()
 {
@@ -67,7 +68,7 @@ void Maemo5LocationPrivate::get_agnss()
 }
 
 /**
-  *Stop polling gps
+  * Stop polling gps
   */
 void Maemo5LocationPrivate::stop()
 {
@@ -75,7 +76,7 @@ void Maemo5LocationPrivate::stop()
 }
 
 /**
-  *Stop and restart polling
+  * Stop and restart polling
   */
 void Maemo5LocationPrivate::restart()
 {
@@ -84,10 +85,11 @@ void Maemo5LocationPrivate::restart()
 }
 
 /**
-  *This function is called when device managed to connect to the lcoation server.
-  *Function emits gps_connected signal.
-  *@param Pointer to LocationGPSDevice class
-  *@param Pointer to Maemo5LocationPrivate class
+  * This function is called when device managed to connect to the lcoation server.
+  * Function emits gps_connected signal.
+  *
+  * @param Pointer to LocationGPSDevice class
+  * @param Pointer to Maemo5LocationPrivate class
   */
 void gps_connected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps)
 {
@@ -95,11 +97,12 @@ void gps_connected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps)
 }
 
 /**
-  *This function is called when device is disconnected from the location server.
-  *Function emits gps_disconnected signal.
-  *Also this function resets all arguments of Maemo5LcoationPrivate class.
-  *@param Pointer to LocationGPSDevice class
-  *@param Pointer to Maemo5LocationPrivate class
+  * This function is called when device is disconnected from the location server.
+  * Function emits gps_disconnected signal.
+  * Also this function resets all arguments of Maemo5LcoationPrivate class.
+  *
+  * @param Pointer to LocationGPSDevice class
+  * @param Pointer to Maemo5LocationPrivate class
   */
 void gps_disconnected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps)
 {
@@ -108,9 +111,10 @@ void gps_disconnected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps
 }
 
 /**
-  *This function is called after the location_gpsd_control_stop has been called.
-  *@param Pointer to LocationGPSDControl class
-  *@param Pointer to Maemo5LocationPrivate class
+  * This function is called after the location_gpsd_control_stop has been called.
+  *
+  * @param Pointer to LocationGPSDControl class
+  * @param Pointer to Maemo5LocationPrivate class
   */
 void gpsd_stopped_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps)
 {
@@ -118,10 +122,11 @@ void gpsd_stopped_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps)
 }
 
 /**
-  *This function is called when an error has occurred.
-  *@param Pointer to LocationGPSDControl class
-  *@param error code
-  *@param Pointer to Maemo5LocationPrivate class
+  * This function is called when an error has occurred.
+  *
+  * @param Pointer to LocationGPSDControl class
+  * @param error code
+  * @param Pointer to Maemo5LocationPrivate class
   */
 void gps_error_func(LocationGPSDControl *control, gint error, Maemo5LocationPrivate *gps)
 {
@@ -151,9 +156,10 @@ void gps_error_func(LocationGPSDControl *control, gint error, Maemo5LocationPriv
 }
 
 /**
-  *This function is called after the location_gpsd_control_start has been called.
-  *@param Pointer to LocationGPSDControl class
-  *@param Pointer to Maemo5LocationPrivate class
+  * This function is called after the location_gpsd_control_start has been called.
+  *
+  * @param Pointer to LocationGPSDControl class
+  * @param Pointer to Maemo5LocationPrivate class
   */
 void gpsd_running_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps)
 {
@@ -161,9 +167,10 @@ void gpsd_running_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps)
 }
 
 /**
-  *Callback function to catch gps signals.
-  *@param Pointer to LocationGPSDControl class
-  *@param Pointer to Maemo5LocationPrivate class
+  * Callback function to catch gps signals.
+  *
+  * @param Pointer to LocationGPSDControl class
+  * @param Pointer to Maemo5LocationPrivate class
   */
 void gps_data_changed(LocationGPSDevice *device, Maemo5LocationPrivate *gps)
 {
@@ -247,7 +254,7 @@ void gps_data_changed(LocationGPSDevice *device, Maemo5LocationPrivate *gps)
 }
 
 /**
-  *Resets all arguments of Maemo5LocationPrivate class.
+  * Resets all arguments of Maemo5LocationPrivate class.
   */
 void Maemo5LocationPrivate::resetAll()
 {
@@ -269,11 +276,13 @@ void Maemo5LocationPrivate::resetAll()
 }
 
 /**
-  *Returns distance between two points in kilometers.
-  *@param latitude of first point
-  *@param longitude of first point
-  *@param latitude of second point
-  *@param longitude of second point
+  * Get distance between two points in kilometers.
+  *
+  * @param double latitude of first point
+  * @param double longitude of first point
+  * @param double latitude of second point
+  * @param double longitude of second point
+  * @return double distance
   */
 double Maemo5LocationPrivate::distance_between_two_points(double latitude_s, double longitude_s, double latitude_f, double longitude_f)
 {
index 6e7efd9..dcf5597 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Main
+ *
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
 #include <QtGui/QApplication>
 #include "mainwindow.h"
 
index 60aa94f..cf6dd8d 100644 (file)
@@ -3,21 +3,21 @@
  *
  * @author      Rikhard Kuutti         <rikhard.kuutti@fudeco.com>
  * @author      Toni Jussila   <toni.jussila@fudeco.com>
+ * @author      Janne Ã„näkkälä  <janne.anakkala@fudeco.com>
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
 
-#include "mainwindow.h"
-#include "ui_mainwindow.h"
-
 #include <QDesktopServices>
 #include <QUrl>
 #include <QSettings>
 #include <QDebug>
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
 #include "usersettings.h"
 
 /**
-  *
+  * Constructor of this class.
   */
 MainWindow::MainWindow(QWidget *parent) :
     QMainWindow(parent),
@@ -51,12 +51,12 @@ MainWindow::MainWindow(QWidget *parent) :
 
     this->setUsernameToMainPanel();
 
-    //Create icon for acceleration start button
+    // Create icon for acceleration start button
     QIcon* icon = new QIcon();
     icon->addFile(QString(":/new/prefix1/Graphics/Speedometer.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
     icon->addFile(QString(":/new/prefix1/Graphics/Speedometer2.png"), QSize(125,125), QIcon::Normal, QIcon::On);
 
-    //Acceleration start button
+    // Acceleration start button
 
     customButtonAccelerate = new CustomButton(this,icon);
     delete icon;
@@ -66,13 +66,12 @@ MainWindow::MainWindow(QWidget *parent) :
     connect(customButtonAccelerate, SIGNAL(OpenDialog()), this, SLOT(OpenAccStartDialog()));
     customButtonAccelerate->show();
 
-    //Create icon for route dialog button
+    // Create icon for route dialog button
     icon = new QIcon();
     icon->addFile(QString(":/new/prefix1/Graphics/route.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
     icon->addFile(QString(":/new/prefix1/Graphics/route_selected.png"), QSize(125,125), QIcon::Normal, QIcon::On);
 
-    //Route dialog button
-
+    // Route dialog button
     customButtonRoute = new CustomButton(this,icon);
     delete icon;
 
@@ -81,13 +80,12 @@ MainWindow::MainWindow(QWidget *parent) :
     connect(customButtonRoute, SIGNAL(OpenDialog()), this, SLOT(OpenRouteDialog()));
     customButtonRoute->show();
 
-    //Create icon for results dialog button
+    // Create icon for results dialog button
     icon = new QIcon();
     icon->addFile(QString(":/new/prefix1/Graphics/trophy_gold.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
     icon->addFile(QString(":/new/prefix1/Graphics/trophy_gold_selected.png"), QSize(125,125), QIcon::Normal, QIcon::On);
 
-    //Results dialog button
-
+    // Results dialog button
     customButtonResults = new CustomButton(this,icon);
     delete icon;
 
@@ -100,8 +98,7 @@ MainWindow::MainWindow(QWidget *parent) :
     icon->addFile(QString(":/new/prefix1/Graphics/settings.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
     icon->addFile(QString(":/new/prefix1/Graphics/settings_selected.png"), QSize(125,125), QIcon::Normal, QIcon::On);
 
-    //Settings dialog button
-
+    // Settings dialog button
     customButtonSettings = new CustomButton(this,icon);
     delete icon;
 
@@ -117,6 +114,15 @@ MainWindow::MainWindow(QWidget *parent) :
 
     //Users dialog button
     customButtonUsers = new CustomButton(this,icon);
+
+    // Create icon for www page button
+    icon = new QIcon();
+    icon->addFile(QString(":/new/prefix1/Graphics/applications_internet.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
+    icon->addFile(QString(":/new/prefix1/Graphics/applications_internet_selected.png"), QSize(125,125), QIcon::Normal, QIcon::On);
+
+    // WWW page button
+    customButtonWWW = new CustomButton(this,icon);
+
     delete icon;
 
     buttons_x += 140;
@@ -124,13 +130,12 @@ MainWindow::MainWindow(QWidget *parent) :
     connect(customButtonUsers, SIGNAL(OpenDialog()), this, SLOT(openUsersDialog()));
     customButtonUsers->show();
 
-    //Create icon for help dialog button
+    // Create icon for help dialog button
     icon = new QIcon();
     icon->addFile(QString(":/new/prefix1/Graphics/info.png"), QSize(85,85), QIcon::Normal, QIcon::Off);
     icon->addFile(QString(":/new/prefix1/Graphics/info_selected.png"), QSize(85,85), QIcon::Normal, QIcon::On);
 
-    //Help dialog button
-
+    // Help dialog button
     customButtonHelp = new CustomButton(this,icon);
     delete icon;
 
@@ -155,7 +160,7 @@ MainWindow::MainWindow(QWidget *parent) :
 }
 
 /**
-  *
+  * Destructor of this class
   */
 MainWindow::~MainWindow()
 {
@@ -215,7 +220,7 @@ void MainWindow::changeEvent(QEvent *e)
 }
 
 /**
-  *This slot function is called when ever mytTopResultDialog emits signal refreshCategoryList button clicked.
+  * This slot function is called when ever mytTopResultDialog emits signal refreshCategoryList button clicked.
   */
 void MainWindow::clientRequestCategoryList()
 {
@@ -224,7 +229,9 @@ void MainWindow::clientRequestCategoryList()
 }
 
 /**
-  *This slot function is called when ever mytTopResultDialog emits signal refreshTopList button clicked.
+  * This slot function is called when ever mytTopResultDialog emits signal refreshTopList button clicked.
+  *
+  * @param int index
   */
 void MainWindow::clientRequestTopList(int index)
 {
@@ -238,8 +245,7 @@ void MainWindow::clientRequestTopList(int index)
 }
 
 /**
-  *This function is used to set items to category combobox.
-  *@param
+  * This function is used to set items to category combobox.
   */
 void MainWindow::setCategoryCompoBox()
 {
@@ -248,8 +254,9 @@ void MainWindow::setCategoryCompoBox()
 }
 
 /**
-  *This function prcesses UI updating after a new top10List has been received.
-  *@todo Check where limitNr is taken, fixed or user input, see on_comboBoxTopCategory_currentIndexChanged.
+  * This function prcesses UI updating after a new top10List has been received.
+  *
+  * @todo Check where limitNr is taken, fixed or user input, see on_comboBoxTopCategory_currentIndexChanged.
   */
 void MainWindow::showTop10()
 {
@@ -263,9 +270,10 @@ void MainWindow::showTop10()
 }
 
 /**
-  *This function is used to set items to labelTopList. Top-tab view.
-  *@param Category
-  *@param Size, number of results.
+  * This function is used to set items to labelTopList.
+  *
+  * @param QString Category
+  * @param int Size, number of results.
   */
 void MainWindow::setListViewTopList(QString category, int size)
 {
@@ -292,7 +300,6 @@ void MainWindow::clientRegUserToServer()
   */
 void MainWindow::clientUserLogin()
 {
-    
     if(httpClient)
     {
        connect(httpClient, SIGNAL(loginOK()), this, SLOT(setUsernameToMainPanel()));
@@ -302,6 +309,7 @@ void MainWindow::clientUserLogin()
 
 /**
   * This function send route data to server.
+  *
   * @param QString oldName, old file name
   * @param QString newName, new file name
   * @param int i
@@ -314,6 +322,9 @@ void MainWindow::clientSendRoute(QString oldName, QString newName, int i)
 
 /**
   * This function send acceleration data to server.
+  *
+  * @param QString category
+  * @param double result
   */
 void MainWindow::clientSendResult(QString category, double result)
 {
@@ -369,7 +380,7 @@ void MainWindow::killDialog()
 }
 
 /**
-  *
+  * Set user name to main panel.
   */
 void MainWindow::setUsernameToMainPanel()
 {
@@ -447,7 +458,7 @@ void MainWindow::OpenHelpDialog()
 }
 
 /**
-  * This slot function save user profile data to server
+  * This slot function save user profile data to server.
   */
 void MainWindow::saveProfile()
 {
@@ -457,6 +468,8 @@ void MainWindow::saveProfile()
 
 /**
   * This slot function calls httpClients requestUserInfo for getting user's information from server.
+  *
+  * @param QString name
   */
 void MainWindow::requestGetUserInfo(QString name)
 {
@@ -479,6 +492,9 @@ void MainWindow::requestGetUsers()
     }
 }
 
+/**
+  * This slot function open users dialog.
+  */
 void MainWindow::openUsersDialog()
 {
     if(!usersDialog)
index 94f093c..ed0e5ad 100644 (file)
@@ -3,6 +3,7 @@
  *
  * @author      Rikhard Kuutti  <rikhard.kuutti@fudeco.com>
  * @author      Toni Jussila   <toni.jussila@fudeco.com>
+ * @author      Janne Ã„näkkälä  <janne.anakkala@fudeco.com>
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
index 645f34a..ea83f0e 100644 (file)
@@ -1,7 +1,8 @@
 /*
  *  Class for moving average of acceleration data.
  *
- * @author      Kai Rasilainen
+ * @author      Kai Rasilainen <kai.rasilainen@fudeco.com>
+ * @author      Toni Jussila   <toni.jussila@fudeco.com>
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
 #include "movingaverage.h"
 #include <QList>
 
+/**
+  * Constructor of this class.
+  *
+  * @param int size limit
+  */
 MovingAverage::MovingAverage(int sizeLimit)
 {
     SizeLimit = sizeLimit;
 }
 
+/**
+  * Average.
+  *
+  * @return double average
+  */
 double MovingAverage::Average()
 {
     double sum = 0;
@@ -30,6 +41,11 @@ double MovingAverage::Average()
     return sum / queue.count();
 }
 
+/**
+  * Resize.
+  *
+  * @param int size limit
+  */
 void MovingAverage::Resize(int sizeLimit)
 {
     SizeLimit = sizeLimit;
@@ -39,11 +55,14 @@ void MovingAverage::Resize(int sizeLimit)
     }
 }
 
+/**
+  * Enqueue.
+  *
+  * @param double item
+  */
 void MovingAverage::Enqueue(double item)
 {
     queue.enqueue(item);
     if (queue.count() > SizeLimit)
         queue.dequeue();
 }
-
-
index 276c209..20ab700 100644 (file)
@@ -21,6 +21,7 @@
 
 /**
   * Constructor of this class.
+  *
   * @param QWidget pointer to parent object. By default the value is NULL.
   */
 ProfileDialog::ProfileDialog(SettingsDialog *parent) : QDialog(parent), ui(new Ui::ProfileDialog)
@@ -117,7 +118,8 @@ void ProfileDialog::on_buttonImage_clicked()
 
 /**
   * This function load picture.
-  * @param QString
+  *
+  * @param QString file name
   */
 void ProfileDialog::loadPicture(QString fileName)
 {
@@ -136,6 +138,7 @@ void ProfileDialog::loadPicture(QString fileName)
 
 /**
   * This slot function called when save button clicked.
+  *
   * @todo server connection
   */
 void ProfileDialog::on_buttonSave_clicked()
@@ -152,8 +155,9 @@ void ProfileDialog::on_buttonSave_clicked()
 }
 
 /**
-  * This get function return manufacturer
-  * @return QString
+  * Get function return manufacturer.
+  *
+  * @return QString manufacturer
   */
 QString ProfileDialog::getManufacturer()
 {
@@ -161,8 +165,9 @@ QString ProfileDialog::getManufacturer()
 }
 
 /**
-  * This get function return type
-  * @return QString
+  * Get function return type.
+  *
+  * @return QString type
   */
 QString ProfileDialog::getType()
 {
@@ -170,8 +175,9 @@ QString ProfileDialog::getType()
 }
 
 /**
-  * This get function return model
-  * @return QString
+  * Get function return model.
+  *
+  * @return QString model
   */
 QString ProfileDialog::getModel()
 {
@@ -179,8 +185,9 @@ QString ProfileDialog::getModel()
 }
 
 /**
-  * This get function return description
-  * @return QString
+  * Get function return description.
+  *
+  * @return QString description
   */
 QString ProfileDialog::getDescription()
 {
@@ -188,8 +195,9 @@ QString ProfileDialog::getDescription()
 }
 
 /**
-  * This get function return description
-  * @return QString
+  * Get function return picture.
+  *
+  * @return QString picture
   */
 QString ProfileDialog::getPicture()
 {
@@ -197,8 +205,9 @@ QString ProfileDialog::getPicture()
 }
 
 /**
-  * This set function set manufacturer
-  * @param QString
+  * This function set manufacturer.
+  *
+  * @param QString manufacturer
   */
 void ProfileDialog::setManufacturer(QString m)
 {
@@ -207,8 +216,9 @@ void ProfileDialog::setManufacturer(QString m)
 }
 
 /**
-  * This set function set type
-  * @param QString
+  * This function set type.
+  *
+  * @param QString type
   */
 void ProfileDialog::setType(QString t)
 {
@@ -217,8 +227,9 @@ void ProfileDialog::setType(QString t)
 }
 
 /**
-  * This set function set model
-  * @param QString
+  * This function set model.
+  *
+  * @param QString model
   */
 void ProfileDialog::setModel(QString m)
 {
@@ -227,8 +238,9 @@ void ProfileDialog::setModel(QString m)
 }
 
 /**
-  * This set function set description
-  * @param QString
+  * This function set description.
+  *
+  * @param QString description
   */
 void ProfileDialog::setDescription(QString d)
 {
@@ -237,8 +249,9 @@ void ProfileDialog::setDescription(QString d)
 }
 
 /**
-  * This set function set description
-  * @param QString
+  * This function set description.
+  *
+  * @param QString picture
   */
 void ProfileDialog::setPicture(QString p)
 {
@@ -247,8 +260,9 @@ void ProfileDialog::setPicture(QString p)
 }
 
 /**
-  * This function set label info text to user
-  * @param QString
+  * This function set label info text to user.
+  *
+  * @param QString info text
   */
 void ProfileDialog::setLabelInfoToUser(QString infoText)
 {
index b3fcd33..0dc034e 100644 (file)
@@ -1,5 +1,11 @@
-#include "registerdialog.h"
-#include "ui_registerdialog.h"
+/*
+ * Register dialog class.
+ *
+ * @author      Toni Jussila    <toni.jussila@fudeco.com>
+ * @copyright   (c) 2010 Speed Freak team
+ * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
 #include <QMessageBox>
 #include <QDebug>
 #include <QString>
@@ -7,6 +13,8 @@
 #include <QImage>
 #include <QPixmap>
 #include <QSize>
+#include "registerdialog.h"
+#include "ui_registerdialog.h"
 #include "usersettings.h"
 #include "settingsdialog.h"
 #include "xmlreader.h"
@@ -31,9 +39,10 @@ RegisterDialog::RegisterDialog(QWidget *parent) :
     description="";
     picture="";
 
-    ui->buttonImage->setVisible(false);
-    ui->labelImage->setVisible(false);
-    // Read user profile xml
+    //ui->buttonImage->setVisible(false);
+    //ui->labelImage->setVisible(false);
+
+    // Read user profile xml from file.
     /*QString filename = "/home/user/MyDocs/speedfreak/profile/" + parent->getUserName() + "_profile.xml";
     QFile file(filename);
 
@@ -89,10 +98,10 @@ void RegisterDialog::clearRegisterLineEdits()
     this->close();
 }
 
-// Next 6 functions can be removed if Settingsdialog is implemented without
-// own copy of username, password & email
 /**
+  * Set username.
   *
+  * @param QString username
   */
 void RegisterDialog::setRegUserName(QString username)
 {
@@ -100,45 +109,58 @@ void RegisterDialog::setRegUserName(QString username)
 }
 
 /**
+  * Get username.
   *
+  * @return QString username
   */
-void RegisterDialog::setRegPassword(QString password)
+QString RegisterDialog::getRegUserName()
 {
-    this->regPassword = password;
+    return this->regUsername;
 }
 
 /**
+  * Set password.
   *
+  * @param QString password
   */
-void RegisterDialog::setRegEmail(QString email)
+void RegisterDialog::setRegPassword(QString password)
 {
-    this->regEmail = email;
+    this->regPassword = password;
 }
 
 /**
+  * Get password.
   *
+  * @return QString password
   */
-QString RegisterDialog::getRegUserName()
+QString RegisterDialog::getRegPassword()
 {
-    return this->regUsername;
+    return this->regPassword;
 }
 
 /**
+  * Set email.
   *
+  * @param QString email
   */
-QString RegisterDialog::getRegPassword()
+void RegisterDialog::setRegEmail(QString email)
 {
-    return this->regPassword;
+    this->regEmail = email;
 }
 
 /**
+  * Get email.
   *
+  * @return QString email
   */
 QString RegisterDialog::getRegEmail()
 {
     return this->regEmail;
 }
 
+/**
+  * This slot function called when ever register button clicked.
+  */
 void RegisterDialog::on_registratePushButton_clicked()
 {
     // Save labels data
@@ -147,11 +169,6 @@ void RegisterDialog::on_registratePushButton_clicked()
     setModel(ui->lineEditModel->text());
     setDescription(ui->textEditDescription->toPlainText());
 
-    // emit settingsdialog --> mainwindow --> httpclient
-    //emit saveprofile();
-
-
-
     // Send username, password and email to SpeedFreak server
     this->regUsername = ui->regUserNameLineEdit->text();
     this->regPassword = ui->regPasswordLineEdit->text();
@@ -165,13 +182,12 @@ void RegisterDialog::on_registratePushButton_clicked()
     {
         QMessageBox::about(this, "One or more of the fields is empty", "Set username (3-12 characters), password (at least 6 characters) and valid email address");
     }
-
-    //close();      //using close() hides popup-window which reports error from server
 }
 
 /**
-  * This get function return manufacturer
-  * @return QString
+  * This get function return manufacturer.
+  *
+  * @return QString manufacturer
   */
 QString RegisterDialog::getManufacturer()
 {
@@ -179,85 +195,94 @@ QString RegisterDialog::getManufacturer()
 }
 
 /**
-  * This get function return type
-  * @return QString
+  * This function set manufacturer.
+  *
+  * @param QString manufacturer
   */
-QString RegisterDialog::getType()
+void RegisterDialog::setManufacturer(QString m)
 {
-    return type;
+    manufacturer = m;
+    ui->lineEditManufacturer->setText(m);
 }
 
 /**
-  * This get function return model
-  * @return QString
+  * This get function return type.
+  *
+  * @return QString type
   */
-QString RegisterDialog::getModel()
+QString RegisterDialog::getType()
 {
-    return model;
+    return type;
 }
 
 /**
-  * This get function return description
-  * @return QString
+  * This function set type.
+  *
+  * @param QString type
   */
-QString RegisterDialog::getDescription()
+void RegisterDialog::setType(QString t)
 {
-    QString all = manufacturer + ";" + type + ";" + model + ";" + description;
-    return all;
+    type = t;
+    ui->lineEditType->setText(t);
 }
 
 /**
-  * This get function return description
-  * @return QString
+  * This get function return model.
+  *
+  * @return QString model
   */
-QString RegisterDialog::getPicture()
+QString RegisterDialog::getModel()
 {
-    return picture;
+    return model;
 }
 
 /**
-  * This set function set manufacturer
-  * @param QString
+  * This function set model.
+  *
+  * @param QString model
   */
-void RegisterDialog::setManufacturer(QString m)
+void RegisterDialog::setModel(QString m)
 {
-    manufacturer = m;
-    ui->lineEditManufacturer->setText(m);
+    model = m;
+    ui->lineEditModel->setText(m);
 }
 
 /**
-  * This set function set type
-  * @param QString
+  * This get function return description.
+  *
+  * @return QString description
   */
-void RegisterDialog::setType(QString t)
+QString RegisterDialog::getDescription()
 {
-    type = t;
-    ui->lineEditType->setText(t);
+    QString all = manufacturer + ";" + type + ";" + model + ";" + description;
+    return all;
 }
 
 /**
-  * This set function set model
+  * This function set description.
+  *
   * @param QString
   */
-void RegisterDialog::setModel(QString m)
+void RegisterDialog::setDescription(QString d)
 {
-    model = m;
-    ui->lineEditModel->setText(m);
+    description = d;
+    ui->textEditDescription->setText(d);
 }
 
 /**
-  * This set function set description
-  * @param QString
+  * This get function return picture.
+  *
+  * @return QString picture
   */
-void RegisterDialog::setDescription(QString d)
+QString RegisterDialog::getPicture()
 {
-    description = d;
-    ui->textEditDescription->setText(d);
+    return picture;
 }
 
 /**
-  * This set function set description
-  * @param QString
+  * This function set picture.
+  *
+  * @param QString picture
   */
 void RegisterDialog::setPicture(QString p)
 {
@@ -266,7 +291,8 @@ void RegisterDialog::setPicture(QString p)
 }
 
 /**
-  * This function set label info text to user
+  * This function set label info text to user.
+  *
   * @param QString
   */
 void RegisterDialog::setLabelInfoToUser(QString infoText)
@@ -276,7 +302,7 @@ void RegisterDialog::setLabelInfoToUser(QString infoText)
 }
 
 /**
-  * This slot function called when image button clicked.
+  * This slot function called when ever image button clicked.
   */
 void RegisterDialog::on_buttonImage_clicked()
 {
@@ -295,7 +321,8 @@ void RegisterDialog::on_buttonImage_clicked()
 
 /**
   * This function load picture.
-  * @param QString
+  *
+  * @param QString file name
   */
 void RegisterDialog::loadPicture(QString fileName)
 {
index 7e39209..a3c3597 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Register dialog class.
+ *
+ * @author      Toni Jussila    <toni.jussila@fudeco.com>
+ * @copyright   (c) 2010 Speed Freak team
+ * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
 #ifndef REGISTERDIALOG_H
 #define REGISTERDIALOG_H
 
index d8b592c..e78c201 100644 (file)
@@ -51,6 +51,7 @@ QPoint points[11];
 
 /**
   * Constructor of this class.
+  *
   * @param QWidget pointer to parent object. By default the value is NULL.
   */
 ResultDialog::ResultDialog(QWidget *parent) :
@@ -95,6 +96,9 @@ ResultDialog::~ResultDialog()
     delete ui;
 }
 
+/**
+  *
+  */
 void ResultDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
@@ -109,6 +113,7 @@ void ResultDialog::changeEvent(QEvent *e)
 
 /**
   * Draws speed diagram to the UI
+  *
   * @param QPaintEvent
  */
 void ResultDialog::paintEvent(QPaintEvent *)
@@ -202,6 +207,7 @@ void ResultDialog::paintEvent(QPaintEvent *)
 
 /**
   * Change the given speed and time to the point for the diagram.
+  *
   * @param aSpeed is speed which need to change, aTime is time in seconds which need to change.
   * @return point is calculated from aSpeed and aTime.
   */
@@ -284,6 +290,8 @@ void ResultDialog::setTimesIntoLabels()
 /**
   * Sets right timeAxelLength value depending the time which
   * has spent to reach target speed.
+  *
+  * @param int choice
   */
 void ResultDialog::setTimeAxelLength(int pChoice)
 {
@@ -333,6 +341,11 @@ void ResultDialog::on_pushButtonSend_clicked()
     emit sendresult(timeArray[this->getTargetChoice()]);
 }
 
+/**
+  * Get result.
+  *
+  * @return double result.
+  */
 double ResultDialog::getResult()
 {
     return timeArray[this->getTargetChoice()];
@@ -340,6 +353,7 @@ double ResultDialog::getResult()
 
 /**
   * This public function sets diagram's stem gap
+  *
   * @param pValue is the speed value which determines diagram gap's value
   */
 void ResultDialog::setEnd(int pValue)
@@ -400,6 +414,7 @@ void ResultDialog::setEnd(int pValue)
 
 /**
   * This public function stores time in timeArray
+  *
   * @param pSpeed is the speed value at the time so we know where store time
   * @param pTime is the result which needs to be store in timeArray
   */
@@ -700,8 +715,9 @@ void ResultDialog::showOrHideLabels()
 
 /**
   * Checks which target speed has been choosed
+  *
   * @return targetChoice which tells to caller integer value about the target speed
-  * e.g. 20 km/h is value 2 and 60 km/h is value 6
+  *         e.g. 20 km/h is value 2 and 60 km/h is value 6
   */
 int ResultDialog::getTargetChoice()
 {
@@ -759,7 +775,11 @@ int ResultDialog::getTargetChoice()
     }
     return targetChoice;
 }
-
+/**
+  * Set label info to user.
+  *
+  * @param QString info text
+  */
 void ResultDialog::setLabelInfoToUser(QString infoText)
 {
     this->ui->labelInfoToUser->setText(infoText);
@@ -798,4 +818,3 @@ void ResultDialog::killHelpDialog()
         helpAccelerationDialog = NULL;
     }
 }
-
index 12064bc..53efe88 100644 (file)
@@ -65,7 +65,9 @@ public:
     };
 };
 
-
+/**
+  * Viewing class.
+  */
 class Viewing
 {
     Vector atPoint, fromPoint, up, a1, a2, a3;
@@ -226,7 +228,9 @@ void RouteDialog::changeEvent(QEvent *e)
 }
 
 /**
+  * Get left.
   *
+  * @return int left
   */
 int RouteDialog::getLeft()
 {
@@ -234,7 +238,9 @@ int RouteDialog::getLeft()
 }
 
 /**
+  * Get right.
   *
+  * @return int right
   */
 int RouteDialog::getRight()
 {
@@ -242,7 +248,9 @@ int RouteDialog::getRight()
 }
 
 /**
+  * Get top.
   *
+  * @return int top
   */
 int RouteDialog::getTop()
 {
@@ -250,7 +258,9 @@ int RouteDialog::getTop()
 }
 
 /**
+  * Get bottom.
   *
+  * @return int bottom
   */
 int RouteDialog::getBottom()
 {
@@ -258,16 +268,16 @@ int RouteDialog::getBottom()
 }
 
 /**
+  * draw flag
   *
+  * @param RouteDialog*
+  * @param QPainter*
+  * @param int x
+  * @param int y
+  * @param QString startFinish
   */
 void drawFlag( RouteDialog *rD, QPainter *p, int x, int y, QString startFinish)
 {
-    /*QPolygon pg;
-
-    pg.setPoint(0,x, y-25);
-    pg.setPoint(1,x+10,y-20);
-    pg.setPoint(2,x, y-15);
-    pg.setPoint(3,x,y-20);*/
     if (y> (rD->getTop() + 25))
     {
         // Upside
@@ -318,16 +328,13 @@ void drawFlag( RouteDialog *rD, QPainter *p, int x, int y, QString startFinish)
             p->drawText(x+10, y+15, startFinish);
         }
     }
-    //p->drawPolygon();
-   // p->drawPolygon( pg,Qt::OddEvenFill);
-    //p->drawPolyline( &pg);
-    //p->drawPoints( pg);
 }
 
 /**
   * Draws route to the route dialog.
   * Type 0 is 2d viewing and type 1 is for 3d viewing
-  * @param QPaintEvent
+  *
+  * @param QPaintEvent*
  */
 /* */
 void RouteDialog::paintEvent(QPaintEvent *)
@@ -352,12 +359,6 @@ void RouteDialog::paintEvent(QPaintEvent *)
     painter.setPen(QPen((Qt::white),2));
     painter.setBrush(QBrush((Qt::yellow), Qt::SolidPattern));
 
-    // Draw route window frame
-    /*painter.drawLine(left,top,right,top);
-    painter.drawLine(right,top,right,bottom);
-    painter.drawLine(left,top,left,bottom);
-    painter.drawLine(left,bottom,right,bottom);*/
-
     maxi = vertexList.size();
 
     for (i=0; i<maxi-1; i++)
@@ -432,6 +433,7 @@ void RouteDialog::paintEvent(QPaintEvent *)
 }
 
 /**
+  * read route from file
   *
   * @param QString route file
   */
@@ -655,7 +657,6 @@ void setFromPoint( Viewing *v)
     * */
 }
 
-
 #define NOEDGE     0x00
 #define LEFTEDGE   0x01
 #define RIGHTEDGE  0x02
@@ -665,22 +666,30 @@ void setFromPoint( Viewing *v)
 /**
   * Returns a code specifying which edge in the viewing pyramid was crossed.
   * There may be more than one.
+  *
+  * @param qreal x
+  * @param qreal y
+  * @param qreal z
+  * @return int
   */
 int code( qreal x, qreal y, qreal z)
 {
     int c;
-
     c = NOEDGE;
     if (x<-z) c |= LEFTEDGE;
     if (x>z) c |= RIGHTEDGE;
     if (y<-z) c |= BOTTOMEDGE;
     if (y>z) c |= TOPEDGE;
-
     return c;
 }
 
 /**
   * Converts clipped world coordinates to screen coordinates.
+  *
+  * @param qreal xWorld
+  * @param qreal yWorld
+  * @param int *xScreen
+  * @param int *yScreen
   */
 void WORLDtoSCREEN( qreal xWorld, qreal yWorld, int *xScreen, int *yScreen)
 {
@@ -691,6 +700,17 @@ void WORLDtoSCREEN( qreal xWorld, qreal yWorld, int *xScreen, int *yScreen)
 /**
   * Clips the line segment in three-dimensional coordinates to the
   * viewing pyramid.
+  *
+  * @param qreal x1
+  * @param qreal y1
+  * @param qreal z1
+  * @param qreal x2
+  * @param qreal y2
+  * @param qreal z2
+  * @param int *xscreen1
+  * @param int *yscreen1
+  * @param int *xscreen2
+  * @param int *yscreen2
   */
 void clip3d( qreal x1, qreal y1, qreal z1, qreal x2, qreal y2, qreal z2, int *xscreen1, int *yscreen1, int *xscreen2, int *yscreen2)
 {
@@ -771,6 +791,14 @@ void clip3d( qreal x1, qreal y1, qreal z1, qreal x2, qreal y2, qreal z2, int *xs
 /**
   * Transform the segment connecting the two vectors into the viewing plane.
   * clip3d() clips the line if needed.
+  *
+  * @param Viewing *v
+  * @param Vector *v1
+  * @param Vector *v2
+  * @param int *xscreen1
+  * @param int *yscreen1
+  * @param int *xscreen2
+  * @param int *yscreen2
   */
 void transformseg( Viewing *v, Vector *v1, Vector *v2, int *xscreen1, int *yscreen1, int *xscreen2, int *yscreen2)
 
@@ -833,6 +861,8 @@ void RouteDialog::on_sendPushButton_clicked()
 
 /**
   * This function is set info text to user.
+  *
+  * @param QString info text
   */
 void RouteDialog::setLabelInfoToUser(QString infoText)
 {
index 3119b30..bd6b9fc 100644 (file)
@@ -149,6 +149,7 @@ void RouteSaveDialog::changeEvent(QEvent *e)
 
 /**
   * Draws compass to the UI
+  *
   * @param QPaintEvent
  */
 void RouteSaveDialog::paintEvent(QPaintEvent *)
@@ -435,6 +436,9 @@ void RouteSaveDialog::gpsStatus()
 
 /**
   * This slot function is called when routeDialog emit sendroute (sendPushButton).
+  *
+  * @param QString new name
+  * @param int i
   */
 void RouteSaveDialog::sendRoute(QString newName, int i)
 {
@@ -488,6 +492,7 @@ void RouteSaveDialog::killRouteDialog()
 
 /**
   * This function return speed average.
+  *
   * @return double average speed
   */
 double RouteSaveDialog::getAverageSpeed()
@@ -497,6 +502,7 @@ double RouteSaveDialog::getAverageSpeed()
 
 /**
   * This function return distance traveled in QString.
+  *
   * @return QString distance traveled
   */
 QString RouteSaveDialog::getDistanceTraveled()
@@ -505,7 +511,9 @@ QString RouteSaveDialog::getDistanceTraveled()
 }
 
 /**
-  * This function
+  * This function set progressbar
+  *
+  * @param int i
   */
 void RouteSaveDialog::setProgressbar(int i)
 {
@@ -527,7 +535,6 @@ void RouteSaveDialog::on_buttonLoadRoute_clicked()
 
 /**
   * This function open and show route.
-  * @param QString file name
   */
 void RouteSaveDialog::openRouteDialog()
 {
index 4729a01..6c5c8a8 100644 (file)
@@ -151,7 +151,9 @@ void SettingsDialog::on_setUserPushButton_clicked()
 // Next 4 functions can be removed if Settingsdialog is implemented without
 // own copy of username & password
 /**
+  * Set username.
   *
+  * @param QString username
   */
 void SettingsDialog::setUserName(QString username)
 {
@@ -159,7 +161,9 @@ void SettingsDialog::setUserName(QString username)
 }
 
 /**
+  * Set password.
   *
+  * @param QString password
   */
 void SettingsDialog::setPassword(QString password)
 {
@@ -167,7 +171,9 @@ void SettingsDialog::setPassword(QString password)
 }
 
 /**
+  * Get username.
   *
+  * @return QString username
   */
 QString SettingsDialog::getUserName()
 {
@@ -175,7 +181,9 @@ QString SettingsDialog::getUserName()
 }
 
 /**
+  * Get password.
   *
+  * @return QString password
   */
 QString SettingsDialog::getPassword()
 {
@@ -183,7 +191,9 @@ QString SettingsDialog::getPassword()
 }
 
 /**
+  * Set label info to user.
   *
+  * @param QString info text
   */
 void SettingsDialog::setLabelInfoToUser(QString infoText)
 {
@@ -191,7 +201,9 @@ void SettingsDialog::setLabelInfoToUser(QString infoText)
 }
 
 /**
+  * is username ok.
   *
+  * @param bool is OK
   */
 void SettingsDialog::usernameOk(bool isOk)
 {
@@ -248,6 +260,7 @@ void SettingsDialog::killDialog()
 
 /**
   * This slot function called when
+  * emit sendregistration singnal
   */
 void SettingsDialog::registrate()
 {
index 0c81ced..8d361d8 100644 (file)
@@ -11,6 +11,9 @@
 #include "topresultdialog.h"
 #include "ui_topresultdialog.h"
 
+/**
+  * Constructor of this class
+  */
 TopResultDialog::TopResultDialog(QWidget *parent) :
     QDialog(parent), ui(new Ui::TopResultDialog)
 {
@@ -34,12 +37,18 @@ TopResultDialog::TopResultDialog(QWidget *parent) :
     ui->labelTopList->setText("");
 }
 
+/**
+  * Destructor of this class
+  */
 TopResultDialog::~TopResultDialog()
 {
     qDebug() << "__~TopResultDialog";
     delete ui;
 }
 
+/**
+  *
+  */
 void TopResultDialog::changeEvent(QEvent *e)
 {
     QDialog::changeEvent(e);
@@ -52,7 +61,9 @@ void TopResultDialog::changeEvent(QEvent *e)
     }
 }
 
-
+/**
+  * This slot function called when ever refresh button clicked.
+  */
 void TopResultDialog::on_buttonTopRefresh_clicked()
 {
     ui->labelTopList->clear();
@@ -60,32 +71,62 @@ void TopResultDialog::on_buttonTopRefresh_clicked()
     emit refreshCategoryList();
 }
 
+/**
+  * Set categories compobox.
+  *
+  * @param QStringList list
+  */
 void TopResultDialog::setCompoBoxCategories(QStringList list)
 {
     ui->comboBoxTopCategory->addItems(list);
 }
 
+/**
+  * Show top list.
+  *
+  * @param QString str
+  */
 void TopResultDialog::showTopList(QString str)
 {
     qDebug() << "__showTopList";
     ui->labelTopList->setText(str);
 }
 
+/**
+  * Get recent category index.
+  *
+  * @return int category index
+  */
 int TopResultDialog::getRecentCategoryIndex()
 {
     return recentCategoryIndex;
 }
 
+/**
+  * Set limit nr.
+  *
+  * @param int number
+  */
 void TopResultDialog::setLimitNr(int number)
 {
     limitNr = number;
 }
 
+/**
+  * Get limit nr.
+  *
+  * @return int limit nr
+  */
 int TopResultDialog::getLimitNr()
 {
     return limitNr;
 }
 
+/**
+  * This slot function called when ever top category combobox current index changed.
+  *
+  * @param int index
+  */
 void TopResultDialog::on_comboBoxTopCategory_currentIndexChanged(int index)
 {
     ui->labelTopList->clear();
@@ -93,6 +134,11 @@ void TopResultDialog::on_comboBoxTopCategory_currentIndexChanged(int index)
     emit refreshTopList(index);
 }
 
+/**
+  * Set label info to user.
+  *
+  * @param QString info text
+  */
 void TopResultDialog::setLabelInfoToUser(QString infoText)
 {
     this->ui->labelInfoToUser->setText(infoText);