From 8f22b886fb905885c67323132e0b7857f3a07fa9 Mon Sep 17 00:00:00 2001 From: Rikhard Kuutti Date: Mon, 29 Mar 2010 11:10:39 +0300 Subject: [PATCH] A new UI removed old UI (and other) files and added new UI skeleton. --- Client/UI.pro | 74 ---- Client/UI.pro.user | 278 ------------- Client/accelerometer.cpp | 144 ------- Client/accelerometer.h | 39 -- Client/calculate.cpp | 293 ------------- Client/calculate.h | 89 ---- Client/carmainwindow.cpp | 847 -------------------------------------- Client/carmainwindow.h | 172 -------- Client/carmainwindow.ui | 698 ------------------------------- Client/categorylist.cpp | 136 ------ Client/categorylist.h | 44 -- Client/creditsdialog.cpp | 30 ++ Client/creditsdialog.h | 25 ++ Client/creditsdialog.ui | 188 +++++++++ Client/gpsdata.cpp | 272 ------------ Client/gpsdata.h | 76 ---- Client/httpclient.cpp | 362 ---------------- Client/httpclient.h | 50 --- Client/loginwindow.cpp | 77 ---- Client/loginwindow.h | 43 -- Client/loginwindow.ui | 101 ----- Client/maemo5location.cpp | 201 --------- Client/maemo5location.h | 58 --- Client/maemo5locationprivate.cpp | 277 ------------- Client/maemo5locationprivate.h | 109 ----- Client/main.cpp | 12 +- Client/mainwindow.cpp | 41 ++ Client/mainwindow.h | 30 ++ Client/mainwindow.ui | 119 ++++++ Client/measuredialog.cpp | 181 -------- Client/measuredialog.h | 48 --- Client/measuredialog.ui | 93 ----- Client/measures.cpp | 138 ------- Client/measures.h | 56 --- Client/movingaverage.cpp | 49 --- Client/movingaverage.h | 29 -- Client/readxmlfile.xml | 33 -- Client/registration.cpp | 89 ---- Client/registration.h | 48 --- Client/registration.ui | 127 ------ Client/resultdialog.cpp | 412 ------------------ Client/resultdialog.h | 53 --- Client/resultdialog.ui | 162 -------- Client/results.xml | 13 - Client/routedialog.cpp | 576 -------------------------- Client/routedialog.h | 29 -- Client/routedialog.ui | 32 -- Client/speedfreak.pro | 12 + Client/speedfreak.pro.user | 160 +++++++ Client/start.gif | Bin 101428 -> 0 bytes Client/stringlistmodel.cpp | 39 -- Client/stringlistmodel.h | 29 -- Client/welcomedialog.cpp | 50 --- Client/welcomedialog.h | 36 -- Client/welcomedialog.ui | 35 -- Client/xmlreader.cpp | 174 -------- Client/xmlreader.h | 48 --- Client/xmlwriter.cpp | 177 -------- Client/xmlwriter.h | 49 --- 59 files changed, 607 insertions(+), 7255 deletions(-) delete mode 100644 Client/UI.pro delete mode 100644 Client/UI.pro.user delete mode 100644 Client/accelerometer.cpp delete mode 100644 Client/accelerometer.h delete mode 100644 Client/calculate.cpp delete mode 100644 Client/calculate.h delete mode 100644 Client/carmainwindow.cpp delete mode 100644 Client/carmainwindow.h delete mode 100644 Client/carmainwindow.ui delete mode 100644 Client/categorylist.cpp delete mode 100644 Client/categorylist.h create mode 100644 Client/creditsdialog.cpp create mode 100644 Client/creditsdialog.h create mode 100644 Client/creditsdialog.ui delete mode 100644 Client/gpsdata.cpp delete mode 100644 Client/gpsdata.h delete mode 100644 Client/httpclient.cpp delete mode 100644 Client/httpclient.h delete mode 100644 Client/loginwindow.cpp delete mode 100644 Client/loginwindow.h delete mode 100644 Client/loginwindow.ui delete mode 100755 Client/maemo5location.cpp delete mode 100755 Client/maemo5location.h delete mode 100755 Client/maemo5locationprivate.cpp delete mode 100755 Client/maemo5locationprivate.h create mode 100644 Client/mainwindow.cpp create mode 100644 Client/mainwindow.h create mode 100644 Client/mainwindow.ui delete mode 100644 Client/measuredialog.cpp delete mode 100644 Client/measuredialog.h delete mode 100644 Client/measuredialog.ui delete mode 100644 Client/measures.cpp delete mode 100644 Client/measures.h delete mode 100644 Client/movingaverage.cpp delete mode 100644 Client/movingaverage.h delete mode 100644 Client/readxmlfile.xml delete mode 100644 Client/registration.cpp delete mode 100644 Client/registration.h delete mode 100644 Client/registration.ui delete mode 100644 Client/resultdialog.cpp delete mode 100644 Client/resultdialog.h delete mode 100644 Client/resultdialog.ui delete mode 100755 Client/results.xml delete mode 100644 Client/routedialog.cpp delete mode 100644 Client/routedialog.h delete mode 100644 Client/routedialog.ui create mode 100644 Client/speedfreak.pro create mode 100644 Client/speedfreak.pro.user delete mode 100644 Client/start.gif delete mode 100644 Client/stringlistmodel.cpp delete mode 100644 Client/stringlistmodel.h delete mode 100644 Client/welcomedialog.cpp delete mode 100644 Client/welcomedialog.h delete mode 100644 Client/welcomedialog.ui delete mode 100644 Client/xmlreader.cpp delete mode 100644 Client/xmlreader.h delete mode 100644 Client/xmlwriter.cpp delete mode 100644 Client/xmlwriter.h diff --git a/Client/UI.pro b/Client/UI.pro deleted file mode 100644 index b036ad2..0000000 --- a/Client/UI.pro +++ /dev/null @@ -1,74 +0,0 @@ -# ------------------------------------------------- -# Project created by QtCreator 2010-02-23T14:17:30 -# @author Speed Freak team -# @copyright (c) 2010 Speed Freak team -# @license http://opensource.org/licenses/gpl-license.php GNU Public License -# ------------------------------------------------- -QT += network \ - dbus \ - xml -TARGET = UI -TEMPLATE = app -SOURCES += main.cpp \ - carmainwindow.cpp \ - resultdialog.cpp \ - stringlistmodel.cpp \ - measuredialog.cpp \ - calculate.cpp \ - accelerometer.cpp \ - loginwindow.cpp \ - registration.cpp \ - measures.cpp \ - xmlwriter.cpp \ - xmlreader.cpp \ - httpclient.cpp \ - categorylist.cpp \ - welcomedialog.cpp \ - gpsdata.cpp \ - maemo5locationprivate.cpp \ - maemo5location.cpp \ - routedialog.cpp \ - movingaverage.cpp -HEADERS += carmainwindow.h \ - resultdialog.h \ - stringlistmodel.h \ - measuredialog.h \ - accelerometer.h \ - calculate.h \ - loginwindow.h \ - registration.h \ - measures.h \ - xmlwriter.h \ - xmlreader.h \ - httpclient.h \ - categorylist.h \ - welcomedialog.h \ - gpsdata.h \ - maemo5locationprivate.h \ - maemo5location.h \ - routedialog.h \ - movingaverage.h -FORMS += carmainwindow.ui \ - resultdialog.ui \ - measuredialog.ui \ - loginwindow.ui \ - registration.ui \ - welcomedialog.ui \ - routedialog.ui - -contains(QT_CONFIG, hildon):CONFIG += hildon -CONFIG += link_pkgconfig - -# Enable this to disable debugging -# DEFINES += QT_NO_DEBUG_OUTPUT -target.path += /usr/lib -devincludes.files = $$HEADERS -devincludes.path += /usr/include/$$TEMPLATE$$TARGET -INSTALLS += target \ - devincludes -PKGCONFIG += glib-2.0 \ - liblocation -exists(/usr/lib/liblocation.so) { - DEFINES += LIBLOCATION - message(liblocation found) -} diff --git a/Client/UI.pro.user b/Client/UI.pro.user deleted file mode 100644 index 0856073..0000000 --- a/Client/UI.pro.user +++ /dev/null @@ -1,278 +0,0 @@ - - - - RunConfiguration0-BaseEnvironmentBase - 2 - - - RunConfiguration0-CommandLineArguments - - - - RunConfiguration0-ProFile - UI.pro - - - RunConfiguration0-RunConfiguration.name - UI - - - RunConfiguration0-UseDyldImageSuffix - false - - - RunConfiguration0-UseTerminal - false - - - RunConfiguration0-UserEnvironmentChanges - - - - RunConfiguration0-UserSetName - false - - - RunConfiguration0-UserSetWorkingDirectory - false - - - RunConfiguration0-UserWorkingDirectory - - - - RunConfiguration0-type - Qt4ProjectManager.Qt4RunConfiguration - - - activeRunConfiguration - 0 - - - activebuildconfiguration - Debug - - - buildConfiguration-Debug - - Debug - 0 - 0 - - 2 - - - - buildConfiguration-Release - - Release - 0 - 0 - - 0 - - - - buildconfiguration-Debug-buildstep0 - - Debug - - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-51tDZ2Xnqs,guid=d9736a446700e43c64f1e7f04ba083b3 - DESKTOP_SESSION=gnome - DISPLAY=:0.0 - GDMSESSION=gnome - GDM_KEYBOARD_LAYOUT=fi classic - GDM_LANG=en_US.UTF-8 - GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_SOCKET=/tmp/keyring-GEEl2F/socket - GTK_MODULES=canberra-gtk-module - GTK_RC_FILES=/etc/gtk/gtkrc:/home/tkk/.gtkrc-1.2-gnome2 - HOME=/home/tkk - LANG=en_US.UTF-8 - LD_LIBRARY_PATH=/home/tkk/qtsdk-2010.01/lib/qtcreator: - LOGNAME=tkk - ORBIT_SOCKETDIR=/tmp/orbit-tkk - PATH=/home/tkk/qtsdk-2010.01/qt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games - PWD=/home/tkk/qtsdk-2010.01/bin - QTDIR=/home/tkk/qtsdk-2010.01/qt - SESSION_MANAGER=local/tkk-laptop:@/tmp/.ICE-unix/1211,unix/tkk-laptop:/tmp/.ICE-unix/1211 - SHELL=/bin/bash - SPEECHD_PORT=7560 - SSH_AGENT_PID=1380 - SSH_AUTH_SOCK=/tmp/keyring-GEEl2F/socket.ssh - USER=tkk - USERNAME=tkk - XAUTHORITY=/var/run/gdm/auth-for-tkk-r3DlIx/database - XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=cac5a30ec2a4b235840876964b6a848d-1268810656.39871-1736995145 - - - /home/tkk/speedfreak/Client/UI.pro - -spec - linux-g++ - -r - CONFIG+=debug - - /home/tkk/qtsdk-2010.01/qt/bin/qmake - false - /home/tkk/speedfreak/Client - - - - buildconfiguration-Debug-buildstep1 - - Debug - - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-51tDZ2Xnqs,guid=d9736a446700e43c64f1e7f04ba083b3 - DESKTOP_SESSION=gnome - DISPLAY=:0.0 - GDMSESSION=gnome - GDM_KEYBOARD_LAYOUT=fi classic - GDM_LANG=en_US.UTF-8 - GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_SOCKET=/tmp/keyring-GEEl2F/socket - GTK_MODULES=canberra-gtk-module - GTK_RC_FILES=/etc/gtk/gtkrc:/home/tkk/.gtkrc-1.2-gnome2 - HOME=/home/tkk - LANG=en_US.UTF-8 - LD_LIBRARY_PATH=/home/tkk/qtsdk-2010.01/lib/qtcreator: - LOGNAME=tkk - ORBIT_SOCKETDIR=/tmp/orbit-tkk - PATH=/home/tkk/qtsdk-2010.01/qt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games - PWD=/home/tkk/qtsdk-2010.01/bin - QTDIR=/home/tkk/qtsdk-2010.01/qt - SESSION_MANAGER=local/tkk-laptop:@/tmp/.ICE-unix/1211,unix/tkk-laptop:/tmp/.ICE-unix/1211 - SHELL=/bin/bash - SPEECHD_PORT=7560 - SSH_AGENT_PID=1380 - SSH_AUTH_SOCK=/tmp/keyring-GEEl2F/socket.ssh - USER=tkk - USERNAME=tkk - XAUTHORITY=/var/run/gdm/auth-for-tkk-r3DlIx/database - XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=cac5a30ec2a4b235840876964b6a848d-1268810656.39871-1736995145 - - false - - -w - - /usr/bin/make - true - /home/tkk/speedfreak/Client - - - - buildconfiguration-Debug-cleanstep0 - - Debug - - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-51tDZ2Xnqs,guid=d9736a446700e43c64f1e7f04ba083b3 - DESKTOP_SESSION=gnome - DISPLAY=:0.0 - GDMSESSION=gnome - GDM_KEYBOARD_LAYOUT=fi classic - GDM_LANG=en_US.UTF-8 - GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_SOCKET=/tmp/keyring-GEEl2F/socket - GTK_MODULES=canberra-gtk-module - GTK_RC_FILES=/etc/gtk/gtkrc:/home/tkk/.gtkrc-1.2-gnome2 - HOME=/home/tkk - LANG=en_US.UTF-8 - LD_LIBRARY_PATH=/home/tkk/qtsdk-2010.01/lib/qtcreator: - LOGNAME=tkk - ORBIT_SOCKETDIR=/tmp/orbit-tkk - PATH=/home/tkk/qtsdk-2010.01/qt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games - PWD=/home/tkk/qtsdk-2010.01/bin - QTDIR=/home/tkk/qtsdk-2010.01/qt - SESSION_MANAGER=local/tkk-laptop:@/tmp/.ICE-unix/1211,unix/tkk-laptop:/tmp/.ICE-unix/1211 - SHELL=/bin/bash - SPEECHD_PORT=7560 - SSH_AGENT_PID=1380 - SSH_AUTH_SOCK=/tmp/keyring-GEEl2F/socket.ssh - USER=tkk - USERNAME=tkk - XAUTHORITY=/var/run/gdm/auth-for-tkk-r3DlIx/database - XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=cac5a30ec2a4b235840876964b6a848d-1268810656.39871-1736995145 - - true - - clean - -w - - /usr/bin/make - true - /home/tkk/speedfreak/Client - true - - clean - - - - - buildconfiguration-Release-buildstep0 - - Release - - - - buildconfiguration-Release-buildstep1 - - Release - - - - buildconfiguration-Release-cleanstep0 - - Release - - - - buildconfigurations - - Debug - Release - - - - buildstep0 - - - - - - - buildstep1 - - - - - - buildsteps - - trolltech.qt4projectmanager.qmake - trolltech.qt4projectmanager.make - - - - cleanstep0 - - - true - - - - cleansteps - - trolltech.qt4projectmanager.make - - - - defaultFileEncoding - System - - - project - - - diff --git a/Client/accelerometer.cpp b/Client/accelerometer.cpp deleted file mode 100644 index 0495135..0000000 --- a/Client/accelerometer.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Accelerometer class to access the device accelerometer - * - * @author Rikhard Kuutti - * @author Kai Rasilainen - * @author Jukka Kurttila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "accelerometer.h" - -#include -#include -#include - -#define kFilteringFactor 0.2 - -/** - * Default constructor for Accelerometer class - * - */ -Accelerometer::Accelerometer() -{ - initValues(); -} - -/** - * Default destructor for Accelerometer class - * - */ -Accelerometer::~Accelerometer() -{ -} - -/** - * Init class members - * - */ -void Accelerometer::initValues() -{ - previousAccelerationX = 0; - previousAccelerationY = 0; - previousAccelerationZ = 0; - calibrationX = 0; - calibrationY = 0; - calibrationZ = 0; -} - -/** - * Calibrate. Purpose of this function is to calibrate - * accelerometer when stationary. - * - */ -void Accelerometer::calibrate(void) -{ - unsigned int iteration = 0; - qreal sampleX, sampleY, sampleZ; - - do { - - getAcceleration(sampleX, sampleY, sampleZ); - - calibrationX += sampleX; // Accumulate Samples - calibrationY += sampleY; // for all axes. - calibrationZ += sampleZ; - - iteration++; - - } while(iteration != 1024); // 1024 times - - calibrationX = calibrationX/1024; // division by 1024 - calibrationY = calibrationY/1024; - calibrationZ = calibrationZ/1024; -} - -/** - * 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); - y = (previousAccelerationY * (1 - kFilteringFactor)) + (y * kFilteringFactor); - z = (previousAccelerationZ * (1 - kFilteringFactor)) + (z * kFilteringFactor); - - previousAccelerationX = x; - previousAccelerationY = y; - previousAccelerationZ = 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 - */ -void Accelerometer::getAcceleration(qreal &x, qreal &y, qreal &z) -{ - QDBusConnection connection(QDBusConnection::systemBus()); - if (connection.isConnected()) { - QDBusInterface interface("com.nokia.mce", "/com/nokia/icd", QString(), connection); - QDBusPendingReply reply; - reply = interface.asyncCall("get_device_orientation"); - reply.waitForFinished(); - x = static_cast(reply.argumentAt<3>()) / 1000; - y = static_cast(reply.argumentAt<4>()) / 1000; - z = static_cast(reply.argumentAt<5>()) / 1000; - } -} - -/** - * 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 - */ -qreal Accelerometer::getCalibrationY() -{ - return calibrationY; -} - -/** - * Get the z calibration component - * - * @return calibrationZ z calibration component - */ -qreal Accelerometer::getCalibrationZ() -{ - return calibrationZ; -} diff --git a/Client/accelerometer.h b/Client/accelerometer.h deleted file mode 100644 index 24063cd..0000000 --- a/Client/accelerometer.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Accelerometer class to access the device accelerometer - * - * @author Rikhard Kuutti - * @author Kai Rasilainen - * @author Jukka Kurttila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef ACCELEROMETER_H -#define ACCELEROMETER_H - -#include - -#include "calculate.h" - -class Accelerometer : public QObject -{ - Q_OBJECT -public: - Accelerometer(); - ~Accelerometer(); - - void getAcceleration(qreal &x, qreal &y, qreal &z); - void smoothData(qreal &x, qreal &y, qreal &z); - void calibrate(); - void initValues(); - - qreal getCalibrationX(); - qreal getCalibrationY(); - qreal getCalibrationZ(); - -private: - qreal previousAccelerationX, previousAccelerationY, previousAccelerationZ; - qreal calibrationX, calibrationY, calibrationZ; -}; - -#endif // ACCELEROMETER_H diff --git a/Client/calculate.cpp b/Client/calculate.cpp deleted file mode 100644 index f387061..0000000 --- a/Client/calculate.cpp +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Calculate class to process accelerometer data - * - * @author Kai Rasilainen - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "calculate.h" -#include - -#include -#include -#include -#include - -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; - -Calculate::Calculate() -{ - this->reset(); -} - -Calculate::~Calculate() -{ - -} - -void Calculate::reset() -{ - averageSpeed = 0; - averagePower = 0; - peakPower = 0; - currentPower = 0; - currentSpeed = 0; - maxSpeed = 0; - distanceTraveled = 0; - lastAcceleration = 0; - lastDistance = 0; - lastSpeed = 0; - numOfIterations = 0; - totalTime = 0; - count = 0; - - speedCheckPoints.append(10); - speedCheckPoints.append(20); - speedCheckPoints.append(30); - speedCheckPoints.append(40); - -} - - -/** - * 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: --- - */ -void Calculate::calculateParameters(double currentAcceleration, double seconds) -{ - double force, power1, power2; - - currentAcceleration *= G_ACCELERATION; - numOfIterations++; - totalTime = (totalTime + seconds); - - // v=v0 + a*t - // v(n) = v(n-1)+(a(n) + a(n-1))*(seconds)/2 - - // First integration of acceleration provides speed - currentSpeed = (lastSpeed + (((currentAcceleration + lastAcceleration) * seconds) / 2)); - - // Update maximum speed - if (currentSpeed > maxSpeed) - maxSpeed = currentSpeed; - - // Second integration: distance. - distanceTraveled = (lastDistance + (((currentSpeed + lastSpeed) * seconds) / 2)); - - // Average speed - averageSpeed = (distanceTraveled / totalTime); - - // F=ma - force = (carWeight * currentAcceleration); - - power1 = (force * currentSpeed); - - power2 = ((AIR_DENSITY * (pow(currentSpeed, 3) - * (carFrontalArea * dragCoefficient))) / 2); - - currentPower = ((power1 + power2) / WATTS_PER_HORSEPOWER); - - // Save peak power - if ((currentPower > peakPower)) - { - peakPower = currentPower; - } - - if ((currentPower > 0)) - { - averagePower = (averagePower + currentPower); - } - else - { - numOfIterations--; - } - - // Checkpoints - if ((lastSpeed == 0)) - { - lastCheckpoint = 0; - } - - // List of checkpoints - if (!(speedCheckPoints.isEmpty())) - { - foreach (double speed, speedCheckPoints) - { - if ((lastCheckpoint != floor(speed)) && (floor(getCurrentSpeed()) == floor(speed))) - { - emit checkPointReached(totalTime, getCurrentSpeed()); - lastCheckpoint = floor(getCurrentSpeed()); - } - } - } - - // Check for movement - accelStoppedCheck(currentAcceleration); - - lastSpeed = currentSpeed; - lastAcceleration = currentAcceleration; - lastDistance = distanceTraveled; -} - -/** - * This function checks if acceleration has stopped for - * a short period of time. Velocity is set to zero to avoid - * distance errors. - */ -void Calculate::accelStoppedCheck(double currentAcceleration) -{ - // counting number of acceleration samples that equals zero - if (currentAcceleration==0) { - count++; - } else { - count = 0; - } - - // if count exceeds 25, we assume that velocity is zero - if (count >= 25) - { - currentSpeed=0; - } -} - -// Getters and setters - -double Calculate::getAverageSpeed() -{ - return averageSpeed; -} - -void Calculate::setAverageSpeed(double value) -{ - averageSpeed = value; -} - -double Calculate::getCurrentSpeed() -{ - return currentSpeed; -} - -void Calculate::setCurrentSpeed(double value) -{ - currentSpeed = value; -} - -double Calculate::getDistanceTraveled() -{ - return distanceTraveled; -} - -void Calculate::setDistanceTraveled(double value) -{ - distanceTraveled = value; -} - -double Calculate::getLastAcceleration() -{ - return lastAcceleration; -} - -void Calculate::setLastAcceleration(double value) -{ - lastAcceleration = value; -} - -double Calculate::getLastDistance() -{ - return lastDistance; -} - -void Calculate::setLastDistance(double value) -{ - lastDistance = value; -} - -double Calculate::getLastSpeed() -{ - return lastSpeed; -} - -void Calculate::setLastSpeed(double value) -{ - lastSpeed = value; -} - -long Calculate::getNumOfIterations() -{ - return numOfIterations; -} - -void Calculate::setNumOfIterations(long value) -{ - numOfIterations = value; -} - -double Calculate::getTotalTime() -{ - return totalTime; -} - -void Calculate::setTotalTime(double value) -{ - totalTime = value; -} - -double Calculate::getCurrentPower() -{ - return currentPower; -} - -void Calculate::setCurrentPower(double value) -{ - currentPower = value; -} - -double Calculate::getPeakPower() -{ - return peakPower; -} - -void Calculate::setPeakPower(double value) -{ - peakPower = value; -} - -double Calculate::getAveragePower() -{ - if (numOfIterations > 0) - { - return (averagePower/numOfIterations); - } - else - { - return 0; - } -} - -void Calculate::setAveragePower(double value) -{ - averagePower = value; -} - -double Calculate::getMaxSpeed() -{ - return maxSpeed; -} - -void Calculate::setMaxSpeed(double value) -{ - maxSpeed = value; -} - diff --git a/Client/calculate.h b/Client/calculate.h deleted file mode 100644 index c1dddff..0000000 --- a/Client/calculate.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Calculate class to process accelerometer data - * - * @author Kai Rasilainen - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef CALCULATE_H -#define CALCULATE_H - -#include -#include -#include - -class Calculate : public QObject -{ - Q_OBJECT - -public: - Calculate(); - ~Calculate(); - - void reset(); - void calculateParameters(double currentAcceleration, double seconds); - void accelStoppedCheck(double currentAcceleration); - - double getAverageSpeed(); - void setAverageSpeed(double value); - - double getCurrentSpeed(); - void setCurrentSpeed(double value); - - double getDistanceTraveled(); - void setDistanceTraveled(double value); - - double getLastAcceleration(); - void setLastAcceleration(double value); - - double getLastCheckpoint(); - void setLastCheckpoint(double value); - - double getLastDistance(); - void setLastDistance(double value); - - double getLastSpeed(); - void setLastSpeed(double value); - - long getNumOfIterations(); - void setNumOfIterations(long value); - - double getTotalTime(); - void setTotalTime(double value); - - double getCurrentPower(); - void setCurrentPower(double value); - - double getPeakPower(); - void setPeakPower(double value); - - double getAveragePower(); - void setAveragePower(double value); - - double getMaxSpeed(); - void setMaxSpeed(double value); - -private: - double averageSpeed; - double currentSpeed; - double maxSpeed; - double distanceTraveled; - double lastAcceleration; - double lastCheckpoint; - double lastDistance; - double lastSpeed; - long numOfIterations; - double totalTime; - int count; - double peakPower; - double currentPower; - double averagePower; - QList speedCheckPoints; - -signals: - void checkPointReached(double totalTime, double currentSpeed); - -}; - -#endif // CALCULATE_H diff --git a/Client/carmainwindow.cpp b/Client/carmainwindow.cpp deleted file mode 100644 index 5da33b7..0000000 --- a/Client/carmainwindow.cpp +++ /dev/null @@ -1,847 +0,0 @@ -/* - * CarMainWindow main class - * - * @author Toni Jussila - * @author Janne Änäkkälä - * @author Tiina Kivilinna-Korhola - * @author Olavi Pulkkinen - * @author Rikhard Kuutti - * @author Kai Rasilainen - * @author Jukka Kurttila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "carmainwindow.h" -#include "math.h" - -#define kAccelerometerSampleRate 40 -#define kFilteringFactor 0.1 -#define kSecondsInHour 3600 - -/** - *Constructor of this class. - *@param QWidget pointer to parent object. By default the value is NULL. - */ -CarMainWindow::CarMainWindow(QWidget *parent):QMainWindow(parent), ui(new Ui::CarMainWindow) -{ - ui->setupUi(this); - ui->tabWidget->setCurrentWidget(this->ui->StartTab); - - //Disable start buttons before calibration - ui->autoStartButton->setEnabled(false); - ui->manualStartButton->setEnabled(false); - - result = new ResultDialog(); - //measure = new MeasureDialog(); - welcomeDialog = new WelcomeDialog(); - welcomeDialog->show(); - - initComboBoxStartTabUnits(); - initListViewStartTabAccelerationCategories(); - - myLogin = new LoginWindow(this); - myCategorylist = new CategoryList(); - myHttpClient = new HttpClient(this); - myRegistration = new Registration(this); - connect(myRegistration,SIGNAL(sendregistration()),this,SLOT(regUserToServer())); - connect(myLogin,SIGNAL(userNameChanged()),this,SLOT(userLogin())); - connect(myHttpClient->myXmlreader, SIGNAL(receivedCategoryList()), this, SLOT(setCategoryCompoBox())); - connect(myHttpClient->myXmlreader, SIGNAL(receivedTop10List()), this, SLOT(showTop10())); - myRoute = new RouteDialog( this); - - //GPS - location = new Maemo5Location(this); - gpsData = new GPSData(location); - connect(location,SIGNAL(agnss()),this,SLOT(gpsStatus())); - gpsTime = new QDateTime(); - gpsTimer = new QTimer(); - connect(gpsTimer, SIGNAL(timeout()),this, SLOT(gpsTimerTimeout())); - gpsSpeedNow = 0.0; - gpsSpeedPrevious = 0.0; - gpsAcceleration = 0.0; - timeFromGps = 0.0; //Measure-tab view. - gpsSpeed = 0.0; - - this->time = 0; - this->speed = 0; - counterForSaveResults = 0; - timer = new QTimer(); - - // Accelerometer - accelerometer = new Accelerometer(); - movingAverageZ = new MovingAverage(10); - - reverseAccelerationFlag = false; - vehicleStartedMoving = false; - isNewRun = true; - isSetup = false; - stopTime = 0; - accelerationStartThreshold = 0.1; - - accelerometerTimer = new QTimer(this); - connect(accelerometerTimer, SIGNAL(timeout()), this, SLOT(readAccelerometerData())); - //accelerometerTimer->start(kAccelerometerSampleRate); - - // Calculate - calculate = new Calculate(); - connect(calculate, SIGNAL(checkPointReached()), this, SLOT(handleCheckPoint())); - - resetAccelerometerMeasurements(); - - measures = new Measures(); - measures->initializeMembers(); - - this->timer->setInterval(100); - - connect(this->timer, SIGNAL(timeout()), this, SLOT(after_timeout())); - connect(myLogin, SIGNAL( userNameChanged()), this, SLOT(updateUserName())); - - ui->labelMeasureTabResult->hide(); - ui->pushButtonShowResultDialog->setEnabled(false); - ui->pushButtonShowResultDialog->setEnabled(false); - - this->setWindowTitle("Speed Freak"); -} - -/** - *Destructor of this class. Deletes all dynamic objects and sets them to NULL. - */ -CarMainWindow::~CarMainWindow() -{ - delete ui; - ui = NULL; - //delete result; - //delete measure; - delete myCategorylist; - myCategorylist = NULL; - delete welcomeDialog; - welcomeDialog = NULL; - delete myRoute; - myRoute = NULL; - delete gpsData; - gpsData = NULL; - delete gpsTime; - gpsTime = NULL; - - //Route-tab view - gpsSpeedNow = 0.0; - gpsSpeedPrevious = 0.0; - gpsAcceleration = 0.0; - timeFromGps = 0.0; - gpsSpeed = 0.0; - gpsUpdateTime = 0; -} - -/** - *This function is used to . - *@param - */ -void CarMainWindow::changeEvent(QEvent *e) -{ - QMainWindow::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -/** - *This slot function is called when ever list view is update. Start-tab view. - */ -void CarMainWindow::on_listViewStartTabAccelerationCategories_clicked(QModelIndex index) -{ - QString str = index.data().toString(); - QStringList list = str.split("-"); - QStringList list3 = list[1].split(" "); - QStringList list2 = list[0].split(" "); - - ui->lineEditStartTabMin->setText(list2[1]); - ui->lineEditStartTabMax->setText(list3[0]); - updateComboBoxStartTabUnits(list3[1]); -} - -/** - *This slot function is called when ever auto start button clicked. Start-tab view. - *@todo Check setDiagramGapStem(100) <- (choiceInt == 2) - */ -void CarMainWindow::on_autoStartButton_clicked() -{ - measures->initializeMembers(); - resetAccelerometerMeasurements(); - ui->pushButtonSendResult->setEnabled(false); - ui->pushButtonShowResultDialog->setEnabled(false); - choice = ui->listViewStartTabAccelerationCategories->currentIndex(); - choiceInt = choice.row(); - //qDebug() << "choiceInt" << choiceInt << " " << catList.at(choiceInt); - if (choiceInt == 0) - { - ui->labelMeasureTabHeader->setText("Accelerate to 40 km/h"); - result->setDiagramGapStem(75); - } - else if (choiceInt == 1) - { - ui->labelMeasureTabHeader->setText("Accelerate to 100 km/h"); - result->setDiagramGapStem(30); - } - else if (choiceInt == 2) - { - ui->labelMeasureTabHeader->setText("Accelerate to 10 km/h"); - result->setDiagramGapStem(100); - } - else - { - ui->labelMeasureTabHeader->setText("Accelerate to 80 km/h"); - result->setDiagramGapStem(37.5); - } - ui->labelMeasureTabResult->setText(""); - - this->accelerometerTimer->start(kAccelerometerSampleRate); - this->timer->start(); - this->time = 0; - this->speed = 0; - ui->tabWidget->setCurrentWidget(this->ui->tabMeasureResult); -} - -/** - *This slot function is called when ever list view is update. Start-tab view. - *@param QString unit. - */ -void CarMainWindow::updateComboBoxStartTabUnits(QString unit) -{ - ui->comboBoxStartTabUnits->setCurrentIndex(ui->comboBoxStartTabUnits->findText(unit, Qt::MatchExactly)); -} - -/** - *This function is used to init unit combobox. Start-tab view. - */ -void CarMainWindow::initComboBoxStartTabUnits() -{ - units << "km/h" << "km" << "h" << "m" << "min" << "Mile" << "Mph" << "in" << "ft" << "yrd"; - ui->comboBoxStartTabUnits->addItems(units); -} - -/** - *This function is used to set items to unit combobox. Start-tab view. - *@param QStringlist units - */ -void CarMainWindow::setComboBoxStartTabUnits(QStringList units) -{ - ui->comboBoxStartTabUnits->addItems(units); -} - -/** - *This function is used to init listViewStartTabAccelerationCategories. Start-tab view. - *@todo During development categories index values that are used for measuring are hardcoded - *@todo and accelerationCategoriesStartTab and catList are used instead of using - *@todo CategoryList::categoryList and CategoryList::cats. - */ -void CarMainWindow::initListViewStartTabAccelerationCategories() -{ - //Connect the user`s choice fron GUI to a correct variable name - catList.insert(0,"acceleration-0-40"); - catList.insert(1,"acceleration-0-100"); - catList.insert(2,"acceleration-0-10"); - - accelerationCategoriesStartTab << "Acceleration 0-40 km/h" << "Acceleration 0-100 km/h" << "Acceleration 0-10 km/h"; - //<< "0-1/4 Mile" << "0-1/8 Mile" << "50-100 Mile" << "0-60 Mph" << "0-100 m" << "0-50 ft" << "0-50 yrd" << "0-500 in"; - QAbstractItemModel *model = new StringListModel(accelerationCategoriesStartTab); - ui->listViewStartTabAccelerationCategories->setModel(model); -} - -/** - *This function is used to set items to listViewStartTabAccelerationCategories. Start-tab view. - *@param QStringlist accelerationCategoriesStartTab - */ -void CarMainWindow::setListViewStartTabAccelerationCategories(QStringList accelerationCategoriesStartTab) -{ - QAbstractItemModel *model = new StringListModel(accelerationCategoriesStartTab); - ui->listViewStartTabAccelerationCategories->setModel(model); -} - -void CarMainWindow::setLabelInfoToUser(QString infoText) -{ - ui->labelInfoToUser->setText(infoText); -} - -/** - *This function is used to set items to category combobox. Top-tab view. - *@param - */ -void CarMainWindow::setCategoryCompoBox() -{ - qDebug() << "_setCategoryCompoBox"; - ui->comboBoxTopCategory->addItems(myHttpClient->myXmlreader->myCategoryList->getCategoryList()); -} - -/** - *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 CarMainWindow::showTop10() -{ - int limitNr = 5; - setListViewTopList(recentCategory, limitNr); -} - -/** - *This function is used to set items to labelTopList. Top-tab view. - *@param Category - *@param Size, number of results. - */ -void CarMainWindow::setListViewTopList(QString category, int size) -{ - qDebug() << "_setListViewTopList"; - QString topList; - topList.append(myHttpClient->myXmlreader->myCategoryList->getTopList(category, size)); - ui->labelTopList->setText(topList); -} - -/** - *This slot function is called when speed is achieved in measure dialog. Opens result dialog. - */ -void CarMainWindow::openResultView() -{ - -} - -/** - *This slot function is called when registrate button is clicked. - */ -void CarMainWindow::on_registratePushButton_clicked() -{ - myRegistration->show(); -} - -/** - *This slot function is called when ever refresh button clicked. Top-tab view. - */ -void CarMainWindow::on_buttonTopRefresh_clicked() -{ - myHttpClient->requestCategories(); -} - -/** - *This slot function is called when ever category combobox current index changed. Top-tab view. - *@param QString category. - *@todo Check where limitNr is taken, fixed or user input, see showTop10. - */ -void CarMainWindow::on_comboBoxTopCategory_currentIndexChanged(QString category) -{ - qDebug() << "_on_comboBoxTopCategory_currentIndexChanged: " << category; - recentCategory = category; //for showTop10() - int limitNr = 5; - QString limit = QString::number(limitNr); - myHttpClient->requestTopList(category, limit); -} - -/** - *This slot function is called when set/change user button is clicked. - */ -void CarMainWindow::on_setUserPushButton_clicked() -{ - myLogin->show(); -} - -/** - *@brief Just for development, for the real button is not shown until - *measurin started and there are results. - *@todo Implement with real code and yet leave sendXml in the bottom in use. - */ -void CarMainWindow::on_manualStartButton_clicked() -{ - -} - -/** - * This slot function is called when timer gives timeout signal. Checks current speed - * and stores times in measure class. - */ -void CarMainWindow::after_timeout() -{ - //IF GPS checkbox is ON - if (ui->gpsOnCheckBox->isChecked()) - { - if ( gpsSpeed > 1.0 ) - { - timeFromGps += 0.1; - } - } - - else - { - ui->labelMeasureTabSpeed->setText(QString::number(this->speed)); //Set speed. //Measure-tab view. - ui->labelMeasureTabTime->setText(QString::number(this->time)); //Set time. //Measure-tab view. - } -} - -/** - * This slot function is called when Abort button is clicked. - */ -void CarMainWindow::on_pushButtonMeasureTabAbort_clicked() -{ - ui->pushButtonSendResult->setEnabled(false); - ui->pushButtonShowResultDialog->setEnabled(false); - ui->labelMeasureTabResult->hide(); - ui->labelMeasureTabTime->setText(""); - ui->labelMeasureTabSpeed->setText(""); - measures->initializeMembers(); - this->accelerometerTimer->stop(); - this->timer->stop(); - this->time = 0; - this->speed = 0; - ui->tabWidget->setCurrentWidget(this->ui->StartTab); - //this->close(); - - //GPS - gpsSpeed = 0.0; - timeFromGps = 0.0; -} - -/** - *This slot function is called when pushButtonSendResult is clicked. - *@todo Use real category value. - */ -void CarMainWindow::on_pushButtonSendResult_clicked() -{ - //Pick up relevant category name and pass it to the server - myHttpClient->sendResultXml(catList.at(choiceInt)); - ui->pushButtonSendResult->setEnabled(false); -} - -void CarMainWindow::updateUserName() -{ - QString newUserName; - - newUserName = myLogin->getUserName(); - ui->userNameLabel->setText( "User: " + newUserName); - - if (newUserName.length()) - { - ui->setUserPushButton->setText( "Change User"); - this->setWindowTitle("Speed Freak - " + newUserName); - } - else - { - ui->setUserPushButton->setText( "Set User"); - this->setWindowTitle("Speed Freak"); - } -} - -void CarMainWindow::regUserToServer() -{ - myHttpClient->requestRegistration(); -} - - -void CarMainWindow::on_drawRoutePushButton_clicked() -{ - QString routeFile = QString("route.txt"); - if (myRoute->readRouteFromFile( routeFile) == true) - { - myRoute->show(); - } -} - -void CarMainWindow::on_sendRoutePushButton_clicked() -{ - myHttpClient->sendRouteXml(); -} - -/** - * Opens result dialog when show result button is clicked. - * Sends measures as parameter to the resultdialogs saveMeasuresToArray-function. - */ -void CarMainWindow::on_pushButtonShowResultDialog_clicked() -{ - result->saveMeasuresToArray(measures); - this->result->show(); -} - -void CarMainWindow::userLogin() -{ - myHttpClient->checkLogin(); -} - -/** - * Resets Accelerometer measurement variables - */ -void CarMainWindow::resetAccelerometerMeasurements() -{ - currentAcceleration = 0; - currentAccelerationString = ""; - currentSpeed = ""; - currentTime = 0; - distanceTraveled = ""; - //firstAcceleration = 0; - //horsepower = null; - isNewRun = true; - //lastScreenUpdateInSeconds = 0; - previousTime = 0; - reverseAccelerationFlag = false; - stopWatch.start(); - //accelerometer->stop(); - totalTime = ""; - vehicleStartedMoving = false; - calculate->reset(); -} - -/** - * This function is called to handle checkpoints - *@param totalTime total time elapsed since starting measurements - *@param currentSpeed current speed of the device - */ -void CarMainWindow::handleCheckPoint(double totalTime, double currentSpeed) -{ - switch (counterForSaveResults) - { - case 0: - measures->setTime10kmh(totalTime); - break; - - case 1: - measures->setTime20kmh(totalTime); - break; - - case 2: - measures->setTime30kmh(totalTime); - break; - - case 3: - measures->setTime40kmh(totalTime); - break; - - case 4: - measures->setTime50kmh(totalTime); - break; - - case 5: - measures->setTime60kmh(totalTime); - break; - - case 6: - measures->setTime70kmh(totalTime); - break; - - case 7: - measures->setTime80kmh(totalTime); - break; - - case 8: - measures->setTime90kmh(totalTime); - break; - - case 9: - measures->setTime100kmh(totalTime); - break; - - default: - break; - } - counterForSaveResults++; - - if (choiceInt == 0 && measures->getTime40kmh() != 0) - { - setTimeAxisGapAndShowResult(measures->getTime40kmh()); - this->timer->stop(); - this->accelerometerTimer->stop(); - this->time = 0; - this->speed = 0; - counterForSaveResults = 0; - } - else if (choiceInt == 1 && measures->getTime100kmh() != 0) - { - setTimeAxisGapAndShowResult(measures->getTime100kmh()); - this->timer->stop(); - this->accelerometerTimer->stop(); - this->time = 0; - this->speed = 0; - counterForSaveResults = 0; - } - else if (choiceInt == 2 && measures->getTime10kmh() != 0) - { - setTimeAxisGapAndShowResult(measures->getTime10kmh()); - this->timer->stop(); - this->accelerometerTimer->stop(); - this->time = 0; - this->speed = 0; - counterForSaveResults = 0; - } - else if (choiceInt != 1 && choiceInt != 0 && measures->getTime80kmh() != 0) - { - setTimeAxisGapAndShowResult(measures->getTime80kmh()); - this->timer->stop(); - this->accelerometerTimer->stop(); - this->time = 0; - this->speed = 0; - counterForSaveResults = 0; - } - else - { - qDebug() << "something wrong in handleCheckPoint()"; - } -} - -/** - *This function is called to read (and process) data from the accelerometer - */ -void CarMainWindow::readAccelerometerData() -{ - QString s; - double changeInAcceleration = 0; - qreal x, y, z; - - accelerometer->getAcceleration(x, y, z); - - // keep the following line as close to the SetKinematicsProperties method as possible - currentTime = stopWatch.elapsed(); - - //accelerometer->smoothData(x, y, z); - - //Calculate average - movingAverageZ->Enqueue(z); - z = movingAverageZ->Average(); - - // Apply calibration - x -= accelerometer->getCalibrationX(); - y -= accelerometer->getCalibrationY(); - z -= accelerometer->getCalibrationZ(); - - 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); - changeInAcceleration = currentAcceleration; - - if (((fabs(changeInAcceleration) <= accelerationStartThreshold) - && !vehicleStartedMoving)) - { - return; - } - else if(!vehicleStartedMoving) - { - vehicleStartedMoving = true; - stopWatch.start(); - previousTime = 0; - currentTime = 0; - } - - calculate->calculateParameters(changeInAcceleration, (currentTime - previousTime)/1000); - previousTime = currentTime; - - s.sprintf("%.2f", changeInAcceleration); - currentAccelerationString = s; - - speed = 0.0; - speed = calculate->getCurrentSpeed(); - speed = speed*3.6;//((speed*1000)/kSecondsInHour); - s.sprintf("%.1f", speed); - currentSpeed = s; - - s.sprintf("%.2f", calculate->getDistanceTraveled()); - distanceTraveled = s; - - // TODO - //distanceTraveled; - //horsepower; - - time = calculate->getTotalTime(); - - s.sprintf("%.2f", time); - totalTime = s; - - str.append("ca: " + currentAccelerationString + " G\n" ); - str.append("cspeed: " + currentSpeed + " km/h \n" ); - str.append("dist: " + distanceTraveled + " m \n" ); - str.append("time: " + totalTime + " s \n" ); - - if ((stopTime > 0) && (previousTime >= stopTime)) - { - // we want to end at a stopping point that the user chose - // output results - resetAccelerometerMeasurements(); - } -} - -/** - *This function is used to calibrate accelerometer - */ -void CarMainWindow::calibrateAccelerometer() -{ - resetAccelerometerMeasurements(); - accelerometer->calibrate(); -} - -/** - *This slot function is called when GPS on checkbox state changed. Route-tab view. - *@param int GPSState - */ -void CarMainWindow::on_gpsOnCheckBox_stateChanged(int GPSState) -{ - //Stop polling GPS. Route-tab view. - if (GPSState == 0) - { - ui->labelRouteTabGPSStatus->setText("GPS status: GPS off"); - location->stopPollingGPS(); - gpsUpdateTime = 0; - gpsTimer->stop(); - } - //Start polling GPS. Route-tab view. - else - { - ui->labelRouteTabGPSStatus->setText("GPS status: GPS on"); - location->startPollingGPS(); - } -} - -/** - *This slot function is called when GPS status changed. Route- and measure-tab view. - */ -void CarMainWindow::gpsStatus() -{ - //IF GPS checkbox is ON - if (ui->gpsOnCheckBox->isChecked()) - { - //If GPS find 4 satellite. - if (location->getSatellitesInUse() >= 4) - { - //Set gps status. Route-tab view. - ui->labelRouteTabGPSStatus->setText("GPS ready"); - - //Set time. Route-tab view. - gpsTime->setTime_t(location->getTime()); - QString gpsDateNow = gpsTime->toString("dd.MM.yyyy hh:mm:ss"); - ui->labelRouteTabGPSTime->setText("GPS time: " + gpsDateNow); - - //Set latitude & longitude. Route-tab view. - ui->labelRouteTabLatitude->setText("Latitude: " + QString::number(location->getLatitude())); - ui->labelRouteTabLongitude->setText("Longitude: " + QString::number(location->getLongitude())); - - //Set rec status. Route-tab view. - if (ui->startRecPushButton->text() == "Stop recording") - { - ui->labelRouteTabRecStatus->setText("Recorded " + QString::number(gpsData->roundCounter) + " point"); - } - - //Get speed. Route- and Measure-tab view. - gpsSpeed = location->getSpeed(); - - //Set speed. Route-tab view. - ui->labelRouteTabSpeed->setText("Speed:" + QString::number(gpsSpeed) + "km/h +/-" + QString::number(location->getEps()) + "km/h"); - - //Measure-tab view. - if (gpsSpeed < 40.0) - { - ui->labelMeasureTabSpeed->setText(QString::number(gpsSpeed)); //Set speed. //Measure-tab view. - ui->labelMeasureTabTime->setText(QString::number(timeFromGps)); //Set time. //Measure-tab view. - } - //Measure-tab view. - else - { - timer->stop(); //Measure timer - ui->labelMeasureTabResult->setText(QString::number(timeFromGps)); - ui->labelMeasureTabResult->show(); - ui->pushButtonShowResultDialog->setEnabled(true); - ui->pushButtonShowResultDialog->setEnabled(true); - } - } - - //If GPS find less than 4 satellite. - else - { - ui->labelRouteTabGPSStatus->setText("GPS status: Waiting for GPS"); - gpsTimer->stop(); - } - - gpsUpdateTime = 0; - gpsTimer->start(10); - } -} - -/** - *This slot function is called when gps timer timeout(10ms). - */ -void CarMainWindow::gpsTimerTimeout() -{ - int time1000ms = 0; - time1000ms += 10; - - //IF time is 1 second - if (time1000ms == 1000) - { - //Calculate acceleration 1/s - gpsSpeedPrevious = gpsSpeedNow; //Previous speed - gpsSpeedNow = (location->getSpeed())/3.6; //Speed now (m/s) - gpsAcceleration = (gpsSpeedNow - gpsSpeedPrevious)/1; //Calculate acceleration: speed now - previous speed / 1s. - //Set acceleration. Route-tab view. - ui->labelRouteTabAcceleration->setText("Acceleration: " + QString::number( gpsAcceleration ) + " m/s2"); - } - - gpsUpdateTime++; - //Set GPS update time. Route-tab view. - ui->labelRouteTabGPSUpdateTime->setText("GPS update time: " + QString::number(gpsUpdateTime) + " ms"); -} - -/** - *This slot function is called when start rec push button clicked. Route-tab view. - */ -void CarMainWindow::on_startRecPushButton_clicked() -{ - //Start route recording. - if (ui->startRecPushButton->text() == "Start recording") - { - ui->startRecPushButton->setText("Stop recording"); - ui->labelRouteTabRecStatus->setText("Recording started"); - gpsData->startRouteRecording(ui->labelRouteTabGPSTime->text()); - } - - //Stop route recording. - else if (ui->startRecPushButton->text() == "Stop recording") - { - ui->startRecPushButton->setText("Start recording"); - ui->labelRouteTabRecStatus->setText("Recording stopped"); - gpsData->stopRouteRecording(ui->labelRouteTabGPSTime->text()); - } -} - -/** - *Sets time axis right way in result dialog and shows target speed result. - *@param double pTime is the target speed result time which is shown to the user. - */ -void CarMainWindow::setTimeAxisGapAndShowResult(double pTime) -{ - ui->pushButtonShowResultDialog->setEnabled(true); - ui->pushButtonSendResult->setEnabled(true); - QString timeInteger; - timeInteger.setNum(pTime); - ui->labelMeasureTabResult->show(); - ui->labelMeasureTabResult->setText(timeInteger); - - if (floor(pTime) <= 5) - { - result->setDiagramGapHorizontal(80); - } - - else if (floor(pTime) <= 10) - { - result->setDiagramGapHorizontal(40); - } - - else - { - result->setDiagramGapHorizontal(20); - } -} - -void CarMainWindow::on_calibrateButton_clicked() -{ - ui->autoStartButton->setEnabled(true); - ui->manualStartButton->setEnabled(true); - - this->accelerometer->calibrate(); -} - diff --git a/Client/carmainwindow.h b/Client/carmainwindow.h deleted file mode 100644 index 83cbafa..0000000 --- a/Client/carmainwindow.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - * CarMainWindow main class - * - * @author Toni Jussila - * @author Janne Änäkkälä - * @author Tiina Kivilinna-Korhola - * @author Olavi Pulkkinen - * @author Rikhard Kuutti - * @author Kai Rasilainen - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef CARMAINWINDOW_H -#define CARMAINWINDOW_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "resultdialog.h" -//#include "measuredialog.h" -#include "welcomedialog.h" -#include "loginwindow.h" -#include "registration.h" -#include "xmlwriter.h" -#include "xmlreader.h" -#include "ui_carmainwindow.h" -#include "stringlistmodel.h" -#include "measures.h" -#include "accelerometer.h" -#include "categorylist.h" -#include "httpclient.h" -#include "routedialog.h" -#include "calculate.h" -#include "gpsdata.h" -#include "movingaverage.h" -#include - -namespace Ui { - class CarMainWindow; -} - -class CarMainWindow : public QMainWindow { - Q_OBJECT -public: - CarMainWindow(QWidget *parent = 0); - ~CarMainWindow(); - Registration *myRegistration; //Check if this should be public or private - LoginWindow *myLogin; - GPSData *gpsData; - - void setComboBoxStartTabUnits(QStringList units); //Start-tab view - void setListViewStartTabAccelerationCategories(QStringList numbers); //Start-tab view - void setLabelInfoToUser(QString infoText); - -protected: - void changeEvent(QEvent *e); - -private: - Ui::CarMainWindow *ui; - ResultDialog *result; - //MeasureDialog *measure; - WelcomeDialog *welcomeDialog; - CategoryList *myCategorylist; - HttpClient *myHttpClient; - RouteDialog *myRoute; - Maemo5Location *location; - //void initCategoryCompoBox(); - void initComboBoxStartTabUnits(); //Start-tab view - void initListViewStartTabAccelerationCategories(); //Start-tab view - void setListViewTopList(QString category, int size); //Top-tab view - void resetAccelerometerMeasurements(); - void calibrateAccelerometer(); - void setTimeAxisGapAndShowResult(double pTime); - -private: - QStringList accelerationCategoriesStartTab; //Start-tab view - QStringList units; //Start-tab view - QString recentCategory; - - QTimer *timer; - Accelerometer *accelerometer; - MovingAverage* movingAverageZ; - double time; - double speed; - Measures *measures; - - QModelIndex choice; - int choiceInt; - QStringList catList; - - Calculate *calculate; - - bool reverseAccelerationFlag; - bool vehicleStartedMoving; - bool isNewRun; - bool isSetup; - - double stopTime; - double accelerationStartThreshold; - double currentAcceleration; - double currentTime; - double previousTime; - //double firstAcceleration; - - QTimer *accelerometerTimer; - QTime stopWatch; - - QString currentAccelerationString; - QString currentSpeed; - QString distanceTraveled; - QString horsepower; - QString totalTime; - - QDateTime *gpsTime; - QTimer *gpsTimer; - double gpsSpeedNow; //Route-tab view - double gpsSpeedPrevious;//Route-tab view - double gpsAcceleration; //Route-tab view - double timeFromGps; //Route-tab view - double gpsSpeed; //Route-tab view - int gpsUpdateTime; //Route-tab view - - int counterForSaveResults; - -signals: - void speedAchieved(); - void userNameChanged(); - -private slots: - void on_calibrateButton_clicked(); - void gpsTimerTimeout(); //Route-tab view - void on_startRecPushButton_clicked(); //Route-tab view - void on_pushButtonShowResultDialog_clicked(); - void on_gpsOnCheckBox_stateChanged(int GPSState); //Route-tab view - void gpsStatus(); //Route-tab view - void on_drawRoutePushButton_clicked(); - void on_sendRoutePushButton_clicked(); - void on_pushButtonSendResult_clicked(); - void on_pushButtonMeasureTabAbort_clicked(); - void on_manualStartButton_clicked(); - void on_setUserPushButton_clicked(); - void on_registratePushButton_clicked(); - void on_comboBoxTopCategory_currentIndexChanged(QString category); //Top-tab view - void on_listViewStartTabAccelerationCategories_clicked(QModelIndex index); //Start-tab view - void updateComboBoxStartTabUnits(QString unit); //Start-tab view - void openResultView(); - void on_buttonTopRefresh_clicked(); //Top-tab view: button - void on_autoStartButton_clicked(); //Start-tab view: button - void after_timeout(); - void updateUserName(); - void regUserToServer(); - void userLogin(); - void readAccelerometerData(); - void handleCheckPoint(double totalTime, double currentSpeed); - void setCategoryCompoBox(); //Top-tab - void showTop10(); - -}; - -#endif // CARMAINWINDOW_H diff --git a/Client/carmainwindow.ui b/Client/carmainwindow.ui deleted file mode 100644 index 8c0e7f0..0000000 --- a/Client/carmainwindow.ui +++ /dev/null @@ -1,698 +0,0 @@ - - - CarMainWindow - - - - 0 - 0 - 800 - 480 - - - - Speed freak - - - - - - 0 - 0 - 781 - 361 - - - - 4 - - - - Top - - - - - 10 - 210 - 221 - 71 - - - - - Bitstream Charter - 16 - 75 - true - - - - Refresh list - - - - - - 360 - 10 - 411 - 311 - - - - - Bitstream Charter - 10 - - - - QListView::LeftToRight - - - - - - 10 - 10 - 341 - 141 - - - - - - - - Bitstream Charter - 16 - - - - Category: - - - - - - - - - - - - 380 - 10 - 371 - 311 - - - - - 9 - - - - TopList - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - Start - - - - - 20 - 10 - 251 - 301 - - - - - - - 320 - 10 - 161 - 301 - - - - - - - Start: - - - - - - - - - - Stop: - - - - - - - - - - Unit: - - - - - - - - - - - - 520 - 120 - 201 - 71 - - - - - Bitstream Charter - 16 - 75 - true - - - - Auto start - - - - - - 520 - 230 - 201 - 71 - - - - - Bitstream Charter - 16 - 75 - true - - - - Manual start - - - - - - 520 - 20 - 201 - 61 - - - - - Bitstream Charter - 16 - 75 - true - - - - Calibrate - - - - - - Settings - - - - - 20 - 30 - 531 - 71 - - - - User: - - - - - - 20 - 140 - 201 - 71 - - - - Set User - - - - - - Measure - - - - - 20 - 230 - 160 - 71 - - - - Abort - - - - - - 20 - 10 - 261 - 41 - - - - - Bitstream Charter - 75 - true - - - - Accelerate to 40 km/h - - - - - - 470 - 10 - 101 - 41 - - - - - Bitstream Charter - 75 - true - - - - Results: - - - - - false - - - - 470 - 230 - 160 - 71 - - - - Send result - - - false - - - - - - 20 - 70 - 60 - 41 - - - - - Bitstream Charter - 14 - - - - Time: - - - - - - 129 - 60 - 71 - 61 - - - - - Bitstream Charter - 24 - 75 - true - - - - 0 - - - - - - 20 - 160 - 81 - 41 - - - - - Bitstream Charter - 14 - - - - Speed: - - - - - - 129 - 160 - 51 - 41 - - - - - Bitstream Charter - 24 - 75 - true - - - - 0 - - - - - - 470 - 60 - 71 - 61 - - - - - Bitstream Charter - 14 - - - - Time: - - - - - - 570 - 60 - 61 - 61 - - - - - Bitstream Charter - 24 - 75 - true - - - - 0 - - - - - - 470 - 140 - 161 - 71 - - - - Show diagram - - - - - - Route - - - - - 20 - 20 - 191 - 41 - - - - - Bitstream Charter - 16 - 75 - true - - - - GPS on - - - - 16 - 16 - - - - - - - 10 - 80 - 201 - 61 - - - - - Bitstream Charter - 16 - 75 - true - - - - Start recording - - - - - - 10 - 160 - 201 - 61 - - - - - Bitstream Charter - 16 - 75 - true - - - - Draw route - - - - - - 310 - 16 - 461 - 291 - - - - - - - GPS Status - - - - - - - GPS Update time - - - - - - - GPS Time - - - - - - - Latitude - - - - - - - Longitude - - - - - - - Speed - - - - - - - Acceleration - - - - - - - Rec status - - - - - - - - - 10 - 240 - 201 - 61 - - - - - Bitstream Charter - 16 - 75 - true - - - - Send route - - - - - - - - 520 - 370 - 231 - 41 - - - - Registrate - - - - - - 20 - 370 - 461 - 41 - - - - - - - - - - - 0 - 0 - 800 - 25 - - - - - - TopToolBarArea - - - false - - - - - - - - diff --git a/Client/categorylist.cpp b/Client/categorylist.cpp deleted file mode 100644 index 243c5d3..0000000 --- a/Client/categorylist.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Categorylist - * - * @author Olavi Pulkkinen - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include -#include "categorylist.h" - -/** - *Constructor of this class. - */ -CategoryList::CategoryList() -{ - -} - -/** - *Destructor of this class. Should be used to release all allocated resources. - */ -CategoryList::~CategoryList() -{ -} - -/** - *This is return function. - *@return QStringList categoryList - */ -QStringList CategoryList::getCategoryList() -{ - qDebug() << "_getCategoryList" ; - return categoryList; -} - -/** - *Append an item in the end of the categorylist. - *@param Item. - */ -void CategoryList::appendCategoryList(QString item) -{ - categoryList.append(item); -} - -/** - *Input an item into the categorylist. - *@param Index. - *@param Item to be appended. - */ -void CategoryList::fillCategoryList(int index, QString item) -{ - categoryList.insert(index, item); -} - -/** - *Show an item of the categorylist. - *@param Index. - */ -QString CategoryList::itemOfCategoryList(int index) -{ - return categoryList.at(index); -} - -/** - *Clear categorylist. - */ -void CategoryList::clearCategoryList() -{ - categoryList.clear(); -} - -/** - *Read size of categorylist. - */ -int CategoryList::sizeOfCategoryList() -{ - return categoryList.size(); -} - -/** - *Append an item in the end of the categoryelementable. - *@param Index. - *@param Description of category. - *@param Unit. - *@param Category. - */ -void CategoryList::appendCats(int ind, QString des, QString uni, QString cat) -{ - cats[ind].description = des; - cats[ind].unit = uni; - cats[ind].category = cat; -} - -/** - *Clear categs. - */ -QString CategoryList::desOfCats(int ind) -{ - return cats[ind].description; -} - -/** - *Clear cats. - */ -void CategoryList::clearCats() -{ - for(int i = 0; i < 10; i++) - { - cats[i].description.clear(); - cats[i].unit.clear(); - cats[i].category.clear(); - } -} - -/** - *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) -{ - qDebug() << "_getTopList"; - - if(!(top10List.isEmpty())) - { - return top10List; - } - else - { - QString emptyStr(""); - qDebug() << "_getTopList: Category not found"; - return emptyStr; - } -} - diff --git a/Client/categorylist.h b/Client/categorylist.h deleted file mode 100644 index a03586e..0000000 --- a/Client/categorylist.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Categorylist - * - * @author Olavi Pulkkinen - * @author Tiina Kivilinna-Korhola - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef CATEGORYLIST_H -#define CATEGORYLIST_H - -#include - -class CategoryList : public QObject -{ -public: - CategoryList(); - ~CategoryList(); - QString top10List; - - QStringList getCategoryList(); - void fillCategoryList(int index, QString item); - void appendCategoryList(QString item); - QString itemOfCategoryList(int index); - QString getTopList( QString category, int size); - void clearCategoryList(); - int sizeOfCategoryList(); - void appendCats(int ind, QString des, QString uni, QString cat); - void clearCats(); - QString desOfCats(int i); - -private: - QStringList categoryList; //Stores categories. categoryList is routed to UI. - typedef struct { - QString category; //name of category variable - QString description; //verbal description of category - QString unit; //km/h, miles/h - } categoryElements; - categoryElements cats[10]; - -}; - -#endif // CATEGORYLIST_H diff --git a/Client/creditsdialog.cpp b/Client/creditsdialog.cpp new file mode 100644 index 0000000..83a4036 --- /dev/null +++ b/Client/creditsdialog.cpp @@ -0,0 +1,30 @@ +#include "creditsdialog.h" +#include "ui_creditsdialog.h" + +#include +#include + +CreditsDialog::CreditsDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::CreditsDialog) +{ + ui->setupUi(this); + this->setWindowTitle("Credits"); +} + +CreditsDialog::~CreditsDialog() +{ + delete ui; +} + +void CreditsDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} diff --git a/Client/creditsdialog.h b/Client/creditsdialog.h new file mode 100644 index 0000000..ab26e76 --- /dev/null +++ b/Client/creditsdialog.h @@ -0,0 +1,25 @@ +#ifndef CREDITSDIALOG_H +#define CREDITSDIALOG_H + +#include + +namespace Ui { + class CreditsDialog; +} + +class CreditsDialog : public QDialog { + Q_OBJECT +public: + CreditsDialog(QWidget *parent = 0); + ~CreditsDialog(); + +protected: + void changeEvent(QEvent *e); + +private: + Ui::CreditsDialog *ui; + +private slots: +}; + +#endif // CREDITSDIALOG_H diff --git a/Client/creditsdialog.ui b/Client/creditsdialog.ui new file mode 100644 index 0000000..dc89027 --- /dev/null +++ b/Client/creditsdialog.ui @@ -0,0 +1,188 @@ + + + CreditsDialog + + + + 0 + 0 + 800 + 480 + + + + Dialog + + + + + 20 + 20 + 761 + 61 + + + + + 40 + + + + SpeedFreak + + + Qt::AlignCenter + + + + + + 80 + 90 + 661 + 51 + + + + The following people have contributed to this project: + + + Qt::AlignCenter + + + + + + 20 + 150 + 741 + 201 + + + + + + + + 10 + + + + Kai Rasilainen + + + Qt::AlignCenter + + + + + + + + 10 + + + + Artem Daniliants + + + Qt::AlignCenter + + + + + + + + 10 + + + + Rikhard Kuutti + + + Qt::AlignCenter + + + + + + + + 10 + + + + Toni Jussila + + + Qt::AlignCenter + + + + + + + + 10 + + + + Jukka Kurttila + + + Qt::AlignCenter + + + + + + + + 10 + + + + Tiina Kivilinna-Korhola + + + Qt::AlignCenter + + + + + + + + 10 + + + + Janne Änäkkälä + + + Qt::AlignCenter + + + + + + + + 10 + + + + Olavi Pulkkinen + + + Qt::AlignCenter + + + + + + + + + diff --git a/Client/gpsdata.cpp b/Client/gpsdata.cpp deleted file mode 100644 index 14a199c..0000000 --- a/Client/gpsdata.cpp +++ /dev/null @@ -1,272 +0,0 @@ -/* - * GPS data - * - * @author Toni Jussila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "gpsdata.h" - -/** - *Default constructor of this class. - */ -GPSData::GPSData(Maemo5Location *maemo5location) -{ - location = maemo5location; - - connect(location,SIGNAL(agnss()),this,SLOT(agnss())); - connect(location,SIGNAL(awcp()),this,SLOT(awcp())); - connect(location,SIGNAL(locationUpdated()),this,SLOT(locationUpdated())); - connect(location,SIGNAL(gps_connected()),this,SLOT(gpsConnected())); - connect(location,SIGNAL(gps_disconnected()),this,SLOT(gpsDisconnected())); - connect(location,SIGNAL(gps_error(int)),this,SLOT(gpsError())); - connect(location,SIGNAL(gpsd_running()),this,SLOT(gpsdRunning())); - connect(location,SIGNAL(gpsd_stopped()),this,SLOT(gpsdStopped())); - - gpsTimer = new QTimer(); - gpsTimeMS = 0; - connect(gpsTimer, SIGNAL(timeout()),this, SLOT(gpsTimerTimeout())); - - resetAll(); -} - -/** - *Destructor of this class. Deletes all dynamic objects and sets them to NULL. - */ -GPSData::~GPSData() -{ - delete location; - location = NULL; -} - -void GPSData::resetAll() -{ - satellitesInUse = 0; - satellitesInView = 0; - signalStrength = 0; - latitude = 0; - longitude = 0; - time = 0; - ept = 0; - eph = 0; - altitude = 0; - epv = 0; - track = 0; - epd = 0; - speed = 0; - eps = 0; - climb = 0; - epc = 0; - - recordingStatus = false; - roundCounter = 0; -} - -/** - *This slot function is called when GPS update location. - */ -void GPSData::agnss() -{ - //satellitesInUse = QString::number(location->getSatellitesInUse()); //Returns number of satellites in use. - //satellitesInView = QString::number(location->getSatellitesInView());//Returns number of satellites in view. - //signalStrength = QString::number(location->getSignalStrength()); //Returns average signal strength of satellites which are in use. - //gpsOnline = QString::number(location->getGpsOnline()); //Returns gsp online - //ept = QString::number(location->getEpt()); //Returns time accuracy in seconds. - //eph = QString::number(location->getEph()); //Returns horizontal position accuracy in cm. - //track = QString::number(location->getTrack()); //Returns direction of motion in degrees(0-359). - //epd = QString::number(location->getEpd()); //Returns track accuracy in degrees. - //climb = QString::number(location->getClimb()); //Returns current rate of climb in m/s. - //epc = QString::number(location->getEpc()); //Returns climb accuracy in m/s. - //location->distance_between_two_points(double latitude_s, double longitude_s, double latitude_f, double longitude_f); - //time = location->getTime();//Returns timestamp of the update in seconds. - - //If route recording true - if ( recordingStatus == true ) - { - latitude = location->getLatitude(); //Returns latitude. - longitude = location->getLongitude(); //Returns longitude. - altitude = location->getAltitude(); //Returns fix altitude in meters. - epv = location->getEpv(); //Returns altitude accuracy in meters. - speed = location->getSpeed(); //Returns current speed in km/h. - eps = location->getEps(); //Returns speed accuracy in km/h. - - gpsTimer->start(1); - - //If first round - if (roundCounter == 0) - { - saveRoute(); - } - - else - { - latitudeNow.sprintf("%.4f", latitude); //Latitude now to string - longitudeNow.sprintf("%.4f", longitude);//Longitude now to string - latitudePrevious.sprintf("%.4f", gpsDataArray[0]); //Previous latitude to string - longitudePrevious.sprintf("%.4f", gpsDataArray[1]); //Previous longitude to string - - //If latitude or longitude change - if ( latitudeNow != latitudePrevious || longitudeNow != longitudePrevious ) - { - saveRoute(); - } - } - } -} - -/** - *This slot function is called when gprs update location. - */ -void GPSData::awcp() -{ - -} - -/** - *This slot function is called when . - */ -void GPSData::locationUpdated() -{ - -} - -/** - *This slot function is called when . - */ -void GPSData::gpsConnected() -{ - -} - -/** - *This slot function is called when . - */ -void GPSData::gpsDisconnected() -{ - -} - -/** - *This slot function is called when . - */ -void GPSData::gpsError() -{ - -} - -/** - *This slot function is called when . - */ -void GPSData::gpsdRunning() -{ - -} - -/** - *This slot function is called when . - */ -void GPSData::gpsdStopped() -{ - -} - -/** - *This function start route recording. - *@param QString time recording start time. - */ -void GPSData::startRouteRecording(QString time) -{ - if (recordingStatus == false) - { - routeStartTime = time; - recordingStatus = true; - roundCounter = 0; - } -} - -/** - *This function stop route recording. - *@param QString time recording stop time. - */ -void GPSData::stopRouteRecording(QString time) -{ - if (recordingStatus == true) - { - routeStopTime = time; - recordingStatus = false; - roundCounter = 0; - saveRoute(); - } -} - -/** - *This slot function is called when gps timer timeout(10s). - */ -void GPSData::gpsTimerTimeout() -{ - gpsTimeMS++; -} - -/** - *This function save route to .txt file. - */ -void GPSData::saveRoute() -{ - QFile file("route" + routeStartTime + ".txt"); - QTextStream route(&file); - - if ( recordingStatus == true ) - { - //First round. - if ( roundCounter == 0 ) - { - if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) - return; - - route << "Start: " << routeStartTime << "\n"; - } - - else - { - if (!file.open(QIODevice::Append | QIODevice::Text)) - return; - } - - gpsDataArray[0] = latitude; - gpsDataArray[1] = longitude; - gpsDataArray[2] = altitude; - gpsDataArray[3] = speed; - roundCounter ++; - - route << " la: " << latitude - << " \t lo: " << longitude - << " \t al: " << altitude - << " \t epv: " << epv - << " \t sp: " << speed - << " \t eps: " << eps - << " \t ms: " << gpsTimeMS - << "\n"; - - gpsTimeMS = 0; - file.close(); - } - - //Final round. - else - { - if (!file.open(QIODevice::Append | QIODevice::Text)) - return; - route << "Stop: " << routeStopTime << "\n"; - file.close(); - } -} - - -/** - *@return RoundCounter, the number of gpsDataArray[][] rows. - */ -int GPSData::getRoundCounter() -{ - return roundCounter; -} diff --git a/Client/gpsdata.h b/Client/gpsdata.h deleted file mode 100644 index 40e49fd..0000000 --- a/Client/gpsdata.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * GPS data - * - * @author Toni Jussila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef GPSDATA_H -#define GPSDATA_H - -#include -#include -#include -#include -#include - -class GPSData : public QObject -{ - Q_OBJECT -public: - GPSData(Maemo5Location *maemo5location); - ~GPSData(); - void startRouteRecording(QString time); - void stopRouteRecording(QString time); - int roundCounter; //testing, move private!!! - int getRoundCounter(); - -private: - Maemo5Location *location; - void resetAll(); - void saveRoute(); - - int satellitesInUse; //Number of satellites in use. - int satellitesInView;//Number of satellites in view. - int signalStrength; //Average signal strength of satellites which are in use. - double latitude; //Latitude. - double longitude; //Longitude. - double time; //Timestamp of the update in seconds. - double ept; //Time accuracy in seconds. - double eph; //Horizontal position accuracy in cm. - double altitude; //Fix altitude in meters. - double epv; //Altitude accuracy in meters. - double track; //Direction of motion in degrees(0-359). - double epd; //Track accuracy in degrees. - double speed; //Current speed in km/h. - double eps; //Speed accuracy in km/h. - double climb; //Current rate of climb in m/s. - double epc; //Climb accuracy in m/s. - QString routeStartTime; - QString routeStopTime; - QString latitudeNow; - QString longitudeNow; - QString latitudePrevious; - QString longitudePrevious; - - bool recordingStatus; - //int roundCounter; - double gpsDataArray[4]; - QTimer *gpsTimer; - int gpsTimeMS; - -private slots: - void agnss(); - void awcp(); - void locationUpdated(); - void gpsConnected(); - void gpsDisconnected(); - void gpsError(); - void gpsdRunning(); - void gpsdStopped(); - void gpsTimerTimeout(); - -}; - -#endif // GPSDATA_H diff --git a/Client/httpclient.cpp b/Client/httpclient.cpp deleted file mode 100644 index 98aa98a..0000000 --- a/Client/httpclient.cpp +++ /dev/null @@ -1,362 +0,0 @@ -#include -#include -#include "httpclient.h" -#include "carmainwindow.h" - - -/** - *@brief Constructor, connects object to GUI - *@param Pointer to carmainwindow, which is temporarily used during development - */ -HttpClient::HttpClient(CarMainWindow *myCarw) -{ - myMainw = myCarw; - netManager = new QNetworkAccessManager(); - myXmlwriter = new XmlWriter(); - myXmlreader = new XmlReader(); -} - -/** - *@brief Destructor - */ -HttpClient::~HttpClient() -{ - -} - -/** - *@brief Sends registration information to the server in xml format. - *Reads user name, password and emaol address from resuldialogs internal variables. - */ -void HttpClient::requestRegistration() -{ - qDebug() << "_requestRegistration" ; - qDebug() << myMainw->myRegistration->getUserName() << "+" << myMainw->myRegistration->getPassword() << "+" << myMainw->myRegistration->getEmail(); - - QBuffer *regbuffer = new QBuffer(); - QUrl qurl("http://api.speedfreak-app.com/api/register"); - QNetworkRequest request(qurl); - qDebug() << qurl.toString(); - QNetworkReply *currentDownload; - - regbuffer->open(QBuffer::ReadWrite); - myXmlwriter->writeRegistering(regbuffer, - myMainw->myRegistration->getUserName(), - myMainw->myRegistration->getPassword(), - myMainw->myRegistration->getEmail()); - qDebug() << "carmainwindow: regbuffer->data(): " << regbuffer->data(); - - 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))); - myMainw->setLabelInfoToUser("Reguesting registration from server"); - - regbuffer->close(); -} - -/** - *@brief Sends result(s) to the server in xml format. - *Send authentication information in the header. - */ -void HttpClient::sendResultXml(QString category) -{ - qDebug() << "_sendResultXml"; - - QBuffer *xmlbuffer = new QBuffer(); - - QUrl qurl("http://api.speedfreak-app.com/api/update/" + category); - qDebug() << qurl.toString(); - QNetworkRequest request(qurl); - QNetworkReply *currentDownload; - - xmlbuffer->open(QBuffer::ReadWrite); - myXmlwriter->writeResult(xmlbuffer); - qDebug() << "carmainwindow: xmlbuffer->data(): " << xmlbuffer->data(); - - QString credentials = myMainw->myLogin->getUserName() + ":" + myMainw->myLogin->getPassword(); - credentials = "Basic " + credentials.toAscii().toBase64(); - request.setRawHeader(QByteArray("Authorization"),credentials.toAscii()); - - currentDownload = netManager->post(request, ("xml=" + xmlbuffer->data())); - connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfResult())); - //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError))); - myMainw->setLabelInfoToUser("Sending result to server"); - - xmlbuffer->close(); -} - -/** - *@brief Sends route to the server in xml format. - *Send authentication information in the header. - *@todo Check destination URL. - */ -void HttpClient::sendRouteXml() -{ - qDebug() << "_sendRouteXml"; - - QString filename = "route.xml"; - QFile file(filename); - if (!file.open(QFile::ReadOnly)) { - qDebug() << "_sendRouteXml file.open() fail"; - return; - } - - QUrl qurl("http://api.speedfreak-app.com/api/update/route"); - qDebug() << qurl.toString(); - QNetworkRequest request(qurl); - QNetworkReply *currentDownload; - - QString credentials = myMainw->myLogin->getUserName() + ":" + myMainw->myLogin->getPassword(); - credentials = "Basic " + credentials.toAscii().toBase64(); - request.setRawHeader(QByteArray("Authorization"),credentials.toAscii()); - - currentDownload = netManager->post(request, ("xml=" + file.readAll())); - connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfRoute())); - //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError))); - myMainw->setLabelInfoToUser("Sending route to server"); - - file.close(); -} - -/** - *@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. - */ -void HttpClient::requestTopList(QString category, QString limit) -{ - qDebug() << "_requestTopList" ; - - QString urlBase = "http://api.speedfreak-app.com/api/results/"; - QUrl qurl(urlBase + category + "/" + limit); - qDebug() << qurl.toString(); - QNetworkRequest request(qurl); - QNetworkReply *currentDownload; - - QString credentials = myMainw->myLogin->getUserName() + ":" + myMainw->myLogin->getPassword(); - credentials = "Basic " + credentials.toAscii().toBase64(); - request.setRawHeader(QByteArray("Authorization"),credentials.toAscii()); - - currentDownload = netManager->post(request, ("data=" )); - connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfToplist())); - //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError))); - myMainw->setLabelInfoToUser("Reguesting top10 list from server"); -} - - -/** - *@brief Request categories list from the server. - *Send authentication information in the header. - */ -void HttpClient::requestCategories() -{ - qDebug() << "_requestCategories" ; - - QUrl qurl("http://api.speedfreak-app.com/api/categories/"); - qDebug() << qurl.toString(); - QNetworkRequest request(qurl); - QNetworkReply *currentDownload; - - QString credentials = myMainw->myLogin->getUserName() + ":" + myMainw->myLogin->getPassword(); - credentials = "Basic " + credentials.toAscii().toBase64(); - request.setRawHeader(QByteArray("Authorization"),credentials.toAscii()); - - currentDownload = netManager->post(request, ("data=" )); - connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfCategories())); - //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError))); - myMainw->setLabelInfoToUser("Reguesting categories from server"); -} - - -/** - *@brief Check that username and password exist on the server. - *Send authentication information in the header. - */ -void HttpClient::checkLogin() -{ - qDebug() << "_checkLogin"; - - QUrl qurl("http://api.speedfreak-app.com/api/login/"); - qDebug() << qurl.toString(); - QNetworkRequest request(qurl); - QNetworkReply *currentDownload; - - QString credentials = myMainw->myLogin->getUserName() + ":" + myMainw->myLogin->getPassword(); - credentials = "Basic " + credentials.toAscii().toBase64(); - request.setRawHeader(QByteArray("Authorization"),credentials.toAscii()); - - currentDownload = netManager->post(request, ("data=" )); - connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfLogin())); - //connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),myMainw,SLOT(errorFromServer(QNetworkReply::NetworkError))); - myMainw->setLabelInfoToUser("Checking login validity from server"); -} - - -/** - *@brief React to servers responce after result has been sent. - */ -void HttpClient::ackOfResult() -{ - qDebug() << "_ackOfResult"; - - myMainw->setLabelInfoToUser(""); - - QNetworkReply* reply = qobject_cast(sender()); - - QNetworkReply::NetworkError errorcode; - errorcode = reply->error(); - if(errorcode != 0) { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to result sending ",reply->errorString()); - } - else { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to result sending", "Result received " + reply->readAll()); - } -} - -/** - *@brief React to servers responce after route has been sent. - */ -void HttpClient::ackOfRoute() -{ - qDebug() << "_ackOfRoute"; - - myMainw->setLabelInfoToUser(""); - - QNetworkReply* reply = qobject_cast(sender()); - - QNetworkReply::NetworkError errorcode; - errorcode = reply->error(); - if(errorcode != 0) { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to route sending ",reply->errorString()); - } - else { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to route sending", "Route received " + reply->readAll()); - } -} - -/** - *@brief React to servers responce after registration has been sent. - *@todo Implement consequencies of reply. - */ -void HttpClient::ackOfRegistration() -{ - qDebug() << "_ackOfRegistration"; - - myMainw->setLabelInfoToUser(""); - - QNetworkReply* reply = qobject_cast(sender()); - - QNetworkReply::NetworkError errorcode; - errorcode = reply->error(); - if(errorcode != 0) { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to registration",reply->readAll()); - } - else { - qDebug() << "errorcode=0" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to registration", "User registration " + reply->readAll()); - } -} - - -/** - *@brief React to servers responce after request for categories has been sent. - */ -void HttpClient::ackOfCategories() -{ - qDebug() << "_ackOfCategories"; - - myMainw->setLabelInfoToUser(""); - - QNetworkReply* reply = qobject_cast(sender()); - myXmlreader->xmlReadCategories(reply); - - QNetworkReply::NetworkError errorcode; - errorcode = reply->error(); - if(errorcode != 0) { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to requesting categories",reply->errorString()); - } - else { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to requesting categories ", "OK"); - } -} - - -/** - *@brief React to servers responce after request of TopList in certain category has been sent. - */ -void HttpClient::ackOfLogin() -{ - qDebug() << "_ackOffLogin"; - - myMainw->setLabelInfoToUser(""); - - QNetworkReply* reply = qobject_cast(sender()); - - QNetworkReply::NetworkError errorcode; - errorcode = reply->error(); - if(errorcode != 0) { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server does not recognize your username. Please registrate.",reply->errorString()); - } - else { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to login", "User login " + reply->readAll()); - } -} - - -/** - *@brief Reports errors, when server has sent error signal. - */ -void HttpClient::errorFromServer(QNetworkReply::NetworkError errorcode) -{ - qDebug() << "_errorFromServer"; - - myMainw->setLabelInfoToUser(""); - - QNetworkReply* reply = qobject_cast(sender()); - - if(errorcode != 0) { - qDebug() << "errorcode:" << errorcode; - //Note that errors are already reported on other each functions for server communication - //QMessageBox::about(myMainw, "Server reported an error", reply->errorString()); - } - else { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - qDebug() << reply->readAll(); - } -} - - -/** - *@brief React to servers responce after request of TopList in certain category has been sent. - */ -void HttpClient::ackOfToplist() -{ - qDebug() << "_ackOfToplist"; - - myMainw->setLabelInfoToUser(""); - - QNetworkReply* reply = qobject_cast(sender()); - myXmlreader->xmlReadTop10Results(reply); - - QNetworkReply::NetworkError errorcode; - errorcode = reply->error(); - if(errorcode != 0) { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to requesting top 10 list",reply->errorString()); - } - else { - qDebug() << "errorcode:" << errorcode << reply->errorString(); - QMessageBox::about(myMainw, "Server reply to requesting top 10 list", "OK " + reply->readAll()); - } -} - diff --git a/Client/httpclient.h b/Client/httpclient.h deleted file mode 100644 index bdacf0e..0000000 --- a/Client/httpclient.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Http client Connects application to server. - * - * @author Tiina Kivilinna-Korhola - * @copyright (c) 2010 Speed Freak team - * license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef HTTPCLIENT_H -#define HTTPCLIENT_H - -#include -#include -#include -#include "xmlwriter.h" -#include "xmlreader.h" -class CarMainWindow; - - - -class HttpClient : public QObject { - Q_OBJECT -public: - HttpClient(CarMainWindow *myCarw); - ~HttpClient(); - XmlWriter *myXmlwriter; - XmlReader *myXmlreader; - -private: - CarMainWindow *myMainw; - QNetworkAccessManager *netManager; - -public slots: - void requestRegistration(); - void checkLogin(); - void sendResultXml(QString category); - void sendRouteXml(); - void requestTopList(QString category, QString limit); - void requestCategories(); - void ackOfResult(); - void ackOfRoute(); - void ackOfRegistration(); - void ackOfCategories(); - void ackOfToplist(); - void ackOfLogin(); - void errorFromServer(QNetworkReply::NetworkError); - -}; - -#endif // HTTPCLIENT_H diff --git a/Client/loginwindow.cpp b/Client/loginwindow.cpp deleted file mode 100644 index 330b782..0000000 --- a/Client/loginwindow.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Loginwindow class to maintain username for user - * - * @author Olavi Pulkkinen - * @author - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "loginwindow.h" -#include "ui_loginwindow.h" - -LoginWindow::LoginWindow(QWidget *parent) : - QDialog(parent), - ui(new Ui::LoginWindow) -{ - ui->setupUi(this); - this->setWindowTitle("Setting username"); -} - -LoginWindow::~LoginWindow() -{ - delete ui; -} - -void LoginWindow::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -void LoginWindow::on_cancelPushButton_clicked() -{ - close(); -} - -void setUser(QString uN, QString pW); - -void LoginWindow::on_loginPushButton_clicked() -{ - this->username = ui->userNameLineEdit->text(); - this->password = ui->passwordLineEdit->text(); - - emit userNameChanged(); - close(); -} - -void LoginWindow::setUserName(QString username) -{ - this->username = username; -} - -void LoginWindow::setPassword(QString password) -{ - this->password = password; -} - -QString LoginWindow::getUserName() -{ - return this->username; -} - -QString LoginWindow::getPassword() -{ - return this->password; -} - - - - - diff --git a/Client/loginwindow.h b/Client/loginwindow.h deleted file mode 100644 index 08fb43a..0000000 --- a/Client/loginwindow.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * LoginWindow class - * - * @author Olavi Pulkkinen - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef LOGINWINDOW_H -#define LOGINWINDOW_H - -#include - -namespace Ui { - class LoginWindow; -} - -class LoginWindow : public QDialog { - Q_OBJECT -public: - LoginWindow(QWidget *parent = 0); - ~LoginWindow(); - void setUserName(QString username); - void setPassword(QString password); - QString getUserName(); - QString getPassword(); - -protected: - void changeEvent(QEvent *e); - -private: - Ui::LoginWindow *ui; - QString username; - QString password; - -private slots: - void on_loginPushButton_clicked(); - void on_cancelPushButton_clicked(); -signals: - void userNameChanged(); -}; - -#endif // LOGINWINDOW_H diff --git a/Client/loginwindow.ui b/Client/loginwindow.ui deleted file mode 100644 index 4857728..0000000 --- a/Client/loginwindow.ui +++ /dev/null @@ -1,101 +0,0 @@ - - - LoginWindow - - - - 0 - 0 - 600 - 400 - - - - LoginWindow - - - - - 170 - 230 - 91 - 41 - - - - Set - - - - - - 330 - 230 - 91 - 41 - - - - Cancel - - - - - - 220 - 60 - 311 - 51 - - - - 12 - - - - - - 70 - 140 - 141 - 31 - - - - Password: - - - - - - 70 - 70 - 141 - 31 - - - - Username: - - - - - - 220 - 130 - 311 - 51 - - - - 255 - - - QLineEdit::Password - - - - - - - diff --git a/Client/maemo5location.cpp b/Client/maemo5location.cpp deleted file mode 100755 index a8065fd..0000000 --- a/Client/maemo5location.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Maemo5Location - * - * @author Toni Jussila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -//#ifdef Q_WS_MAEMO_5 -#include "maemo5locationprivate.h" -#include "maemo5location.h" - -/** - *Default constructor of this class. - *@param QObject pointer to parent object. By default the value is NULL. - */ -Maemo5Location::Maemo5Location(QObject* parent):QObject(parent) -{ - ptr = new Maemo5LocationPrivate(this); - - connect(ptr, SIGNAL(agnss()), this, SIGNAL(agnss())); - connect(ptr, SIGNAL(awcp()), this, SIGNAL(awcp())); - connect(ptr, SIGNAL(locationUpdated()), this, SIGNAL(locationUpdated())); - connect(ptr, SIGNAL(gps_connected()), this, SIGNAL(gps_connected())); - connect(ptr, SIGNAL(gps_disconnected()), this, SIGNAL(gps_disconnected())); - connect(ptr, SIGNAL(gps_error(int)), this, SIGNAL(gps_error(int))); - connect(ptr, SIGNAL(gpsd_running()), this, SIGNAL(gpsd_running())); - connect(ptr, SIGNAL(gpsd_stopped()), this, SIGNAL(gpsd_stopped())); -} - -/** - *Destructor of this class. Should be used to release all allocated resources. - */ -Maemo5Location::~Maemo5Location() -{ - delete ptr; -} - -/** - *Start polling gps. - */ -void Maemo5Location::startPollingGPS() -{ - ptr->get_agnss(); -} - -/** - *Stop polling gps. - */ -void Maemo5Location::stopPollingGPS() -{ - ptr->stop(); -} - -/** - *Returns number of satellites in use. - */ -int Maemo5Location::getSatellitesInUse() -{ - return ptr->get_satellites_in_use(); -} - -/** - *Returns number of satellites in view. - */ -int Maemo5Location::getSatellitesInView() -{ - return ptr->get_satellites_in_view(); -} - -/** - *Returns average signal strength of satellites which are in use. - */ -int Maemo5Location::getSignalStrength() -{ - return ptr->get_signal_strength(); -} - -/** - *Returns gps online. - */ -bool Maemo5Location::getGpsOnline() -{ - return ptr->get_gps_online(); -} - -/** - *Returns latitude. - */ -double Maemo5Location::getLatitude() -{ - return ptr->get_lat(); -} - -/** - *Returns longitude. - */ -double Maemo5Location::getLongitude() -{ - return ptr->get_lon(); -} - -/** - *Returns timestamp of the update in seconds. - */ -double Maemo5Location::getTime() -{ - return ptr->get_time(); -} - -/** - *Returns time accuracy in seconds. - */ -double Maemo5Location::getEpt() -{ - return ptr->get_ept(); -} - -/** - *Returns horizontal position accuracy in cm. - */ -double Maemo5Location::getEph() -{ - return ptr->get_eph(); -} - -/** - *Returns fix altitude in meters. - */ -double Maemo5Location::getAltitude() -{ - return ptr->get_altitude(); -} - -/** - *Returns altitude accuracy in meters. - */ -double Maemo5Location::getEpv() -{ - return ptr->get_epv(); -} - -/** - *Returns direction of motion in degrees(0-359). - */ -double Maemo5Location::getTrack() -{ - return ptr->get_track(); -} - -/** - *Returns track accuracy in degrees. - */ -double Maemo5Location::getEpd() -{ - return ptr->get_epd(); -} - -/** - *Returns current speed in km/h. - */ -double Maemo5Location::getSpeed() -{ - return ptr->get_speed(); -} - -/** - *Returns speed accuracy in km/h. - */ -double Maemo5Location::getEps() -{ - return ptr->get_eps(); -} - -/** - *Returns current rate of climb in m/s. - */ -double Maemo5Location::getClimb() -{ - return ptr->get_climb(); -} - -/** - *Returns climb accuracy in m/s. - */ -double Maemo5Location::getEpc() -{ - return ptr->get_epc(); -} - -/** - *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 - */ -double Maemo5Location::distance_between_two_points(double latitude_s, double longitude_s, double latitude_f, double longitude_f) -{ - return ptr->distance_between_two_points(latitude_s, longitude_s, latitude_f, longitude_f); -} diff --git a/Client/maemo5location.h b/Client/maemo5location.h deleted file mode 100755 index 7f376f0..0000000 --- a/Client/maemo5location.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Maemo5Location - * - * @author Toni Jussila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef MAEMO5LOCATION_H -#define MAEMO5LOCATION_H - -#include - -class Maemo5LocationPrivate; - -class Maemo5Location : public QObject -{ - Q_OBJECT -public: - Maemo5Location(QObject* parent = 0); - ~Maemo5Location(); - - void startPollingGPS(); - void stopPollingGPS(); - int getSatellitesInUse(); - int getSatellitesInView(); - int getSignalStrength(); - bool getGpsOnline(); - double getLatitude(); - double getLongitude(); - double getTime(); - double getEpt(); - double getEph(); - double getAltitude(); - double getEpv(); - double getTrack(); - double getEpd(); - double getSpeed(); - double getEps(); - double getClimb(); - double getEpc(); - double distance_between_two_points(double latitude_s, double longitude_s, double latitude_f, double longitude_f); - -signals: - void awcp(); - void agnss(); - void locationUpdated(); - void gps_connected(); - void gps_disconnected(); - void gps_error(int); - void gpsd_running(); - void gpsd_stopped(); - -private: - Maemo5LocationPrivate* ptr; -}; - -#endif // MAEMO5LOCATION_H diff --git a/Client/maemo5locationprivate.cpp b/Client/maemo5locationprivate.cpp deleted file mode 100755 index d8b3b5d..0000000 --- a/Client/maemo5locationprivate.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Maemo5LocationPrivate - * - * @author Toni Jussila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "maemo5locationprivate.h" - -/** - *Default constructor of this class. - *@param Maemo5Location pointer to public interface. - */ -Maemo5LocationPrivate::Maemo5LocationPrivate(Maemo5Location* location):QObject(location) -{ - //Initialize variables - gps_online = false; - usegps = -1; - resetAll(); - //Get gps control object - control = location_gpsd_control_get_default(); - //create gps device - device = (LocationGPSDevice*) g_object_new(LOCATION_TYPE_GPS_DEVICE, NULL); - - g_signal_connect(device, "changed", G_CALLBACK(gps_data_changed), this); - g_signal_connect(device, "connected", G_CALLBACK(gps_connected_func), this); - g_signal_connect(device, "disconnected", G_CALLBACK(gps_disconnected_func), this); - - g_signal_connect(control, "error-verbose", G_CALLBACK(gps_error_func), this); - g_signal_connect(control, "gpsd_running", G_CALLBACK(gpsd_running_func), this); - g_signal_connect(control, "gpsd_stopped", G_CALLBACK(gpsd_running_func), this); - -} -/** - *Destructor of this class. Should be used to release all allocated resources. - */ -Maemo5LocationPrivate::~Maemo5LocationPrivate() -{ - delete device; - delete control; -} - -/** - *This function is used to start to poll with gprs - */ -void Maemo5LocationPrivate::get_acwp() -{ - g_object_set(G_OBJECT(control), "preferred-method", LOCATION_METHOD_ACWP, NULL); - usegps = 0; - restart(); -} - -/** - *This function starts to poll via gps interface - */ -void Maemo5LocationPrivate::get_agnss() -{ - g_object_set(G_OBJECT(control), "preferred-method", LOCATION_METHOD_AGNSS, NULL); - usegps = 1; - restart(); -} - -/** - *Stop polling gps - */ -void Maemo5LocationPrivate::stop() -{ - location_gpsd_control_stop(control); -} - -/** - *Stop and restart polling - */ -void Maemo5LocationPrivate::restart() -{ - location_gpsd_control_stop(control); - location_gpsd_control_start(control); -} - -/** - *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) -{ - emit gps->gps_connected(); -} - -/** - *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) -{ - gps->resetAll(); - emit gps->gps_disconnected(); -} - -/** - *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) -{ - emit gps->gpsd_stopped(); -} - -/** - *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) -{ - - switch (error) { - case LOCATION_ERROR_USER_REJECTED_DIALOG: - emit gps->gps_error(0); - g_debug("User didn't enable requested methods"); - break; - case LOCATION_ERROR_USER_REJECTED_SETTINGS: - emit gps->gps_error(1); - g_debug("User changed settings, which disabled location"); - break; - case LOCATION_ERROR_BT_GPS_NOT_AVAILABLE: - emit gps->gps_error(2); - g_debug("Problems with BT GPS"); - break; - case LOCATION_ERROR_METHOD_NOT_ALLOWED_IN_OFFLINE_MODE: - emit gps->gps_error(3); - g_debug("Requested method is not allowed in offline mode"); - break; - case LOCATION_ERROR_SYSTEM: - emit gps->gps_error(4); - g_debug("System error"); - break; - } -} - -/** - *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) -{ - emit gps->gpsd_running(); -} - -/** - *Callback function to catch gps signals. - *@param Pointer to LocationGPSDControl class - *@param Pointer to Maemo5LocationPrivate class - */ -void gps_data_changed(LocationGPSDevice *device, Maemo5LocationPrivate *gps) -{ - //First check that LocationGpsDeviceFix can be found...this data structure contains the location info. - if(gps->device->fix) - { - //Check that there are fields - if(gps->device->fix->fields) - { - //Store values and emit signal - if(gps->device->fix->fields & LOCATION_GPS_DEVICE_LATLONG_SET) - { - gps->latitude = gps->device->fix->latitude; - gps->longitude = gps->device->fix->longitude; - gps->eph = gps->device->fix->eph; - } - - - gps->satellites_in_use = gps->device->satellites_in_use; - gps->satellites_in_view = gps->device->satellites_in_view; - - if(gps->device->fix->fields & LOCATION_GPS_DEVICE_TIME_SET) - { - gps->time = gps->device->fix->time; - gps->ept = gps->device->fix->ept; - } - - if(gps->device->fix->fields & LOCATION_GPS_DEVICE_ALTITUDE_SET) - { - gps->altitude = gps->device->fix->altitude; - gps->epv = gps->device->fix->epv; - } - - if(gps->device->fix->fields & LOCATION_GPS_DEVICE_TRACK_SET) - { - gps->track = gps->device->fix->track; - gps->epd = gps->device->fix->epd; - } - - if(gps->device->fix->fields & LOCATION_GPS_DEVICE_SPEED_SET) - { - gps->speed = gps->device->fix->speed; - gps->eps = gps->device->fix->eps; - } - - if(gps->device->fix->fields & LOCATION_GPS_DEVICE_CLIMB_SET) - { - gps->climb = gps->device->fix->climb; - gps->epc = gps->device->fix->epc; - } - - - // Calculate average signal strength of satellites in use - int temp = 0; - if(gps->satellites_in_use != 0) - { - for(int i=0 ; i < gps->satellites_in_use ; i++) - { - LocationGPSDeviceSatellite *view = (LocationGPSDeviceSatellite*) g_ptr_array_index (gps->device->satellites, i); - temp = temp + view->signal_strength; - } - gps->signal_strength = (temp / gps->satellites_in_use); - } - - - if(gps->usegps == 0) - { - emit gps->awcp(); - } - else if(gps->usegps == 1) - { - emit gps->agnss(); - } - else - { - emit gps->locationUpdated(); - } - } - } - -} - -/** - *Resets all arguments of Maemo5LocationPrivate class. - */ -void Maemo5LocationPrivate::resetAll() -{ - time = 0; - latitude = 0; - longitude = 0; - satellites_in_view = 0; - satellites_in_use = 0; - ept = 0; - eph = 0; - altitude = 0; - epv = 0; - track = 0; - epd = 0; - speed = 0; - eps = 0; - climb = 0; - epc = 0; -} - -/** - *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 - */ -double Maemo5LocationPrivate::distance_between_two_points(double latitude_s, double longitude_s, double latitude_f, double longitude_f) -{ - double distance = 0; - return distance = location_distance_between(latitude_s, longitude_s, latitude_f, longitude_f); -} diff --git a/Client/maemo5locationprivate.h b/Client/maemo5locationprivate.h deleted file mode 100755 index c61d041..0000000 --- a/Client/maemo5locationprivate.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Maemo5LocationPrivate - * - * @author Toni Jussila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef MAEMO5LOCATIONPRIVATE_H -#define MAEMO5LOCATIONPRIVATE_H - -//We have to declare these header file inside extern, since these modules are actually c modules not c++ -extern "C" -{ -#include -#include -#include -} - -#include -#include "maemo5location.h" - -class Maemo5LocationPrivate : public QObject -{ - Q_OBJECT - -public: - Maemo5LocationPrivate(Maemo5Location* location); - ~Maemo5LocationPrivate(); - - void get_acwp(); - void get_agnss(); - - friend void gps_data_changed(LocationGPSDevice *device, Maemo5LocationPrivate *gps); - friend void gps_connected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps); - friend void gps_disconnected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps); - friend void gps_error_func(LocationGPSDControl *control, gint error, Maemo5LocationPrivate *gps); - friend void gpsd_running_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps); - friend void gpsd_stopped_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps); - - static void handleStatus( LocationGPSDeviceStatus status ); - - int get_satellites_in_view() { return satellites_in_view; } - int get_satellites_in_use() { return satellites_in_use; } - int get_signal_strength() { return signal_strength; } - gboolean get_gps_online() { return gps_online; } - double get_lat() { return latitude; } - double get_lon() { return longitude; } - double get_time() { return time; } - double get_ept() { return ept; } - double get_eph() { return eph; } - double get_altitude() { return altitude; } - double get_epv() { return epv; } - double get_track() { return track; } - double get_epd() { return epd; } - double get_speed() { return speed; } - double get_eps() { return eps; } - double get_climb() { return climb; } - double get_epc() { return epc; } - double distance_between_two_points(double latitude_s, double longitude_s, double latitude_f, double longitude_f); - void stop(); - -signals: - void awcp(); - void agnss(); - void locationUpdated(); - void gps_connected(); - void gps_disconnected(); - void gps_error(int); - void gpsd_running(); - void gpsd_stopped(); - -private: - void resetAll(); - //void stop(); - void restart(); - - int satellites_in_view; - int satellites_in_use; - int signal_strength; - gboolean gps_online; - double latitude; - double longitude; - double time; - double ept; - double eph; - double altitude; - double epv; - double track; - double epd; - double speed; - double eps; - double climb; - double epc; - - Maemo5Location* d_ptr; - int usegps; - LocationGPSDControl *control; - LocationGPSDevice *device; -}; - -void gps_data_changed(LocationGPSDevice *device, Maemo5LocationPrivate *gps); -void gps_connected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps); -void gps_disconnected_func(LocationGPSDevice *device, Maemo5LocationPrivate *gps); -void gps_error_func(LocationGPSDControl *control, gint error, Maemo5LocationPrivate *gps); -void gpsd_running_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps); -void gpsd_stopped_func(LocationGPSDControl *control, Maemo5LocationPrivate *gps); - -#endif // MAEMO5LOCATIONPRIVATE_H diff --git a/Client/main.cpp b/Client/main.cpp index baffe78..6e7efd9 100644 --- a/Client/main.cpp +++ b/Client/main.cpp @@ -1,18 +1,10 @@ -/* - * CarMainWindow main class - * - * @author Toni Jussila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - #include -#include "carmainwindow.h" +#include "mainwindow.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); - CarMainWindow w; + MainWindow w; w.show(); return a.exec(); } diff --git a/Client/mainwindow.cpp b/Client/mainwindow.cpp new file mode 100644 index 0000000..81103a4 --- /dev/null +++ b/Client/mainwindow.cpp @@ -0,0 +1,41 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +#include +#include + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); + + creditsDialog = new CreditsDialog; +} + +MainWindow::~MainWindow() +{ + delete ui; +} + +void MainWindow::changeEvent(QEvent *e) +{ + QMainWindow::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void MainWindow::on_pushButtonWWW_clicked() +{ + QDesktopServices::openUrl(QUrl("http://garage.maemo.org/projects/speedfreak/")); +} + +void MainWindow::on_pushButtonCredits_clicked() +{ + creditsDialog->show(); +} diff --git a/Client/mainwindow.h b/Client/mainwindow.h new file mode 100644 index 0000000..0e681f2 --- /dev/null +++ b/Client/mainwindow.h @@ -0,0 +1,30 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include "creditsdialog.h" + +namespace Ui { + class MainWindow; +} + +class MainWindow : public QMainWindow { + Q_OBJECT +public: + MainWindow(QWidget *parent = 0); + ~MainWindow(); + + CreditsDialog *creditsDialog; + +protected: + void changeEvent(QEvent *e); + +private: + Ui::MainWindow *ui; + +private slots: + void on_pushButtonCredits_clicked(); + void on_pushButtonWWW_clicked(); +}; + +#endif // MAINWINDOW_H diff --git a/Client/mainwindow.ui b/Client/mainwindow.ui new file mode 100644 index 0000000..c1137bb --- /dev/null +++ b/Client/mainwindow.ui @@ -0,0 +1,119 @@ + + + MainWindow + + + + 0 + 0 + 800 + 480 + + + + MainWindow + + + + + + 50 + 150 + 130 + 130 + + + + Accelerate + + + + + + 190 + 150 + 130 + 130 + + + + Route + + + + + + 330 + 150 + 130 + 130 + + + + Results + + + + + + 470 + 150 + 130 + 130 + + + + Settings + + + + + + 610 + 150 + 130 + 130 + + + + WWW + + + + + + 640 + 10 + 151 + 41 + + + + Credits + + + + + + + 0 + 0 + 800 + 25 + + + + + + TopToolBarArea + + + false + + + + + + + + diff --git a/Client/measuredialog.cpp b/Client/measuredialog.cpp deleted file mode 100644 index c469a7e..0000000 --- a/Client/measuredialog.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* - * CarMainWindow main class - * - * @author Janne Änäkkälä - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "measuredialog.h" -#include "ui_measuredialog.h" -#include "math.h" - -/** - * Constructor of this class. - * @param QWidget pointer to parent object. By default the value is NULL. - */ -MeasureDialog::MeasureDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::MeasureDialog) -{ - ui->setupUi(this); - ui->labelInfo->setText("Accelerate to 100 km/h"); - time = 0; - speed = 0; - timer = new QTimer(); - - accelerometer = new Accelerometer(); - - measures = new Measures(); - this->initializeMeasures(); - - timer->setInterval(100); - timer->start(); - connect(this->timer, SIGNAL(timeout()), this, SLOT(after_timeout())); -} - -/** - *Destructor of this class. Should be used to release all allocated resources. - */ -MeasureDialog::~MeasureDialog() -{ - delete ui; -} - -void MeasureDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -/** - * This slot function is called when timer gives timeout signal. Checks current speed - * and stores times in measure class. - */ -void MeasureDialog::after_timeout() -{ - QString timeString, speedString; - time++; - speed = speed +10; - - if (floor(speed) == 10) - { - measures->setTime10kmh(time); - } - - else if (floor(speed) == 20) - { - measures->setTime20kmh(time); - } - - else if (floor(speed) == 30) - { - measures->setTime30kmh(time); - } - - else if (floor(speed) == 40) - { - measures->setTime40kmh(time); - } - - else if (floor(speed) == 50) - { - measures->setTime50kmh(time); - } - - else if (floor(speed) == 60) - { - measures->setTime60kmh(time); - } - - else if (floor(speed) == 70) - { - measures->setTime70kmh(time); - } - - else if (floor(speed) == 80) - { - measures->setTime80kmh(time); - } - - else if (floor(speed) == 90) - { - measures->setTime90kmh(time); - } - - else if (floor(speed) == 100) - { - measures->setTime100kmh(time); - } - - else - { - - } - - // If speed is over 100 km/h emits speedAchieved() signal and close this dialog. - if (speed >= 40.0) - { - timer->stop(); - time = 0; - speed = 0; - emit this->speedAchieved(); - this->close(); - - } - - // Updates speed and time. - else - { - timeString.setNum(time); - speedString.setNum(speed); - ui->labelSpeed->setText(speedString); - ui->labelTime->setText(timeString); - timer->start(); - } - -} - -/** - * This slot function is called when Abort button is clicked. - */ -void MeasureDialog::on_pushButtonAbort_clicked() -{ - measures->setTime10kmh(0); - measures->setTime20kmh(0); - measures->setTime30kmh(0); - measures->setTime40kmh(0); - measures->setTime50kmh(0); - measures->setTime60kmh(0); - measures->setTime70kmh(0); - measures->setTime80kmh(0); - measures->setTime90kmh(0); - measures->setTime100kmh(0); - timer->stop(); - time = 0; - speed = 0; - this->close(); -} - -/** - * Initializes measures class's member variables. - */ -void MeasureDialog::initializeMeasures() -{ - measures->setTime10kmh(0); - measures->setTime20kmh(0); - measures->setTime30kmh(0); - measures->setTime40kmh(0); - measures->setTime50kmh(0); - measures->setTime60kmh(0); - measures->setTime70kmh(0); - measures->setTime80kmh(0); - measures->setTime90kmh(0); - measures->setTime100kmh(0); -} diff --git a/Client/measuredialog.h b/Client/measuredialog.h deleted file mode 100644 index 399522d..0000000 --- a/Client/measuredialog.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * CarMainWindow main class - * - * @author Janne Änäkkälä - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef MEASUREDIALOG_H -#define MEASUREDIALOG_H - -#include "accelerometer.h" -#include "measures.h" -#include -#include - -namespace Ui { - class MeasureDialog; -} - -class MeasureDialog : public QDialog { - Q_OBJECT -public: - MeasureDialog(QWidget *parent = 0); - ~MeasureDialog(); - Measures *measures; - void initializeMeasures(); -protected: - void changeEvent(QEvent *e); - -private: - Ui::MeasureDialog *ui; - - QTimer *timer; - Accelerometer *accelerometer; - - double time; - double speed; - - signals: - void speedAchieved(); - -private slots: - void on_pushButtonAbort_clicked(); - void after_timeout(); -}; - -#endif // MEASUREDIALOG_H diff --git a/Client/measuredialog.ui b/Client/measuredialog.ui deleted file mode 100644 index 5f7954d..0000000 --- a/Client/measuredialog.ui +++ /dev/null @@ -1,93 +0,0 @@ - - - MeasureDialog - - - - 0 - 0 - 800 - 480 - - - - Dialog - - - - - 130 - 40 - 361 - 51 - - - - Selected measurement: 0 - 100 km/h - - - - - - 110 - 120 - 271 - 151 - - - - - - - - - Time: - - - - - - - Speed: - - - - - - - - - - - 0 - - - - - - - 86 km/h - - - - - - - - - - - 200 - 300 - 93 - 27 - - - - Abort - - - - - - diff --git a/Client/measures.cpp b/Client/measures.cpp deleted file mode 100644 index 724e926..0000000 --- a/Client/measures.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* - * CarMainWindow main class - * - * @author Janne Änäkkälä - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "measures.h" - -Measures::Measures() -{ -} - -/** - * Initializes measures class's member variables. - */ -void Measures::initializeMembers() -{ - this->setTime10kmh(0); - this->setTime20kmh(0); - this->setTime30kmh(0); - this->setTime40kmh(0); - this->setTime50kmh(0); - this->setTime60kmh(0); - this->setTime70kmh(0); - this->setTime80kmh(0); - this->setTime90kmh(0); - this->setTime100kmh(0); -} - -/** - * Get the value of time10kmh - * @return time10kmh the time in qreal when speed has been 10 km/h - */ -qreal Measures::getTime10kmh() -{ - return time10kmh; -} - -qreal Measures::getTime20kmh() -{ - return time20kmh; -} - -qreal Measures::getTime30kmh() -{ - return time30kmh; -} - -qreal Measures::getTime40kmh() -{ - return time40kmh; -} - -qreal Measures::getTime50kmh() -{ - return time50kmh; -} - -qreal Measures::getTime60kmh() -{ - return time60kmh; -} - -qreal Measures::getTime70kmh() -{ - return time70kmh; -} - -qreal Measures::getTime80kmh() -{ - return time80kmh; -} - -qreal Measures::getTime90kmh() -{ - return time90kmh; -} - -qreal Measures::getTime100kmh() -{ - return time100kmh; -} - -/** - * Set the given time in to the time10kmh - * @param pTime is time in qreal - */ -void Measures::setTime10kmh(qreal pTime) -{ - time10kmh = pTime; -} - -void Measures::setTime20kmh(qreal pTime) -{ - time20kmh = pTime; -} - -void Measures::setTime30kmh(qreal pTime) -{ - time30kmh = pTime; -} - -void Measures::setTime40kmh(qreal pTime) -{ - time40kmh = pTime; -} - -void Measures::setTime50kmh(qreal pTime) -{ - time50kmh = pTime; -} - -void Measures::setTime60kmh(qreal pTime) -{ - time60kmh = pTime; -} - -void Measures::setTime70kmh(qreal pTime) -{ - time70kmh = pTime; -} - -void Measures::setTime80kmh(qreal pTime) -{ - time80kmh = pTime; -} - -void Measures::setTime90kmh(qreal pTime) -{ - time90kmh = pTime; -} - -void Measures::setTime100kmh(qreal pTime) -{ - time100kmh = pTime; -} diff --git a/Client/measures.h b/Client/measures.h deleted file mode 100644 index 897e78e..0000000 --- a/Client/measures.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * CarMainWindow main class - * - * @author Janne Änäkkälä - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef MEASURES_H -#define MEASURES_H - -#include - -class Measures -{ -public: - Measures(); - qreal getTime10kmh(); - qreal getTime20kmh(); - qreal getTime30kmh(); - qreal getTime40kmh(); - qreal getTime50kmh(); - qreal getTime60kmh(); - qreal getTime70kmh(); - qreal getTime80kmh(); - qreal getTime90kmh(); - qreal getTime100kmh(); - - void setTime10kmh(qreal pTime); - void setTime20kmh(qreal pTime); - void setTime30kmh(qreal pTime); - void setTime40kmh(qreal pTime); - void setTime50kmh(qreal pTime); - void setTime60kmh(qreal pTime); - void setTime70kmh(qreal pTime); - void setTime80kmh(qreal pTime); - void setTime90kmh(qreal pTime); - void setTime100kmh(qreal pTime); - - void initializeMembers(); - - -private: - qreal time10kmh; - qreal time20kmh; - qreal time30kmh; - qreal time40kmh; - qreal time50kmh; - qreal time60kmh; - qreal time70kmh; - qreal time80kmh; - qreal time90kmh; - qreal time100kmh; -}; - -#endif // MEASURES_H diff --git a/Client/movingaverage.cpp b/Client/movingaverage.cpp deleted file mode 100644 index 645f34a..0000000 --- a/Client/movingaverage.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Class for moving average of acceleration data. - * - * @author Kai Rasilainen - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "movingaverage.h" -#include - -MovingAverage::MovingAverage(int sizeLimit) -{ - SizeLimit = sizeLimit; -} - -double MovingAverage::Average() -{ - double sum = 0; - - if (queue.count() == 0) - return 0; - - QList temp = queue; - foreach (double value, temp) - { - sum += value; - } - - return sum / queue.count(); -} - -void MovingAverage::Resize(int sizeLimit) -{ - SizeLimit = sizeLimit; - while (queue.count() > SizeLimit) - { - queue.dequeue(); - } -} - -void MovingAverage::Enqueue(double item) -{ - queue.enqueue(item); - if (queue.count() > SizeLimit) - queue.dequeue(); -} - - diff --git a/Client/movingaverage.h b/Client/movingaverage.h deleted file mode 100644 index 53962fb..0000000 --- a/Client/movingaverage.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Class for moving average of acceleration data. - * - * @author Kai Rasilainen - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef MOVINGAVERAGE_H -#define MOVINGAVERAGE_H - -#include - -class MovingAverage -{ - -public: - MovingAverage(int sizeLimit); - - double Average(); - void Resize(int sizeLimit); - void Enqueue(double item); - -private: - int SizeLimit; - QQueue queue; -}; - -#endif // MOVINGAVERAGE_H diff --git a/Client/readxmlfile.xml b/Client/readxmlfile.xml deleted file mode 100644 index 3b30379..0000000 --- a/Client/readxmlfile.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Client/registration.cpp b/Client/registration.cpp deleted file mode 100644 index e767b01..0000000 --- a/Client/registration.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Registration class to registrate username for user - * - * @author Olavi Pulkkinen - * @author - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "registration.h" -#include "ui_registration.h" -#include - -Registration::Registration(QWidget *parent) : - QDialog(parent), - ui(new Ui::Registration) -{ - ui->setupUi(this); - this->setWindowTitle("Registration for Speed Freak server"); - - //Let`s not type it again - ui->newUsernameLineEdit->setText("user123"); - ui->newPasswordLineEdit->setText("salainen"); - ui->eMailLineEdit->setText("user123@emaili.fi"); -} - -Registration::~Registration() -{ - delete ui; -} - -void Registration::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -void Registration::on_registratePushButton_clicked() -{ - // Send username, password and email to SpeedFreak server - this->username = ui->newUsernameLineEdit->text(); - this->password = ui->newPasswordLineEdit->text(); - this->email = ui->eMailLineEdit->text(); - - emit sendregistration(); - - close(); -} - -void Registration::on_cancelPushButton_clicked() -{ - close(); -} - -void Registration::setUserName(QString username) -{ - this->username = username; -} - -void Registration::setPassword(QString password) -{ - this->password = password; -} - -void Registration::setEmail(QString email) -{ - this->email = email; -} - -QString Registration::getUserName() -{ - return this->username; -} - -QString Registration::getPassword() -{ - return this->password; -} - -QString Registration::getEmail() -{ - return this->email; -} diff --git a/Client/registration.h b/Client/registration.h deleted file mode 100644 index 60906a9..0000000 --- a/Client/registration.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Registration class - * - * @author Olavi Pulkkinen - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef REGISTRATION_H -#define REGISTRATION_H - -#include - -namespace Ui { - class Registration; -} - -class Registration : public QDialog { - Q_OBJECT -public: - Registration(QWidget *parent = 0); - ~Registration(); - void setUserName(QString username); - void setPassword(QString password); - void setEmail(QString email); - QString getUserName(); - QString getPassword(); - QString getEmail(); - -signals: - void sendregistration(); - -protected: - void changeEvent(QEvent *e); - -private: - Ui::Registration *ui; - QString username; - QString password; - QString email; - -private slots: - void on_cancelPushButton_clicked(); - void on_registratePushButton_clicked(); -}; - -#endif // REGISTRATION_H - diff --git a/Client/registration.ui b/Client/registration.ui deleted file mode 100644 index b96e824..0000000 --- a/Client/registration.ui +++ /dev/null @@ -1,127 +0,0 @@ - - - Registration - - - - 0 - 0 - 600 - 400 - - - - Registration - - - - - 120 - 270 - 121 - 41 - - - - Registrate - - - - - - 300 - 270 - 121 - 41 - - - - Cancel - - - - - - 270 - 180 - 301 - 51 - - - - 255 - - - - - - 40 - 190 - 201 - 31 - - - - Your Email: - - - - - - 40 - 70 - 221 - 31 - - - - Your new username: - - - - - - 270 - 120 - 301 - 51 - - - - 255 - - - QLineEdit::Password - - - - - - 270 - 60 - 301 - 51 - - - - 12 - - - - - - 40 - 130 - 221 - 31 - - - - Your new password: - - - - - - - diff --git a/Client/resultdialog.cpp b/Client/resultdialog.cpp deleted file mode 100644 index 83f9fc2..0000000 --- a/Client/resultdialog.cpp +++ /dev/null @@ -1,412 +0,0 @@ -/* - * CarMainWindow main class - * - * @author Janne Änäkkälä - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "resultdialog.h" -#include "ui_resultdialog.h" -#include - -const int DIAGRAM_WIDTH = 400; -const int DIAGRAM_HEIGHT = 300; - -const int DIAGRAMGAP100KMH = 30; -const int DIAGRAMGAP40KMH = 75; -const int DIAGRAMGAP60KMH = 50; -const int DIAGRAMGAP50KMH = 60; -const double DIAGRAMGAP80KMH = 37.5; - -const QPoint diagramStemStart(70, 330); -const QPoint diagramStemEnd(70, 30); - -const QPoint diagramHorizontalStart(70, 330); -const QPoint diagramHorizontalEnd(470, 330); - -const int diagramGap = 30; - -// Test arrays for changing speeds and times to the points in diagram -static const int speedArray[11] = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100}; -//static const int timeArray[10] = {1, 2, 3, 4, 5, 6, 7, 8, 10, 12}; - -// Test point array for the diagram. -QPoint points[11]; - -/** - * Constructor of this class. - * @param QWidget pointer to parent object. By default the value is NULL. - */ -ResultDialog::ResultDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::ResultDialog) -{ - ui->setupUi(this); - timeAxelLength = 10; - speedList << "0" << "10" << "20" << "30" << "40" << "50" << "60" << "70" << "80" << "90" << "100" ; - timeList << "0" << "1" << "2" << "3" << "4" << "5" << "6" << "7" << "8" << "9" << "10" << "11" - << "12" << "13" << "14" << "15" << "16" << "17" << "18" << "19" << "20"; -} - -/** - * Destructor of this class. Should be used to release all allocated resources. - */ -ResultDialog::~ResultDialog() -{ - delete ui; -} - -void ResultDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -/** - * Draws speed diagram to the UI - * @param QPaintEvent - */ -void ResultDialog::paintEvent(QPaintEvent *) -{ - QPainter painter(this); - - painter.setRenderHint(QPainter::Antialiasing, true); - painter.setPen(QPen((Qt::red),2)); - QFont font; - font.setPixelSize(12); - painter.setFont(font); - painter.setBrush(QBrush((Qt::yellow), Qt::SolidPattern)); - painter.drawLine(diagramStemStart, diagramStemEnd); - painter.drawLine(diagramHorizontalStart, diagramHorizontalEnd); - - int currentX = 0; - int currentY = diagramStemStart.y(); - - painter.setPen(QPen((Qt::blue),1)); - // Draws diagram's X-axel - int i = 0; - while (currentX <= DIAGRAM_WIDTH) - { - painter.drawLine(currentX + diagramStemStart.x(), currentY, currentX + diagramStemStart.x(), currentY - 300); - painter.drawText(currentX + diagramStemStart.x(), currentY + 20, timeList[i]); - currentX += this->diagramGapHorizontal; - i++; - } - - currentX = diagramStemStart.x(); - currentY = 0; - - i = 0; - // Draws diagram's Y-axel - while (currentY >= -(DIAGRAM_HEIGHT)) - { - painter.drawLine(currentX, diagramStemStart.y() + currentY, currentX+400, diagramStemStart.y() + currentY); - painter.drawText(currentX - 25, diagramStemStart.y() + currentY, speedList[i]); - currentY -= this->diagramGapStem; - i++; - } - - painter.setPen(QPen((Qt::white),2)); - - // Draws result line to the diagram - if (this->diagramGapStem == DIAGRAMGAP100KMH) - { - painter.drawPolyline(points, 11); - } - - else if (this->diagramGapStem == DIAGRAMGAP80KMH) - { - painter.drawPolyline(points, 9); - } - - else if (this->diagramGapStem == DIAGRAMGAP60KMH) - { - painter.drawPolyline(points, 7); - } - - else if (this->diagramGapStem == DIAGRAMGAP50KMH) - { - painter.drawPolyline(points, 6); - } - - else - { - painter.drawPolyline(points, 5); - } -} - -/** - * 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. - */ -QPoint ResultDialog::changeMeasuresToDiagramPoint(int aSpeed, qreal aTime) -{ - QPoint point; - - int speedAsPixels; - int timeAsPixels; - - // Calculate speed and time to the point which can be drawn to the diagram - if (this->diagramGapStem == DIAGRAMGAP100KMH) - { - speedAsPixels = DIAGRAM_HEIGHT*aSpeed/100; - timeAsPixels = DIAGRAM_WIDTH*aTime/timeAxelLength; - } - - else if (this->diagramGapStem == DIAGRAMGAP80KMH) - { - speedAsPixels = DIAGRAM_HEIGHT*aSpeed/80; - timeAsPixels = DIAGRAM_WIDTH*aTime/timeAxelLength; - } - - else if (this->diagramGapStem == DIAGRAMGAP60KMH) - { - speedAsPixels = DIAGRAM_HEIGHT*aSpeed/60; - timeAsPixels = DIAGRAM_WIDTH*aTime/timeAxelLength; - } - - else if (this->diagramGapStem == DIAGRAMGAP50KMH) - { - speedAsPixels = DIAGRAM_HEIGHT*aSpeed/50; - timeAsPixels = DIAGRAM_WIDTH*aTime/timeAxelLength; - } - - else - { - speedAsPixels = DIAGRAM_HEIGHT*aSpeed/40; - timeAsPixels = DIAGRAM_WIDTH*aTime/timeAxelLength; - } - point.setY(diagramStemStart.y()-speedAsPixels); - point.setX(diagramStemStart.x()+timeAsPixels); - - return point; -} - -/** - * Saves the given measures to array. - * @param pMeasures has information about acceleration. - */ -void ResultDialog::saveMeasuresToArray(Measures *pMeasures) -{ - timeArray[0] = 0; - timeArray[1] = pMeasures->getTime10kmh(); - timeArray[2] = pMeasures->getTime20kmh(); - timeArray[3] = pMeasures->getTime30kmh(); - timeArray[4] = pMeasures->getTime40kmh(); - timeArray[5] = pMeasures->getTime50kmh(); - timeArray[6] = pMeasures->getTime60kmh(); - timeArray[7] = pMeasures->getTime70kmh(); - timeArray[8] = pMeasures->getTime80kmh(); - timeArray[9] = pMeasures->getTime90kmh(); - timeArray[10] = pMeasures->getTime100kmh(); - - setTimeAxelLength(); - - for (int i = 0; i < 11; i++) - { - points[i] = changeMeasuresToDiagramPoint(speedArray[i], timeArray[i]); - } - - setTimesIntoLabels(); - this->repaint(); - - for (int i = 0; i < 11; i++) - { - timeArray[i] = 0; - } -} - -void ResultDialog::on_pushButtonSend_clicked() -{ - emit sendresult(); -} - -/** - * Saves the given diagram gap to the member variable. - * @param pDiagramGapStem has information about the right gap for diagram stem axel. - */ -void ResultDialog::setDiagramGapStem(double pDiagramGapStem) -{ - this->diagramGapStem = pDiagramGapStem; -} - -/** - * Saves the given diagram gap to the member variable. - * @param pDiagramGapHorizontal has information about the right gap for diagram horizontal axel. - */ -void ResultDialog::setDiagramGapHorizontal(double pDiagramGapHorizontal) -{ - this->diagramGapHorizontal = pDiagramGapHorizontal; -} - -/** - * Sets result times in to the labels and shows only wanted results and hides - * unwanted. - */ -void ResultDialog::setTimesIntoLabels() -{ - QString time, timeInteger; - timeInteger.setNum(timeArray[4]); - time = "0 - 40 km/h: "; - time.append(timeInteger); - ui->labelResult40kmh->setText(time); - - timeInteger.setNum(timeArray[3]); - time = "0 - 30 km/h: "; - time.append(timeInteger); - ui->labelResult30kmh->setText(time); - - timeInteger.setNum(timeArray[2]); - time = "0 - 20 km/h: "; - time.append(timeInteger); - ui->labelResult20kmh->setText(time); - - timeInteger.setNum(timeArray[1]); - time = "0 - 10 km/h: "; - time.append(timeInteger); - ui->labelResult10kmh->setText(time); - - timeInteger.setNum(timeArray[6]); - time = "0 - 60 km/h: "; - time.append(timeInteger); - ui->labelResult60kmh->setText(time); - - timeInteger.setNum(timeArray[5]); - time = "0 - 50 km/h: "; - time.append(timeInteger); - ui->labelResult50kmh->setText(time); - - timeInteger.setNum(timeArray[7]); - time = "0 - 70 km/h: "; - time.append(timeInteger); - ui->labelResult70kmh->setText(time); - - timeInteger.setNum(timeArray[8]); - time = "0 - 80 km/h: "; - time.append(timeInteger); - ui->labelResult80kmh->setText(time); - - timeInteger.setNum(timeArray[9]); - time = "0 - 90 km/h: "; - time.append(timeInteger); - ui->labelResult90kmh->setText(time); - - timeInteger.setNum(timeArray[10]); - time = "0 - 100 km/h: "; - time.append(timeInteger); - ui->labelResult100kmh->setText(time); - - if (this->diagramGapStem == DIAGRAMGAP40KMH) - { - ui->labelResult50kmh->hide(); - ui->labelResult60kmh->hide(); - ui->labelResult70kmh->hide(); - ui->labelResult80kmh->hide(); - ui->labelResult90kmh->hide(); - ui->labelResult100kmh->hide(); - } - - else if (this->diagramGapStem == DIAGRAMGAP80KMH) - { - ui->labelResult50kmh->show(); - ui->labelResult60kmh->show(); - ui->labelResult70kmh->show(); - ui->labelResult80kmh->show(); - ui->labelResult90kmh->hide(); - ui->labelResult100kmh->hide(); - } - - else - { - ui->labelResult50kmh->show(); - ui->labelResult60kmh->show(); - ui->labelResult70kmh->show(); - ui->labelResult80kmh->show(); - ui->labelResult90kmh->show(); - ui->labelResult100kmh->show(); - } -} - -/** - * Sets right timeAxelLength value depending the time which - * has spent to reach target speed. - */ -void ResultDialog::setTimeAxelLength() -{ - if (this->diagramGapStem == DIAGRAMGAP40KMH) - { - if (timeArray[4] <= 5) - { - timeAxelLength = 5; - } - - else if (timeArray[4] <= 10) - { - timeAxelLength = 10; - } - - else if (timeArray[4] <= 15) - { - timeAxelLength = 15; - } - - else - { - timeAxelLength = 20; - } - } - - else if (this->diagramGapStem == DIAGRAMGAP80KMH) - { - if (timeArray[8] <= 5) - { - timeAxelLength = 5; - } - - else if (timeArray[8] <= 10) - { - timeAxelLength = 10; - } - - else if (timeArray[8] <= 15) - { - timeAxelLength = 15; - } - - else - { - timeAxelLength = 20; - } - } - - else - { - if (timeArray[10] <= 5) - { - timeAxelLength = 5; - } - - else if (timeArray[10] <= 10) - { - timeAxelLength = 10; - } - - else if (timeArray[10] <= 15) - { - timeAxelLength = 15; - } - - else - { - timeAxelLength = 20; - } - } -} diff --git a/Client/resultdialog.h b/Client/resultdialog.h deleted file mode 100644 index 32818d3..0000000 --- a/Client/resultdialog.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * CarMainWindow main class - * - * @author Janne Änäkkälä - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef RESULTDIALOG_H -#define RESULTDIALOG_H - -#include -#include "measures.h" - -namespace Ui { - class ResultDialog; -} - -class ResultDialog : public QDialog { - Q_OBJECT -public: - ResultDialog(QWidget *parent = 0); - ~ResultDialog(); - void saveMeasuresToArray(Measures *pMeasures); - void setDiagramGapStem(double pDiagramGapStem); - void setDiagramGapHorizontal(double pDiagramGapHorizontal); - -signals: - void sendresult(); - -protected: - void changeEvent(QEvent *e); - void paintEvent(QPaintEvent *); - -private: - QPoint changeMeasuresToDiagramPoint(int aSpeed, qreal aTime); - void setTimesIntoLabels(); - void setTimeAxelLength(); - -private: - Ui::ResultDialog *ui; - qreal timeArray[11]; - double diagramGapStem; - double diagramGapHorizontal; - QStringList speedList; - QStringList timeList; - int timeAxelLength; - -private slots: - void on_pushButtonSend_clicked(); -}; - -#endif // RESULTDIALOG_H diff --git a/Client/resultdialog.ui b/Client/resultdialog.ui deleted file mode 100644 index a1ad0f4..0000000 --- a/Client/resultdialog.ui +++ /dev/null @@ -1,162 +0,0 @@ - - - ResultDialog - - - - 0 - 0 - 800 - 480 - - - - Dialog - - - - - 550 - 180 - 191 - 31 - - - - 0 - 10 km/h: 5,6 s - - - - - - 550 - 120 - 191 - 31 - - - - 0 - 40 km/h: 9,8 s - - - - - - 550 - 160 - 191 - 31 - - - - 0 - 20 km/h: 6,9 s - - - - - - 550 - 140 - 191 - 31 - - - - 0 - 30 km/h: 8,6 s - - - - - - 550 - 260 - 101 - 27 - - - - Send results - - - - - - 550 - 40 - 191 - 31 - - - - 0 - 80 km/h: 9,8 s - - - - - - 550 - 60 - 191 - 31 - - - - 0 - 70 km/h: 8,6 s - - - - - - 550 - 80 - 191 - 31 - - - - 0 - 60 km/h: 6,9 s - - - - - - 550 - 100 - 191 - 31 - - - - 0 - 50 km/h: 5,6 s - - - - - - 550 - 20 - 191 - 31 - - - - 0 - 90 km/h: 8,6 s - - - - - - 550 - 0 - 191 - 31 - - - - 0 - 100 km/h: 9,8 s - - - - - - diff --git a/Client/results.xml b/Client/results.xml deleted file mode 100755 index deb1966..0000000 --- a/Client/results.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/Client/routedialog.cpp b/Client/routedialog.cpp deleted file mode 100644 index 42f5faa..0000000 --- a/Client/routedialog.cpp +++ /dev/null @@ -1,576 +0,0 @@ -/* - * RouteDialog class - * - * @author Olavi Pulkkinen - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "routedialog.h" -#include "ui_routedialog.h" -#include -#include -#include -#include -#include -#include - -/* - * Vector class. - * In starting Qt 4.6 there is QVector3D. - * Later (updating Qt version) this class can be removed. - */ -class Vector -{ - qreal x, y, z; -public: - Vector() { x=0.; y=0. ; z=0.; }; - Vector( qreal initX, qreal initY, qreal initZ) { x = initX, y = initY; z = initZ; }; - void setX( qreal newX) { x = newX; }; - void setY( qreal newY) { y = newY; }; - void setZ( qreal newZ) { z = newZ; }; - qreal getX() { return x; }; - qreal getY() { return y; }; - qreal getZ() { return z; }; - qreal length() { return sqrt(x*x+y*y+z*z); }; - Vector operator+(Vector v) - { - x = x + v.x; y = y + v.y; z = z + v.z; - return *this; - }; - Vector operator-(Vector v) - { - x = x - v.x; y = y - v.y; z = z - v.z; - return *this; - }; - Vector operator/(qreal c) - { - x = x/c; y = y/c; z = z/c; - return *this; - }; - Vector crossProduct( Vector a, Vector b) - { - x = a.y*b.z - a.z*b.y; - y = a.z*b.x - a.x*b.z; - z = a.x*b.y - a.y*b.x; - return *this; - }; -}; - - -class Viewing -{ - Vector atPoint, fromPoint, up, a1, a2, a3; - qreal offsx, offsy, offsz; - qreal dval; - qreal angle; -public: - qreal getOffsx() { return offsx; }; - qreal getOffsy() { return offsy; }; - qreal getOffsz() { return offsz; }; - qreal getDval() { return dval; }; - void setAngle( qreal newA) { angle = newA; }; - void setUp( qreal newUpX, qreal newUpY, qreal newUpZ) - { - up.setX(newUpX); up.setY(newUpY); up.setZ(newUpZ); - }; - void setAtPoint( qreal newX, qreal newY, qreal newZ) - { - atPoint.setX(newX); atPoint.setY(newY); atPoint.setZ(newZ); - }; - void setFromPoint(qreal newX, qreal newY, qreal newZ) - { - fromPoint.setX(newX); fromPoint.setY(newY); fromPoint.setZ(newZ); - } - void setEye() - { - double amarkmag, tempmag; - Vector temp, dist; - - dval = cos(angle/2.0)/sin(angle/2.0); - dist = atPoint-fromPoint; - amarkmag = dist.length(); - a3 = dist/amarkmag; - - temp.crossProduct( dist, up); - tempmag = temp.length(); - a1 = temp/tempmag; - - temp.crossProduct( a1, a3); - tempmag = temp.length(); - a2 = temp/tempmag; - - offsx = -a1.getX()*fromPoint.getX() - a1.getY()*fromPoint.getY() - a1.getZ()*fromPoint.getZ(); - offsy = -a2.getX()*fromPoint.getX() - a2.getY()*fromPoint.getY() - a2.getZ()*fromPoint.getZ(); - offsz = -a3.getX()*fromPoint.getX() - a3.getY()*fromPoint.getY() - a3.getZ()*fromPoint.getZ(); - //QString jono2 = QString("offsx %1 offsy %2 offsz %3").arg(offsx).arg(offsy).arg(offsz); - //QMessageBox::about(0,"offs x y z", jono2); - } ; - Vector getAtPoint() { return atPoint; }; - Vector getFromPoint() { return fromPoint; }; - Vector getA1() { return a1; }; - Vector getA2() { return a2; }; - Vector getA3() { return a3; }; - Viewing () {}; -}; - -qreal xmax, xmin, ymin, ymax; // Limits in world coordinates - -QList vertexList; // Vertecies of route - -qreal objxmin, objxmax, objymin, objymax, objzmin, objzmax; // data ranges - -#define maxof(val1,val2) ((val1>val2)?val1:val2) -#define toradians( degrees) (degrees*0.017453293) - -#define WIDTH 1.8 // For 3d viewing only -qreal a, b,c,d; // Used for 3d viewing to calculate screen coordinates - -Viewing view3d; // Viewing settings for 3d - -// Function prototypes -void dataMinMax( void); -void setAtPoint( Viewing *v); -void setFromPoint( Viewing *v); -void transformseg( Viewing *v, Vector *v1, Vector *v2, int *xscreen1, int *yscreen1, int *xscreen2, int *yscreen2 ); - -#define R 6378.140 // The radius of the earth by kilometers -/* - * count distance of two points (defined by longitude & latitude) - * on the surface of the earth. - */ -qreal countDistance(Vector *p1, Vector *p2) -{ - qreal dLon, dLat; // delta of longitude & latitude - qreal a, c; - - dLon = p2->getX() - p1->getX(); // longitude difference - dLat = p2->getY() - p1->getY(); // latitude difference - if (dLon <0) dLon = -dLon; - if (dLat <0) dLat = -dLat; - - dLon = dLon*3.14/180; - dLat = dLat*3.14/180; - a = (sin(dLat/2.))*(sin(dLat/2.)) + - (cos(p1->getY())*3.14/180)*(cos(p2->getY())*3.14/180)*(sin(dLon/2.))*(sin(dLon/2.)); - c = 2.*atan(sqrt(a)/sqrt(1-a)); // c is angle between points p1 & p2 with circel by radius 1. - - return R*c; // Return distance in kilometers -} - -RouteDialog::RouteDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::RouteDialog) -{ - ui->setupUi(this); - left = 5; top = 5; right = 395; bottom = 195; // Limits in screen coordinates -} - -RouteDialog::~RouteDialog() -{ - delete ui; -} - -void RouteDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - - -/** - * Draws route to the route dialog. - * Type 0 is 2d viewing and type 1 is for 3d viewing - * @param QPaintEvent - */ -/* */ -void RouteDialog::paintEvent(QPaintEvent *) -{ - int type = 0; // 0 for 2d, 1 for 3d - int startx, starty; // Starting point of the route - int i, maxi; - qreal x1, y1, x2, y2; - int x1Screen, y1Screen, x2Screen, y2Screen; - Vector v1, v2; - QPainter painter(this); - - painter.setRenderHint(QPainter::Antialiasing, true); - painter.setPen(QPen((Qt::black),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 0) - { - double x, y, z; - x = str2.toDouble(); - y = str1.toDouble(); - z = str3.toDouble(); - temp.setX( x); // Longitude - temp.setY( y); // Latitude - temp.setZ( z); // altitude - - vertexList.append(temp); - } - } - } - - file.close(); - - /******** in 3d use only */ - a = 400/2.; - b = 1 - a*(-1); - c = -300/2.; - d = 300 - c*(-1); - //angle = toradians(60); - - view3d.setUp( 1.0, 0.0, 0.0); - view3d.setAngle(toradians(60)); - setAtPoint( &view3d); - xmin = objxmin; xmax = objxmax; ymin = objymin; ymax = objymax; // 2d viewing needs this !!!! - setFromPoint( &view3d); - view3d.setEye(); - /****** end of 3d *****/ - - /* - //Testing distance counting - Vector a1, a2; - qreal dist; - //a1.setX( xmin); a1.setY( ymin); - //a2.setX( xmax); a2.setY( ymax); - a1.setX( 25.483); a1.setY( 65.017); // Oulu - a2.setX( 27.767); a2.setY( 64.283); // Kajaani - dist = countDistance( &a1, &a2); - QString str = QString("Min & Max datan välimatka %1").arg(dist); - QMessageBox::about( 0, "Testi", str); - */ - - return true; -} - -/* - * Find out data range for x-, y- and z-coordinates - */ -void dataMinMax( void) -{ - int i, maxi; - qreal x,y,z; - Vector temp; - - temp = vertexList.at(0); - objxmax = objxmin = temp.getX(); - objymax = objymin = temp.getY(); - objzmax = objzmin = temp.getZ(); - - maxi = vertexList.size(); - for (i=1; i objxmax) - { - objxmax = x; - } - - if (y < objymin) - { - objymin = y; - } - else if (y > objymax) - { - objymax = y; - } - - if (z < objzmin) - { - objzmin = z; - } - else if (z > objzmax) - { - objzmax = z; - } - } - //QString jono = QString("ojxmin %1 objxmax %2").arg(objxmin).arg(objxmax); - //QString jono = QString("ojymin %1 objymax %2").arg(objymin).arg(objymax); - //QString jono = QString("ojzmin %1 objzmax %2").arg(objzmin).arg(objzmax); - //QMessageBox::about(0,"Tark", jono); -} - -/* - * Setting the point where the viewed object is. In the middle of datapoints. - */ -void setAtPoint( Viewing *v) -{ - qreal x, y, z; - dataMinMax(); - //Vector test; - - x = (objxmax+objxmin)/2.0; - y= (objymax+objymin)/2.0; - z= (objzmax+objzmin)/2.0; - - v->setAtPoint( x, y, z); - //QString jono = QString("AtX %1 Aty %2 AtZ %3").arg(atPoint.x()).arg(atPoint.y()).arg(atPoint.z()); - //QString jono = QString("AtX %1 Aty %2 AtZ %3").arg(atPoint.x).arg(atPoint.y).arg(atPoint.z); - - /* * - test = v->getAtPoint(); - QString jono = QString("AtX %1 Aty %2 AtZ %3").arg(test.getX()).arg(test.getY()).arg(test.getZ()); - QMessageBox::about(0,"At point", jono); - * */ -} - -/* - * Setting the point where the object is viewed by eye. - */ -void setFromPoint( Viewing *v) -{ - qreal x, y, z; - Vector point; - point = v->getAtPoint(); - //Vector test; - //fromPoint.setX( atPoint.getX() + (objxmax-objxmin)/2.0 + WIDTH*maxof((objzmax-objzmin)/2.0,(objymax-objymin)/2.0)); - //x = 3.0; - //x = point.getX() + (objxmax-objxmin)/2.0 + WIDTH*maxof((objzmax-objzmin)/2.0,(objymax-objymin)/2.0); - x = point.getX(); - //y = point.getY(); - y = point.getY() + 40; // + (objymax-objymin)/2.0 + WIDTH*maxof((objzmax-objzmin)/2.0,(objxmax-objxmin)/2.0); - z = point.getZ(); - - v->setFromPoint(x,y,z); - //QString jono = QString("FromX %1 FromY %2 FromZ %3").arg(fromPoint.x()).arg(fromPoint.y()).arg(fromPoint.z()); - //QString jono = QString("FromX %1 FromY %2 FromZ %3").arg(fromPoint.x).arg(fromPoint.y).arg(fromPoint.z); - /* * - test = v->getFromPoint(); - QString jono = QString("FromX %1 FromY %2 FromZ %3").arg(test.getX()).arg(test.getY()).arg(test.getZ()); - QMessageBox::about(0,"From point", jono); // (1.9, 0.5, 0.5) - * */ -} - - -#define NOEDGE 0x00 -#define LEFTEDGE 0x01 -#define RIGHTEDGE 0x02 -#define BOTTOMEDGE 0x04 -#define TOPEDGE 0x08 -/* - * Returns a code specifying which edge in the viewing pyramid was crossed. - * There may be more than one. - */ -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. - */ -void WORLDtoSCREEN( qreal xWorld, qreal yWorld, int *xScreen, int *yScreen) -{ - *xScreen = (int) (a*xWorld+b); - *yScreen = (int) (c*yWorld+d); -} - -/* - * Clips the line segment in three-dimensional coordinates to the - * viewing pyramid. - */ -void clip3d( qreal x1, qreal y1, qreal z1, qreal x2, qreal y2, qreal z2, int *xscreen1, int *yscreen1, int *xscreen2, int *yscreen2) -{ - int c,c1,c2; - qreal x,y,z,t; - - c1 = code(x1,y1,z1); - c2 = code(x2,y2,z2); - - while (c1!= NOEDGE || c2 != NOEDGE) - { - if ((c1 & c2 ) != NOEDGE) return; - c = c1; - if (c == NOEDGE) c = c2; - if ((c&LEFTEDGE) == LEFTEDGE) - { - // Crosses left edge - t = (z1+x1)/((x1-x2)-(z2-z1)); - z = t*(z2-z1)+z1; - x = -z; - y = t*(y2-y1)+y1; - } - else if ((c&RIGHTEDGE) == RIGHTEDGE) - { - // Crosses right edge - t = (z1-x1)/((x2-x1)-(z2-z1)); - z = t*(z2-z1)+z1; - x = z; - y = t*(y2-y1)+y1; - } - else if ((c&BOTTOMEDGE) == BOTTOMEDGE) - { - // Crosses bottom edge - t = (z1+y1)/((y1-y2)-(z2-z1)); - z = t*(z2-z1)+z1; - x = t*(x2-x1)+x1; - y = -z; - } - else if ((c&TOPEDGE) == TOPEDGE) - { - // Crosses top edge - t = (z1-y1)/((y2-y1)-(z2-z1)); - z = t*(z2-z1)+z1; - x = t*(x2-x1)+x1; - y = z; - } - - if (c == c1) - { - x1=x; y1=y; z1=z; - c1 = code(x,y,z); - } - else - { - x2=x; y2=y; z2=z; - c2 = code(x,y,z); - } - } - - if (z1 != 0) - { - WORLDtoSCREEN(x1/z1,y1/z1,xscreen1, yscreen1); - WORLDtoSCREEN(x2/z2,y2/z2,xscreen2, yscreen2); - } - else - { - WORLDtoSCREEN(x1,y1,xscreen1, yscreen1); - WORLDtoSCREEN(x2,y2,xscreen2, yscreen2); - } - //Now ready to draw line( xscreen1, yscreen1, xscreen2, yscreen2); -} - -/* - * Transform the segment connecting the two vectors into the viewing plane. - * clip3d() clips the line if needed. - */ -void transformseg( Viewing *v, Vector *v1, Vector *v2, int *xscreen1, int *yscreen1, int *xscreen2, int *yscreen2) - -{ - qreal x1, y1, z1, x2, y2, z2; - Vector a1, a2, a3; - - a1 = v->getA1(); - a2 = v->getA2(); - a3 = v->getA3(); - - x1 = (a1.getX()*v1->getX() + a1.getY()*v1->getY() + a1.getZ()*v1->getZ() + v->getOffsx())*v->getDval(); - y1 = (a2.getX()*v1->getX() + a2.getY()*v1->getY() + a2.getZ()*v1->getZ() + v->getOffsy())*v->getDval(); - z1 = a3.getX()*v1->getX() + a3.getY()*v1->getY() + a3.getZ()*v1->getZ() + v->getOffsz(); - - x2 = (a1.getX()*v2->getX() + a1.getY()*v2->getY() + a1.getZ()*v2->getZ() + v->getOffsx())*v->getDval(); - y2 = (a2.getX()*v2->getX() + a2.getY()*v2->getY() + a2.getZ()*v2->getZ() + v->getOffsy())*v->getDval(); - z2 = a3.getX()*v2->getX() + a3.getY()*v2->getY() + a3.getZ()*v2->getZ() + v->getOffsz(); - - clip3d(x1,y1,z1,x2,y2,z2, xscreen1, yscreen1, xscreen2, yscreen2 ); -} diff --git a/Client/routedialog.h b/Client/routedialog.h deleted file mode 100644 index ce4a6a5..0000000 --- a/Client/routedialog.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef ROUTEDIALOG_H -#define ROUTEDIALOG_H - -#include - -namespace Ui { - class RouteDialog; -} - -class RouteDialog : public QDialog { - Q_OBJECT -public: - RouteDialog(QWidget *parent = 0); - ~RouteDialog(); - bool readRouteFromFile( QString &routeFile); - -protected: - void changeEvent(QEvent *e); - void paintEvent(QPaintEvent *); - -private: - Ui::RouteDialog *ui; - int left, top, right, bottom; // Limits in screen coordinates in route dialog - -private slots: - void on_closePushButton_clicked(); -}; - -#endif // ROUTEDIALOG_H diff --git a/Client/routedialog.ui b/Client/routedialog.ui deleted file mode 100644 index c2e3424..0000000 --- a/Client/routedialog.ui +++ /dev/null @@ -1,32 +0,0 @@ - - - RouteDialog - - - - 0 - 0 - 400 - 300 - - - - Dialog - - - - - 140 - 226 - 121 - 41 - - - - Close - - - - - - diff --git a/Client/speedfreak.pro b/Client/speedfreak.pro new file mode 100644 index 0000000..2cc5a1b --- /dev/null +++ b/Client/speedfreak.pro @@ -0,0 +1,12 @@ +# ------------------------------------------------- +# Project created by QtCreator 2010-03-29T09:21:42 +# ------------------------------------------------- +TARGET = speedfreak +TEMPLATE = app +SOURCES += main.cpp \ + mainwindow.cpp \ + creditsdialog.cpp +HEADERS += mainwindow.h \ + creditsdialog.h +FORMS += mainwindow.ui \ + creditsdialog.ui diff --git a/Client/speedfreak.pro.user b/Client/speedfreak.pro.user new file mode 100644 index 0000000..b6637b1 --- /dev/null +++ b/Client/speedfreak.pro.user @@ -0,0 +1,160 @@ + + + + RunConfiguration0-BaseEnvironmentBase + 2 + + + RunConfiguration0-CommandLineArguments + + + + RunConfiguration0-ProFile + speedfreak.pro + + + RunConfiguration0-RunConfiguration.name + speedfreak + + + RunConfiguration0-UseDyldImageSuffix + false + + + RunConfiguration0-UseTerminal + false + + + RunConfiguration0-UserEnvironmentChanges + + + + RunConfiguration0-UserSetName + false + + + RunConfiguration0-UserSetWorkingDirectory + false + + + RunConfiguration0-UserWorkingDirectory + + + + RunConfiguration0-type + Qt4ProjectManager.Qt4RunConfiguration + + + activeRunConfiguration + 0 + + + activebuildconfiguration + Debug + + + buildConfiguration-Debug + + Debug + 0 + 0 + 2 + + + + buildConfiguration-Release + + Release + 0 + 0 + + + + buildconfiguration-Debug-buildstep0 + + Debug + + + + buildconfiguration-Debug-buildstep1 + + Debug + + + + buildconfiguration-Debug-cleanstep0 + + Debug + true + + clean + + + + + buildconfiguration-Release-buildstep0 + + Release + + + + buildconfiguration-Release-buildstep1 + + Release + + + + buildconfiguration-Release-cleanstep0 + + Release + + + + buildconfigurations + + Debug + Release + + + + buildstep0 + + + + + + + buildstep1 + + + + + + buildsteps + + trolltech.qt4projectmanager.qmake + trolltech.qt4projectmanager.make + + + + cleanstep0 + + + true + + + + cleansteps + + trolltech.qt4projectmanager.make + + + + defaultFileEncoding + System + + + project + + + diff --git a/Client/start.gif b/Client/start.gif deleted file mode 100644 index fd8ba3dee94d10b69058c2a7ad7171a4bbd77a0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 101428 zcmeF(XHZl9+vxk1LK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zrWx8suNv>97(Lk)mY7+vUke#!a8Ku(HCNnbMuAe7CSx=ck?S$ zd1{n--2DOXfjxM{++T@lkMt`S_6{x>%`KS77UYd4s@Y{7S5pR8jnB-j@?@*2+G~8fwT$4k zEZ*Ar%C!rFYk6~P1+q1P_PS6mnhsvS#9Q~({$D - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - * @exaple http://qt.nokia.com/doc/4.0/qt4-interview.html#example-code - */ - -#include "stringlistmodel.h" - -int StringListModel::rowCount(const QModelIndex &parent) const -{ - return stringList.count(); -} - -QVariant StringListModel::data(const QModelIndex &index, int role) const -{ - if (!index.isValid()) - return QVariant(); - - if (index.row() < 0 || index.row() >= stringList.size()) - return QVariant(); - - if (role == Qt::DisplayRole) - return stringList.at(index.row()); - else - return QVariant(); -} -QVariant StringListModel::headerData(int section, Qt::Orientation orientation, int role) const -{ - if (role != Qt::DisplayRole) - return QVariant(); - - if (orientation == Qt::Horizontal) - return QString("Column %1").arg(section); - else - return QString("Row %1").arg(section); -} diff --git a/Client/stringlistmodel.h b/Client/stringlistmodel.h deleted file mode 100644 index 9e1dd09..0000000 --- a/Client/stringlistmodel.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Stringlistmodel class - * - * @author Toni Jussila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - * @exaple http://qt.nokia.com/doc/4.0/qt4-interview.html#example-code - */ - -#ifndef STRINGLISTMODEL_H -#define STRINGLISTMODEL_H -#include -#include -#include - -class StringListModel : public QAbstractListModel -{ - Q_OBJECT -public: - StringListModel(const QStringList &strings, QObject *parent = 0):QAbstractListModel(parent), stringList(strings) {} - int rowCount(const QModelIndex &parent = QModelIndex()) const; - QVariant data(const QModelIndex &index, int role) const; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - -private: - QStringList stringList; -}; - -#endif // STRINGLISTMODEL_H diff --git a/Client/welcomedialog.cpp b/Client/welcomedialog.cpp deleted file mode 100644 index a84c618..0000000 --- a/Client/welcomedialog.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Welcome dialog - * - * @author Toni Jussila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "welcomedialog.h" -#include "ui_welcomedialog.h" - -WelcomeDialog::WelcomeDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::WelcomeDialog) -{ - ui->setupUi(this); - this->setWindowTitle(" "); - movie = new QMovie("start.gif"); - ui->labelWelcome->setMovie(movie); - movie->start(); - connect(movie,SIGNAL(frameChanged(int)),this,SLOT(stop(int))); -} - -WelcomeDialog::~WelcomeDialog() -{ - delete ui; - movie->stop(); - delete movie; -} - -void WelcomeDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -void WelcomeDialog::stop(int currentFrame) -{ - if (currentFrame == 21) - { - movie->stop(); - this->close(); - } -} diff --git a/Client/welcomedialog.h b/Client/welcomedialog.h deleted file mode 100644 index 788a7ad..0000000 --- a/Client/welcomedialog.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Welcome dialog - * - * @author Toni Jussila - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef WELCOMEDIALOG_H -#define WELCOMEDIALOG_H - -#include -#include - -namespace Ui { - class WelcomeDialog; -} - -class WelcomeDialog : public QDialog { - Q_OBJECT -public: - WelcomeDialog(QWidget *parent = 0); - ~WelcomeDialog(); - -protected: - void changeEvent(QEvent *e); - -private: - Ui::WelcomeDialog *ui; - QMovie *movie; - -private slots: - void stop(int currentFrame); -}; - -#endif // WELCOMEDIALOG_H diff --git a/Client/welcomedialog.ui b/Client/welcomedialog.ui deleted file mode 100644 index 9aea76b..0000000 --- a/Client/welcomedialog.ui +++ /dev/null @@ -1,35 +0,0 @@ - - - WelcomeDialog - - - - 0 - 0 - 800 - 480 - - - - - - - - - 10 - 10 - 781 - 461 - - - - TextLabel - - - Qt::AlignCenter - - - - - - diff --git a/Client/xmlreader.cpp b/Client/xmlreader.cpp deleted file mode 100644 index 2bcc168..0000000 --- a/Client/xmlreader.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Parse xml file - * - * @author Toni Jussila - * @author Tiina Kivilinna-Korhola - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include -#include -#include "xmlreader.h" - -/** - *Constructor of this class. - */ -XmlReader::XmlReader() -{ - myCategoryList = new CategoryList(); -} - -/** - *Destructor of this class. Should be used to release all allocated resources. - */ -XmlReader::~XmlReader() -{ - category = ""; - unit = ""; - position = ""; - user = ""; - value = ""; - delete myCategoryList; -} - -/** - *This function is used to parse top 10 results of a certain category. - */ -void XmlReader::xmlReadTop10Results(QNetworkReply *device) -{ - qDebug() << "_xmlReadTop10Results"; - - int i = 0; - int receivedFlag = 0; - - xmlreader.clear(); - QByteArray array = device->readAll(); - qDebug() << "array: " << array; - xmlreader.addData(array); - //xmlreader.addData(device->readAll()); - - if(!(myCategoryList->top10List.isEmpty())) { - myCategoryList->top10List.clear(); - } - - //Go trough the xml document - while(!xmlreader.atEnd()) - { - //Read next node - xmlreader.readNext(); - //Check if this element is starting element - if(xmlreader.isStartElement()) - { - if(xmlreader.name() == "results") - { - qDebug() << xmlreader.name(); - } - if(xmlreader.name() == "result") - { - qDebug() << "result"; - attr = xmlreader.attributes(); - - user = attr.value("username").toString(); - position = attr.value("position").toString(); - date = attr.value("date").toString(); - unit = attr.value("unit").toString(); - value = attr.value("value").toString(); - - myCategoryList->top10List.append(position + "\t" + - user + "\t" + - value + " " + - unit + "\t" + - date + "\n"); - - qDebug() << position << user << value << unit << date; - i++; - receivedFlag = 1; - } - } - } - //Only change labelTopList if a new top10List has been received - if(receivedFlag) - { - qDebug() << "receivedTop10List() emitted"; - emit receivedTop10List(); - } -} - -void XmlReader::xmlReadCategories(QNetworkReply *device) -//void XmlReader::xmlReadCategories(QIODevice *device) -{ - qDebug() << "_xmlReadCategories"; - - int i = 0; - int receivedFlag = 0; - - xmlreader.clear(); - QByteArray array = device->readAll(); - qDebug() << "array: " << array; - xmlreader.addData(array); - //xmlreader.addData(device->readAll()); - - if(myCategoryList->sizeOfCategoryList() != 0) { - myCategoryList->clearCategoryList(); - } - myCategoryList->clearCats(); - - //Go trough the xml document - while(!xmlreader.atEnd()) - { - //Read next node - xmlreader.readNext(); - - //Check if this element is starting element - if(xmlreader.isStartElement()) - { - if(xmlreader.name() == "categories") - { - qDebug() << xmlreader.name(); - } - if(xmlreader.name() == "category") - { - qDebug() << xmlreader.name(); - attr = xmlreader.attributes(); - description = attr.value("description").toString(); - unit = attr.value("unit").toString(); - category = xmlreader.readElementText(); - myCategoryList->appendCategoryList(category); - myCategoryList->appendCats(i, description, unit, category); - //qDebug() << "i=" << i << myCategoryList->itemOfCategoryList(i); - //qDebug() << "description: " << description << "unit: " << unit << "category: " << category; - i++; - receivedFlag = 1; - } - } - } - //Only change comboBoxTopCategory if a new list has been received - if(receivedFlag) - { - qDebug() << "receivedCategoryList() emitted"; - emit receivedCategoryList(); - } -} - -/** - *This function is used to read example xml file (results.xml). - *@todo Read real xml. - */ -void XmlReader::xmlShow() -{ - //QString filename = "results.xml"; - QString filename = "xmlcategoryfile.xml"; - QFile file(filename); - - if (!file.open(QFile::ReadOnly)) - { - qDebug() << "_xmlShow fail"; - return; - } - - //xmlReadTop10Results(&file); - //xmlReadCategories(&file); - file.close(); -} - diff --git a/Client/xmlreader.h b/Client/xmlreader.h deleted file mode 100644 index 4a751a3..0000000 --- a/Client/xmlreader.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Parse xml file - * - * @author Toni Jussila - * @author Tiina Kivilinna-Korhola - * @copyright (c) 2010 Speed Freak team - * @license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef XMLREADER_H -#define XMLREADER_H - -#include -#include -#include -#include "categorylist.h" - -class XmlReader : public QObject { - Q_OBJECT -public: - XmlReader(); - ~XmlReader(); - CategoryList *myCategoryList; - -private: - QXmlStreamReader xmlreader; - - QXmlStreamAttributes attr; - QString category; - QString unit; - QString date; - QString position; - QString user; - QString value; - QString description; - -signals: - void receivedCategoryList(); - void receivedTop10List(); - -public slots: - void xmlReadTop10Results(QNetworkReply *device); - void xmlReadCategories(QNetworkReply *device); - //void xmlReadCategories(QIODevice *device); - void xmlShow(); -}; - -#endif // XMLREADER_H diff --git a/Client/xmlwriter.cpp b/Client/xmlwriter.cpp deleted file mode 100644 index fd46a6d..0000000 --- a/Client/xmlwriter.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Xml writer - * - * @author Tiina Kivilinna-Korhola - * @copyright (c) 2010 Speed Freak team - * license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#include "xmlwriter.h" - - - -/** - *@brief Constructor, connects object to GUI - *@param Pointer to carmainwindow, which is temporarily used during development - */ -XmlWriter::XmlWriter() -{ - tmpvalue = 3010; -} - -/** - *@brief Destructor - */ -XmlWriter::~XmlWriter() -{ - -} - -/** - *@brief Writes registration items into tags. - *@param netbuf a buffer where xmlstreamwriter writes to. - *@param usr for user name. - *@param psswd for password. - *@param email. - */ -void XmlWriter::writeRegistering(QBuffer *netbuf, QString usr, QString psswd, QString email) -{ - qDebug() << "_writeRegistering"; - - xmlwriter.setDevice(netbuf); - - xmlwriter.writeStartDocument(); - xmlwriter.writeStartElement("user"); - - xmlwriter.writeStartElement("login"); - xmlwriter.writeCharacters(usr); - xmlwriter.writeEndElement(); - - xmlwriter.writeStartElement("password"); - xmlwriter.writeCharacters(psswd); - xmlwriter.writeEndElement(); - - xmlwriter.writeStartElement("email"); - xmlwriter.writeCharacters(email); - xmlwriter.writeEndElement(); - - xmlwriter.writeEndElement(); - xmlwriter.writeEndDocument(); -} - - -/** - *@brief Writes Speed Freek results items as tags and contents into a buffer. - *@todo Consider looping when writing many values. - *@todo Replace test value to finally used variables. - */ -void XmlWriter::writeResult(QBuffer *netbuf) -{ - qDebug() << "_writeResult"; - - xmlwriter.setDevice(netbuf); - - xmlwriter.writeStartDocument(); - xmlwriter.writeStartElement("result"); - tmpvalue++; - qDebug() << tmpvalue; - xmlwriter.writeAttribute("value", QString::number(tmpvalue)); - xmlwriter.writeEndElement(); - xmlwriter.writeEndDocument(); -} - - -/** - *@brief Write track to server. - *@param netbuf where to write. - *@param counter is GPSData::roundCounter. - *@todo Decide suitable attributes. - */ -void XmlWriter::writeGpsTrack(QBuffer *netbuf, int counter, int start, int stop, int lat, int lon, int alt, int speed, int time) -{ - qDebug() << "_writeGpsTrack"; - - double *ptrValue; - //ptrValue = ptrTable; - double tmp = 0; - - xmlwriter.setDevice(netbuf); - - xmlwriter.writeStartDocument(); - - xmlwriter.writeStartElement("Route"); - xmlwriter.writeAttribute("starttime", QDateTime::currentDateTime().toString()); - xmlwriter.writeAttribute("endtime", QDateTime::currentDateTime().toString()); - xmlwriter.writeAttribute("points", QDateTime::currentDateTime().toString()); - for(int i = 0; i < counter; i++) - { - xmlwriter.writeStartElement("point"); - xmlwriter.writeAttribute("lat", QString::number(lat)); - xmlwriter.writeAttribute("lon", QString::number(lon)); - xmlwriter.writeAttribute("alt", QString::number(alt)); - xmlwriter.writeAttribute("speed", QString::number(speed)); - xmlwriter.writeAttribute("time", QString::number(time)); - xmlwriter.writeEndElement(); - } - xmlwriter.writeEndElement(); - xmlwriter.writeEndDocument(); -} - - -/** - *@brief Opens and closes a file, when xml information is written into a file, - *and passes file to writeXmlFile() - *@param usr for user name. - *@param psswd for password. - *@param email. - *@todo Replace hardcoced filename to finally GUI entry widget. - */ -//void XmlWriter::writeXml(QString usr, QString psswd, QString email) -void XmlWriter::writeXml() -{ - QString filename = "xmlcategoryfile.xml"; - QFile file(filename); - if (!file.open(QFile::WriteOnly | QFile::Text)) { - qDebug() << "_xmlWrite fail"; - return; - } - - writeXmlFile(&file); - //writeRegistering(&file, usr, psswd, email); - //writeResult(&file); - file.close(); -} - -/** - *@brief Writes general xml information. - *Calls other functions to insert login and result information. - *@param device: target of writing, here filename. - *@param usr for user name. - *@param psswd for password. - *@param email. - */ -bool XmlWriter::writeXmlFile(QIODevice *device) -{ - xmlwriter.setDevice(device); - xmlwriter.writeStartDocument(); - writeItems(); - xmlwriter.writeEndDocument(); - - return true; -} - - -/** - *@brief Writes Speed Freek results items as tags and contents to earlier defined target. - *@todo Consider looping when writing many values. - *@todo Replace testing values to finally used variabls. - */ -void XmlWriter::writeItems() -{ - xmlwriter.writeStartElement("result"); - xmlwriter.writeAttribute("value", QString::number(14)); //tmp testing value - xmlwriter.writeAttribute("unit", "seconds"); - xmlwriter.writeAttribute("date", QDateTime::currentDateTime().toString()); - xmlwriter.writeEndElement(); -} - diff --git a/Client/xmlwriter.h b/Client/xmlwriter.h deleted file mode 100644 index 5aba27a..0000000 --- a/Client/xmlwriter.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Xml writer - * - * @author Tiina Kivilinna-Korhola - * @copyright (c) 2010 Speed Freak team - * license http://opensource.org/licenses/gpl-license.php GNU Public License - */ - -#ifndef XMLWRITER_H -#define XMLWRITER_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -class XmlWriter : public QObject { - Q_OBJECT -public: - XmlWriter(); - ~XmlWriter(); - int tmpvalue; - int trackInd; - -private: - QXmlStreamWriter xmlwriter; - -public slots: - void writeRegistering(QBuffer *netbuf, QString usr, QString psswd, QString email); - void writeResult(QBuffer *netbuf); - void writeGpsTrack(QBuffer *netbuf, int counter, int start, int stop, int lat, int lon, int alt, int speed, int time); - bool writeXmlFile(QIODevice *device); - //void writeXml(QString usr, QString psswd, QString email); - void writeXml(); - void writeItems(); -}; - -#endif // XMLWRITER_H - -- 1.7.9.5