cf3cc400320abeb32b788e6eab10fe4c3117085f
[speedfreak] / Client / resultdialog.h
1 /*
2  * CarMainWindow main class
3  *
4  * @author     Janne Änäkkälä <janne.anakkala@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 RESULTDIALOG_H
10 #define RESULTDIALOG_H
11
12 #include <QDialog>
13 //#include "measures.h"
14
15 namespace Ui {
16     class ResultDialog;
17 }
18
19 class ResultDialog : public QDialog {
20     Q_OBJECT
21 public:
22     ResultDialog(QWidget *parent = 0);
23     ~ResultDialog();
24     //void saveMeasuresToArray(Measures *pMeasures);
25     void setDiagramGapStem(double pDiagramGapStem);
26     void setDiagramGapHorizontal(double pDiagramGapHorizontal);
27
28     void setEnd(int pValue);
29     void setValue(int pSpeed, double pTime);
30
31 signals:
32     void sendresult(double result);
33
34 protected:
35     void changeEvent(QEvent *e);
36     void paintEvent(QPaintEvent *);
37
38 private:
39     QPoint changeMeasuresToDiagramPoint(int aSpeed, qreal aTime);
40     void setTimesIntoLabels();
41     void setTimeAxelLength();
42
43 private:
44     Ui::ResultDialog *ui;
45     qreal timeArray[11];
46     double diagramGapStem;
47     double diagramGapHorizontal;
48     QStringList speedList;
49     QStringList timeList;
50     int timeAxelLength;
51
52 private slots:
53     void on_pushButtonNew_clicked();
54     void on_pushButtonSend_clicked();
55 };
56
57 #endif // RESULTDIALOG_H