From 02e9a6d07ba6abf558ba1dc9c5721f2429cfd566 Mon Sep 17 00:00:00 2001 From: Boris Barbulovski Date: Sat, 8 Feb 2014 20:12:13 +0100 Subject: PrintDialog class cleanup. * Remove static PrintDialog::instance() method * Remove void PrintDialog::runDialog() method * construct/destruct print dialog on demand Signed-off-by: Boris Barbulovski Signed-off-by: Dirk Hohndel --- qt-ui/printdialog.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'qt-ui/printdialog.cpp') diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp index e029ff09b..ba96ccccd 100644 --- a/qt-ui/printdialog.cpp +++ b/qt-ui/printdialog.cpp @@ -11,13 +11,6 @@ #include #include -PrintDialog *PrintDialog::instance() -{ - static PrintDialog *self = new PrintDialog(mainWindow()); - self->setAttribute(Qt::WA_QuitOnClose, false); - return self; -} - PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) { // options template (are we storing these in the settings?) @@ -52,6 +45,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) connect(printLayout, SIGNAL(signalProgress(int)), progressBar, SLOT(setValue(int))); progressBar->setMinimum(0); progressBar->setMaximum(100); + progressBar->setValue(0); progressBar->setTextVisible(false); layout->addWidget(progressBar); @@ -62,12 +56,6 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) setWindowIcon(QIcon(":subsurface-icon")); } -void PrintDialog::runDialog() -{ - progressBar->setValue(0); - exec(); -} - void PrintDialog::previewClicked(void) { QPrintPreviewDialog previewDialog(&printer, this); -- cgit v1.2.3-70-g09d2