Route and Results buttons updated.
[speedfreak] / Client / routesavedialog.h
1 /*
2  * Route save dialog class
3  *
4  * @author     Toni Jussila <toni.jussila@fudeco.com>
5  * @copyright  (c) 2010 Speed Freak team
6  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
7  */
8
9 #ifndef ROUTESAVEDIALOG_H
10 #define ROUTESAVEDIALOG_H
11
12 #include <QDialog>
13 #include <QPixmap>
14 #include <QIcon>
15 #include <QSize>
16 #include <QTimer>
17 #include <maemo5location.h>
18 #include "gpsdata.h"
19 #include "routedialog.h"
20 #include <helproutingdialog.h>
21
22 namespace Ui {
23     class RouteSaveDialog;
24 }
25
26 class RouteSaveDialog : public QDialog {
27     Q_OBJECT
28 public:
29     RouteSaveDialog(QWidget *parent = 0);
30     ~RouteSaveDialog();
31     RouteDialog *routeDialog;
32     HelpRoutingDialog *helpRoutingDialog;
33     double getAverageSpeed();
34     QString getDistanceTraveled();
35
36 protected:
37     void changeEvent(QEvent *e);
38
39 private:
40     Ui::RouteSaveDialog *ui;
41     QTimer *timerSatellitePicture;
42     QTimer *timerRoutePicture;
43     GPSData *gpsData;
44     Maemo5Location *location;
45     QString gpsSpeed;
46     QString distanceString;
47     QPixmap *pixmapRouteStop;
48     QPixmap *pixmapRouteStart;
49     QIcon *iconRouteStop;
50     QIcon *iconRouteStart;
51     bool buttonStatus;
52     double averageSpeed;
53     double speed;
54     double allSpeeds;
55     int speedCount;
56
57 private slots:
58     void on_pushButtonInfo_clicked();
59     void on_buttonRouteStartStop_clicked();
60     void timerSatellitePictureTimeout();
61     void timerRoutePictureTimeout();
62     void gpsStatus();
63     void sendRoute();
64     void killHelpDialog();
65
66 signals:
67     void sendroute();
68
69 };
70
71 #endif // ROUTESAVEDIALOG_H