45 #include "BlockingWidget.hh" 47 void BlockingWidget::cancelPressed() {
51 emit cancelRequested(button->jobId());
56 BlockingWidget::BlockingWidget(QString _jobId, QString _description,
57 int _minSteps,
int _maxSteps, QWidget* _parent ) : QWidget(_parent),
64 setWindowModality(Qt::ApplicationModal);
65 setWindowTitle(_jobId);
70 layout_ =
new QVBoxLayout();
71 description_ =
new QLabel(_description);
72 layout_->addWidget(description_);
74 progress_ =
new QProgressBar();
75 progress_->setMinimum(_minSteps);
76 progress_->setMaximum(_maxSteps);
77 progress_->setValue(0);
78 progress_->setTextVisible(
true);
79 layout_->addWidget(progress_);
82 layout_->addWidget(cancelButton_);
87 connect(cancelButton_, SIGNAL(pressed()),
this, SLOT(cancelPressed()));
90 void BlockingWidget::updateStatus(
int _value) { progress_->setValue(_value); };
92 void BlockingWidget::setJobId(QString _jobId) { setWindowTitle(_jobId); };
94 void BlockingWidget::setJobDescription(QString _description) { description_->setText(_description); };