Print: add a setup() method to PrintLayout

The setup() method will be called each time to obtain the
current printer settings. Also it calculates required scalling
based on screen agains printer DPI.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2013-07-10 16:04:00 +03:00
parent 41bad7695e
commit 20804b16d3
3 changed files with 25 additions and 1 deletions

View file

@ -43,6 +43,9 @@ void PrintDialog::runDialog()
void PrintDialog::printClicked(void)
{
// nop for now
// temporary
printer.setOutputFileName("print.pdf");
printer.setOutputFormat(QPrinter::PdfFormat);
// ---------
printLayout->print();
}