Feature: Show average speed in realtime.
[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
35 protected:
36     void changeEvent(QEvent *e);
37
38 private:
39     Ui::RouteSaveDialog *ui;
40     QTimer *timerSatellitePicture;
41     QTimer *timerRoutePicture;
42     GPSData *gpsData;
43     Maemo5Location *location;
44     QString gpsSpeed;
45     QPixmap *pixmapRouteStop;
46     QPixmap *pixmapRouteStart;
47     QIcon *iconRouteStop;
48     QIcon *iconRouteStart;
49     bool buttonStatus;
50     double averageSpeed;
51     double speed;
52     double allSpeeds;
53     int speedCount;
54
55 private slots:
56     void on_pushButtonInfo_clicked();
57     void on_buttonRouteStartStop_clicked();
58     void timerSatellitePictureTimeout();
59     void timerRoutePictureTimeout();
60     void gpsStatus();
61     void sendRoute();
62     void killHelpDialog();
63
64 signals:
65     void sendroute();
66
67 };
68
69 #endif // ROUTESAVEDIALOG_H