ff8b8050400b867f4aa8147f2ff777975f498c2e
[wpcreator] / src / progressdialog.cpp
1 #include "progressdialog.h"
2 #include "ui_progressdialog.h"
3
4 ProgressDialog::ProgressDialog(QWidget *parent) :
5     QDialog(parent),
6     m_ui(new Ui::ProgressDialog)
7 {
8     m_ui->setupUi(this);
9     m_ui->noticedButton->setVisible(false);
10     m_ui->doneLabel->setVisible(false);
11 }
12
13 ProgressDialog::~ProgressDialog()
14 {
15     delete m_ui;
16 }
17
18 void ProgressDialog::changeEvent(QEvent *e)
19 {
20     switch (e->type()) {
21     case QEvent::LanguageChange:
22         m_ui->retranslateUi(this);
23         break;
24     default:
25         break;
26     }
27 }
28
29
30 void ProgressDialog::updateInstallationStatus(int status) {
31     m_ui->progressBar->setValue(status);
32 }
33
34 void ProgressDialog::installationFinished () {
35     m_ui->progressBar->setValue(100);
36     m_ui->progressBar->setVisible(false);
37     m_ui->noticedButton->setVisible(true);
38     m_ui->doneLabel->setVisible(true);
39 }