mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
06711732c9
commit
eb1aa5a896
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue