summaryrefslogtreecommitdiffstats
path: root/qt-ui/printdialog.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-07-10 15:34:57 +0300
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-07-10 15:34:57 +0300
commit41bad7695ee40571062a370610e6ca518295e3c7 (patch)
tree6c3d960f36440edb3e5532a84400811004853d0a /qt-ui/printdialog.cpp
parent74f989bc46a06c124283fa851a06dd093f817c96 (diff)
downloadsubsurface-41bad7695ee40571062a370610e6ca518295e3c7.tar.gz
Print: add a class for print layouting
PrintLayout is a class that will handle the layouting part of dive profiles, text, tables depending on the settings of a QPrinter and the PrinterDialog and PrintOptions instances. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-ui/printdialog.cpp')
-rw-r--r--qt-ui/printdialog.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index e62cd718d..9774a79f6 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -16,6 +16,10 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f)
// options template (are we storing these in the settings?)
struct options tempOptions = {options::PRETTY, 0, 2, false, 65, 15, 12};
printOptions = tempOptions;
+
+ // create a print layout and pass the printer and options
+ printLayout = new PrintLayout(this, &printer, &printOptions);
+
/* temporary.
* add the PrintOptions widget and a Print button for testing purposes. */
optionsWidget = new PrintOptions(this, &printOptions);
@@ -40,4 +44,5 @@ void PrintDialog::runDialog()
void PrintDialog::printClicked(void)
{
// nop for now
+ printLayout->print();
}