summaryrefslogtreecommitdiffstats
path: root/qt-ui/printdialog.cpp
diff options
context:
space:
mode:
authorGravatar Boris Barbulovski <bbarbulovski@gmail.com>2014-02-08 20:12:13 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-09 08:15:42 -0800
commit02e9a6d07ba6abf558ba1dc9c5721f2429cfd566 (patch)
treeab404cfdaebd75578e2ca7dba2772ac8ea541d25 /qt-ui/printdialog.cpp
parent3086741d494feeffe77a77776d642b7266eda559 (diff)
downloadsubsurface-02e9a6d07ba6abf558ba1dc9c5721f2429cfd566.tar.gz
PrintDialog class cleanup.
* Remove static PrintDialog::instance() method * Remove void PrintDialog::runDialog() method * construct/destruct print dialog on demand Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/printdialog.cpp')
-rw-r--r--qt-ui/printdialog.cpp14
1 files changed, 1 insertions, 13 deletions
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 <QPrintPreviewDialog>
#include <QPrintDialog>
-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);