-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathprocessingwindow.cpp
More file actions
55 lines (42 loc) · 1.18 KB
/
processingwindow.cpp
File metadata and controls
55 lines (42 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "processingwindow.h"
#include "ui_processingwindow.h"
#include "qprogressindicator.h"
ProcessingWindow::ProcessingWindow(QWidget *parent) :
QDialog(parent),
ui(new Ui::ProcessingWindow)
{
setWindowFlags(Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
ui->setupUi(this);
this->pi = new QProgressIndicator();
this->ui->horizontalLayout_2->layout()->addWidget(pi);
pi->startAnimation();
pi->setColor(QColor::fromRgb(255,255,255));
this->setFixedSize(QSize(this->width(), this->height()));
this->reset();
}
ProcessingWindow::~ProcessingWindow()
{
delete ui;
delete pi;
}
void ProcessingWindow::completed(QString str, bool error){
this->ui->widget->show();
this->ui->plainTextEdit->insertPlainText(str);
if(error){
this->ui->label_3->setPixmap(QPixmap("./resources/error.svg"));
}
}
void ProcessingWindow::reset(){
this->ui->widget->hide();
this->hide();
this->ui->label_3->setPixmap(QPixmap("./resources/success.svg"));
this->ui->plainTextEdit->clear();
}
void ProcessingWindow::on_pushButton_clicked()
{
this->reset();
}
void ProcessingWindow::on_ProcessingWindow_rejected()
{
this->reset();
}