From eb1aa5a896c2bd46cb3eea3a7fb4cfd508a972ae Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 4 Dec 2013 13:41:19 +0200 Subject: 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 --- qt-ui/printdialog.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp index 8bf602c34..b4b8b129f 100644 --- a/qt-ui/printdialog.cpp +++ b/qt-ui/printdialog.cpp @@ -3,7 +3,9 @@ #include #include +#include #include +#include #include 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); -- cgit v1.2.3-70-g09d2