Commit graph

6 commits

Author SHA1 Message Date
Lubomir I. Ivanov
b241b7c06a 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>
2013-07-18 12:00:12 -07:00
Lubomir I. Ivanov
9dc45af915 Print: add a print preview for testing purposes
Use a QPrintPreviewDialog, while the print logic is WIP.
This way Qt will show the print output in a window instead
of exporting to a file and opending it manualy.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-10 19:27:10 +03:00
Lubomir I. Ivanov
20804b16d3 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>
2013-07-10 16:18:16 +03:00
Lubomir I. Ivanov
41bad7695e 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>
2013-07-10 15:34:57 +03:00
Lubomir I. Ivanov
2c7a208bc1 Print: label update on height slider move
The PrintOptions widget has value labels next to the
horizontal sliders. Add slots to update these labels
when a slider moves.

Patch also makes a modification so that the PrintOptions
constructor requires a 'struct options' pointer. If
an options struct is not received we do not set predefined
values and do not connect signals to slots, where
options will be updated immediately.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-10 09:57:24 +03:00
Lubomir I. Ivanov
52534bfb68 Print: add UI for a print dialog
PrintOptions is a QWidget class to be used as an
addition to a future print dialog (possibly based on
QPrintDialog). Currently only contains a couple of
radio buttons.

PrintDialog (printdialog.cpp/h) which is a basic QDialog
is currently added for testing only and it holds
an instance of PrintOptions.

Calling File->Print opens this test dialog for now.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-09 21:01:42 +03:00