aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/printdialog.h
AgeCommit message (Collapse)Author
2014-08-05Printing: only give up if no size is availableGravatar Dirk Hohndel
Checking for available printers appears to sometimes fail, even if there is a valid PDF or PS printer. Instead we bail if we can't get a valid size for the printer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-04Print: display an error message if no printers are foundGravatar Lubomir I. Ivanov
When pressing Print or Preview from the PrintDialog, we need to first check if there are printers installed. If not we abort and show an error message. This is needed because if no printers are installed, things like the reported page height could be zero and the profile and table print code in PrintLayout will break. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Remove printing when building for AndroidGravatar Anton Lundin
Qt for Android doesn't support printing. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27Massive automated whitespace cleanupGravatar Dirk Hohndel
I know everyone will hate it. Go ahead. Complain. Call me names. At least now things are consistent and reproducible. If you want changes, have your complaint come with a patch to scripts/whitespace.pl so that we can automate it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-11Put include guard to every headerGravatar Boris Barbulovski
* ensure include guard to every header * comment endif guard block Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-09PrintDialog small improvements.Gravatar Boris Barbulovski
* Remove closeClicked() slot, and use QDialogs accept() slot * Simplify QObject::connect call by removing the QObject scope. Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-09PrintDialog class cleanup.Gravatar Boris Barbulovski
* Remove static PrintDialog::instance() method * Remove void PrintDialog::runDialog() method * construct/destruct print dialog on demand Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04PrintDialog: reset the progress bar each time the dialog opensGravatar Lubomir I. Ivanov
This requires us to expose the progressBar as a private class member. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04Print: fix some forward declarationsGravatar Lubomir I. Ivanov
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-04PrintDialog: add a 'Close' buttonGravatar Lubomir I. Ivanov
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-04PrintDialog: add separate Preview/Print buttonsGravatar Lubomir I. Ivanov
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-07-10Print: add a print preview for testing purposesGravatar Lubomir I. Ivanov
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-10Print: add a class for print layoutingGravatar Lubomir I. Ivanov
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-09Print: add UI for a print dialogGravatar Lubomir I. Ivanov
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>