summaryrefslogtreecommitdiffstats
path: root/qt-ui/printdialog.cpp
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-07-10 21:30:18 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-07-20 15:27:56 +0300
commit3a6963836682aa0e0e2825db4eaac7ea48a9939b (patch)
tree8bf8cbc1e5bfac2ce4a808482bc2ea4be499bbfb /qt-ui/printdialog.cpp
parent142fd950c8d69dc4d4aad4034fe65ca400d37783 (diff)
downloadsubsurface-3a6963836682aa0e0e2825db4eaac7ea48a9939b.tar.gz
Printing: check for different printing modes
Add PRINT/PREVIEW print modes, check for printing modes before casting. We must pass a QPaintDevice with type QPixmap for previewing and with type QPrinter for actual printing. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-ui/printdialog.cpp')
-rw-r--r--qt-ui/printdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index 9ff29e67b..0a2c7898f 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -45,7 +45,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
optionsWidget = new PrintOptions(this, &printOptions, &templateOptions);
// create a new printer object
- printer = new Printer(&qprinter, &printOptions, &templateOptions);
+ printer = new Printer(&qprinter, &printOptions, &templateOptions, Printer::PRINT);
QVBoxLayout *layout = new QVBoxLayout(this);
setLayout(layout);