blob: a386192f1be3de5987d7674c4ac2582caef277d0 (
plain)
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
|
#include "ProgressWidget.h"
#include <QTimer>
ProgressWidget::ProgressWidget(QWidget *parent)
:QWidget(parent)
{
setupUi(this);
this->wascanceled = false;
connect(this->stopButton, SIGNAL(clicked()), this, SLOT(cancel()));
QTimer::singleShot(1000, this, SIGNAL(requestShow()));
}
bool ProgressWidget::wasCanceled() const
{
return this->wascanceled;
}
void ProgressWidget::cancel()
{
this->wascanceled = true;
}
void ProgressWidget::setRange(int minimum, int maximum)
{
this->progressBar->setRange(minimum, maximum);
}
void ProgressWidget::setValue(int progress)
{
this->progressBar->setValue(progress);
}
|