From 41bad7695ee40571062a370610e6ca518295e3c7 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 10 Jul 2013 15:34:57 +0300 Subject: 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 --- qt-ui/printdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qt-ui/printdialog.cpp') 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(); } -- cgit v1.2.3-70-g09d2