Print: add experimental code for printing profiles

PrintLayout::printSixDives() goes trough all dives
and prints their profiles on full portrait pages.

This method is based on resizing the ProfileGraphicsView
widget, plotting each dive and then 'grabbing' it using
QPixmap::grabWidget().

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2013-07-12 19:23:47 +03:00 committed by Dirk Hohndel
parent 8ea849d0c2
commit b241b7c06a
2 changed files with 39 additions and 7 deletions

View file

@ -47,6 +47,7 @@ void PrintDialog::printClicked(void)
// printer.setOutputFileName("print.pdf");
// printer.setOutputFormat(QPrinter::PdfFormat);
// temporary: use a preview dialog
printer.setResolution(300);
QPrintPreviewDialog previewDialog(&printer, this);
QObject::connect(&previewDialog, SIGNAL(paintRequested(QPrinter *)), this, SLOT(onPaintRequested(QPrinter *)));
previewDialog.exec();