X-Git-Url: http://git.maemo.org/git/?p=speedfreak;a=blobdiff_plain;f=Client%2Fcarmainwindow.h;h=934a48c200c029b1fa2b1c25872ad4fcc7524df5;hp=90cdc61a526608e55973b1b43e313480524d21c8;hb=acab884d9184ede381917fe2f4cd6786b7fc1ceb;hpb=ceaaf5439cc6d92466365b40e68f28744b0421a3 diff --git a/Client/carmainwindow.h b/Client/carmainwindow.h index 90cdc61..934a48c 100644 --- a/Client/carmainwindow.h +++ b/Client/carmainwindow.h @@ -5,6 +5,8 @@ * @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 */ @@ -25,6 +27,7 @@ #include #include #include +#include #include "resultdialog.h" //#include "measuredialog.h" #include "welcomedialog.h" @@ -39,6 +42,9 @@ #include "categorylist.h" #include "httpclient.h" #include "routedialog.h" +#include "calculate.h" +#include "gpsdata.h" +#include namespace Ui { class CarMainWindow; @@ -69,10 +75,15 @@ private: HttpClient *myHttpClient; LoginWindow *myLogin; RouteDialog *myRoute; + GPSData *gpsData; + Maemo5Location *location; //void initCategoryCompoBox(); void initComboBoxStartTabUnits(); //Start-tab view void initListViewStartTabAccelerationCategories(); //Start-tab view void initializeMeasures(); + void resetAccelerometerMeasurements(); + void calibrateAccelerometer(); + void setTimeAxisGapAndShowResult(double pTime); private: QStringList accelerationCategoriesStartTab; //Start-tab view @@ -88,12 +99,41 @@ private: QModelIndex choice; int choiceInt; + 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; + + int counterForSaveResults; + signals: void speedAchieved(); void userNameChanged(); private slots: void on_pushButtonShowResultDialog_clicked(); + void on_gpsOnCheckBox_stateChanged(int GPSState); //Route-tab view + void gpsStatus(); //Route-tab view void on_drawRoutePushButton_clicked(); void on_pushButtonSendResult_clicked(); void on_pushButtonMeasureTabAbort_clicked(); @@ -112,6 +152,8 @@ private slots: void updateUserName(); void regUserToServer(); void userLogin(); + void readAccelerometerData(); + void handleCheckPoint(double totalTime, double currentSpeed); }; #endif // CARMAINWINDOW_H