-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathprogressdialog.cpp
More file actions
53 lines (43 loc) · 1.02 KB
/
Copy pathprogressdialog.cpp
File metadata and controls
53 lines (43 loc) · 1.02 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
#include "progressdialog.h"
#include "ui_progressdialog.h"
CProgressDialog::CProgressDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::CProgressDialog)
{
ui->setupUi(this);
ui->label->setText(tr("Searching registry"));
ui->progressBar->setMinimum(0);
ui->progressBar->setMaximum(0);
setWindowTitle(tr("Registry Editor search"));
setWindowModality(Qt::WindowModal);
connect(ui->buttonCancel,&QPushButton::clicked,[this](){
m_canceled = true;
Q_EMIT cancel();
});
}
CProgressDialog::~CProgressDialog()
{
delete ui;
}
bool CProgressDialog::wasCanceled()
{
const bool c = m_canceled;
m_canceled = false;
return c;
}
void CProgressDialog::setLabelText(const QString &text)
{
ui->label->setText(text);
}
void CProgressDialog::setMinimum(int min)
{
ui->progressBar->setMinimum(min);
}
void CProgressDialog::setMaximum(int max)
{
ui->progressBar->setMaximum(max);
}
void CProgressDialog::setValue(int value)
{
ui->progressBar->setValue(value);
}