PrintDialog: add a progress bar in the dialog

This dialog will be eventually replaced by a better one, but
for now we can add a progress bar to it. Next step would be to
add separate Print/Preview buttons and emit progress bar updates
from the PrintLayout class.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2013-12-04 13:41:19 +02:00
parent 06711732c9
commit eb1aa5a896

View file

@ -3,7 +3,9 @@
#include <QDebug>
#include <QPushButton>
#include <QProgressBar>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPrintPreviewDialog>
PrintDialog *PrintDialog::instance()
@ -33,6 +35,13 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f)
connect(printButton, SIGNAL(clicked(bool)), this, SLOT(printClicked()));
layout->addWidget(printButton);
QProgressBar *progressBar = new QProgressBar();
connect(printLayout, SIGNAL(signalProgress(int)), progressBar, SLOT(setValue(int)));
progressBar->setMinimum(0);
progressBar->setMaximum(100);
progressBar->setTextVisible(false);
layout->addWidget(progressBar);
layout->addWidget(optionsWidget);
setFixedSize(520, 320);