Invisible registerdialog picture.
[speedfreak] / Client / calibratedialog.cpp
1 /*
2  * Calibrate dialog
3  *
4  * @author      Kai Rasilainen <kai.rasilainen@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 #include "calibratedialog.h"
11 #include "ui_calibratedialog.h"
12
13 /**
14   * Default constructor for Calibrate dialog class.
15   *
16   */
17 CalibrateDialog::CalibrateDialog(QWidget *parent) :
18     QDialog(parent),
19     ui(new Ui::CalibrateDialog)
20 {
21     ui->setupUi(this);
22     this->setWindowTitle("Calibrating...");
23 }
24
25 /**
26   * Default destructor for Calibrate dialog class.
27   * Deletes all dynamic objects and sets them to NULL.
28   */
29 CalibrateDialog::~CalibrateDialog()
30 {
31     delete ui;
32 }
33
34 /**
35   *
36   */
37 void CalibrateDialog::changeEvent(QEvent *e)
38 {
39     QDialog::changeEvent(e);
40     switch (e->type()) {
41     case QEvent::LanguageChange:
42         ui->retranslateUi(this);
43         break;
44     default:
45         break;
46     }
47 }
48
49 /**
50   * Set progressbar value.
51   *
52   * @param int progressbar value.
53   */
54 void CalibrateDialog::setProgressValue(int value)
55 {
56     ui->progressBar->setValue(value);
57 }
58
59 /**
60   * Reset progressbar value.
61   */
62 void CalibrateDialog::resetProgressValue()
63 {
64     ui->progressBar->reset();
65 }
66
67 /**
68   * Set max value.
69   *
70   * @param int max
71   */
72 void CalibrateDialog::setMaxValue(int max)
73 {
74     ui->progressBar->setMaximum( max );
75 }
76
77 /**
78   * Set title.
79   *
80   * @param QString title
81   */
82 void CalibrateDialog::setTitle(QString title)
83 {
84     this->setWindowTitle(title);
85 }