Removed duplicates.
[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
25     void setEnd(int pValue);
26     void setValue(int pSpeed, double pTime);
27     void setLabelInfoToUser(QString infoText);
28
29 signals:
30     void sendresult(double);
31
32 protected:
33     void changeEvent(QEvent *e);
34     void paintEvent(QPaintEvent *);
35
36 private:
37     QPoint changeMeasuresToDiagramPoint(int aSpeed, qreal aTime);
38     void setTimesIntoLabels();
39     void setTimeAxelLength(int pChoice);
40     void setHeaders();
41     void showOrHideLabels();
42     int getTargetChoice();
43
44 private:
45     Ui::ResultDialog *ui;
46     qreal timeArray[11];
47     double diagramGapStem;
48     double diagramGapHorizontal;
49     QStringList speedList;
50     QStringList timeList;
51     int timeAxelLength;
52     QString resultString;
53
54 private slots:
55     void on_pushButtonNew_clicked();
56     void on_pushButtonSend_clicked();
57 };
58
59 #endif // RESULTDIALOG_H