diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2014-11-14 00:57:42 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-13 15:05:11 -0800 |
commit | 7ea728e95ffcc72360d49648d7e332a06faa49ba (patch) | |
tree | cfb07ab36c024febdab25c2e67a90d7eef825b2a /qt-ui/printlayout.cpp | |
parent | b2077dc9c0bb9eeccbf48980d0d22269b621e8c3 (diff) | |
download | subsurface-7ea728e95ffcc72360d49648d7e332a06faa49ba.tar.gz |
Print: add the support to store margins and printer options
All the print options will be stored after the user closes
or "cancels" the print dialog.
There seems to be no good way to store the last
selected page size, because print dialogs are different and
some just list them as strings - A4, A3, etc.
The patch also applies the following changes:
- renames display.h's 'struct options' to 'struct print_options'
as these were really just for the print dialog
- the print_options dialog now stores more options as 'bool'
- demote PrintDialog's 'printOptions' to 'private'
Fixes #653
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/printlayout.cpp')
-rw-r--r-- | qt-ui/printlayout.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index f9b71d9b3..63819ad48 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -17,7 +17,7 @@ #include "models.h" #include "modeldelegates.h" -PrintLayout::PrintLayout(PrintDialog *dialogPtr, QPrinter *printerPtr, struct options *optionsPtr) +PrintLayout::PrintLayout(PrintDialog *dialogPtr, QPrinter *printerPtr, struct print_options *optionsPtr) { dialog = dialogPtr; printer = printerPtr; @@ -74,16 +74,16 @@ void PrintLayout::print() return; } switch (printOptions->type) { - case options::PRETTY: + case print_options::PRETTY: printProfileDives(3, 2); break; - case options::ONEPERPAGE: + case print_options::ONEPERPAGE: printProfileDives(1, 1); break; - case options::TWOPERPAGE: + case print_options::TWOPERPAGE: printProfileDives(2, 1); break; - case options::TABLE: + case print_options::TABLE: printTable(); break; } |