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>
This commit is contained in:
Lubomir I. Ivanov 2013-07-10 15:34:57 +03:00
parent 74f989bc46
commit 41bad7695e
6 changed files with 91 additions and 1 deletions

View file

@ -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();
}