Added help and setting dialog's fonts changed bigger.
[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
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     double getResult();
29
30 signals:
31     void sendresult(double);
32
33 protected:
34     void changeEvent(QEvent *e);
35     void paintEvent(QPaintEvent *);
36
37 private:
38     QPoint changeMeasuresToDiagramPoint(int aSpeed, qreal aTime);
39     void setTimesIntoLabels();
40     void setTimeAxelLength(int pChoice);
41     void setHeaders();
42     void showOrHideLabels();
43     int getTargetChoice();
44
45 private:
46     Ui::ResultDialog *ui;
47     qreal timeArray[11];
48     double diagramGapStem;
49     double diagramGapHorizontal;
50     QStringList speedList;
51     QStringList timeList;
52     int timeAxelLength;
53     QString resultString;
54
55 private slots:
56     void on_pushButtonNew_clicked();
57     void on_pushButtonSend_clicked();
58 };
59
60 #endif // RESULTDIALOG_H