Commit graph

7 commits

Author SHA1 Message Date
Lubomir I. Ivanov
fc06a69c43 PrintDialog: reset the progress bar each time the dialog opens
This requires us to expose the progressBar as a private
class member.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 15:52:21 +02:00
Lubomir I. Ivanov
e4f35fb51a Print: fix some forward declarations
In the PrintLayout constructor we receive a pointer
of PrintDialog, but the type is incomplete, as we only
forward declare it in the class header. If we decide
to eventually call a method from PrintDialog we also
need to include printdialog.h in printlayout.cpp.

The patch also fixes a similar issue in printdialog.h.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 15:47:33 +02:00
Lubomir I. Ivanov
ecf483db46 PrintDialog: add a 'Close' button
The dialog was missing a 'Close' button so we add it.
Also change the mnemonic of the 'Preview' button, as it
was the same as the one for print 'Print'.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 14:14:04 +02:00
Lubomir I. Ivanov
d90cca5c4e PrintDialog: add separate Preview/Print buttons
We rename our old 'Print' button to 'Preview' (as it did just that),
and add a new one called 'Print' which does the direct printing,
by creating a QPrintDialog instance. Both buttons are located
on top of the dialog for now in a QHBoxLayout.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 13:51:34 +02: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
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
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