summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-12-04 13:41:19 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-12-04 13:41:19 +0200
commiteb1aa5a896c2bd46cb3eea3a7fb4cfd508a972ae (patch)
treea5ba087abfb735d68bdc5064e034d594b0ec9e62 /qt-ui
parent06711732c94600c8b3106b2e3260ebd69de53a98 (diff)
downloadsubsurface-eb1aa5a896c2bd46cb3eea3a7fb4cfd508a972ae.tar.gz
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>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/printdialog.cpp9
1 files changed, 9 insertions, 0 deletions
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 <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);