Added function to kill usersDialog when dialog is closed.
[speedfreak] / Client / resultdialog.h
1 /*
2  * Result dialog
3  *
4  * @author     Janne Änäkkälä   <janne.anakkala@fudeco.com>
5  * @author      Toni Jussila    <toni.jussila@fudeco.com>
6  * @copyright  (c) 2010 Speed Freak team
7  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
8  */
9
10 #ifndef RESULTDIALOG_H
11 #define RESULTDIALOG_H
12
13 #include <QDialog>
14 #include <helpaccelerationdialog.h>
15
16
17 namespace Ui {
18     class ResultDialog;
19 }
20
21 class ResultDialog : public QDialog {
22     Q_OBJECT
23 public:
24     ResultDialog(QWidget *parent = 0);
25     ~ResultDialog();
26     HelpAccelerationDialog *helpAccelerationDialog;
27
28     void setEnd(int pValue);
29     void setValue(int pSpeed, double pTime);
30     void setLabelInfoToUser(QString infoText);
31     double getResult();
32     void setSendServerButtonEnabled();
33
34 signals:
35     void sendresult(double);
36
37 protected:
38     void changeEvent(QEvent *e);
39     void paintEvent(QPaintEvent *);
40
41 private:
42     QPoint changeMeasuresToDiagramPoint(int aSpeed, qreal aTime);
43     void setTimesIntoLabels();
44     void setTimeAxelLength(int pChoice);
45     void setHeaders();
46     void showOrHideLabels();
47     int getTargetChoice();
48
49 private:
50     Ui::ResultDialog *ui;
51     qreal timeArray[11];
52     double diagramGapStem;
53     double diagramGapHorizontal;
54     QStringList speedList;
55     QStringList timeList;
56     int timeAxelLength;
57     QString resultString;
58
59 private slots:
60     void on_pushButtonEMail_clicked();
61     void on_pushButtonInfo_clicked();
62     void on_pushButtonNew_clicked();
63     void on_pushButtonSend_clicked();
64     void killHelpDialog();
65 };
66
67 #endif // RESULTDIALOG_H