diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-02-13 22:43:55 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-02-17 07:26:55 -0800 |
commit | 42cff9b3a506d2b52739d8714d5698e1a3b2e3f9 (patch) | |
tree | f473c21e7d8e056f1630078dc7207c35dd912d54 /desktop-widgets/printer.h | |
parent | 18049bc8d08a4e223a9824efb26b710e6bca1958 (diff) | |
download | subsurface-42cff9b3a506d2b52739d8714d5698e1a3b2e3f9.tar.gz |
planner: pass in_planner down to TemplateLayout
The TemplateLayout prints different dives depending on
whether the planner is active. Instead of accessing a
global variable, pass the status down from the MainWindow.
That's all quite convoluted, since there are multiple
layers involved.
On the positive side, the in_planner() function has now
no users an can be removed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/printer.h')
-rw-r--r-- | desktop-widgets/printer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-widgets/printer.h b/desktop-widgets/printer.h index 8030e9f75..43a1fa9b7 100644 --- a/desktop-widgets/printer.h +++ b/desktop-widgets/printer.h @@ -27,6 +27,7 @@ private: const template_options &templateOptions; QSize pageSize; PrintMode printMode; + bool inPlanner; int done; int dpi; void render(int Pages); @@ -38,7 +39,7 @@ private slots: void templateProgessUpdated(int value); public: - Printer(QPaintDevice *paintDevice, const print_options &printOptions, const template_options &templateOptions, PrintMode printMode); + Printer(QPaintDevice *paintDevice, const print_options &printOptions, const template_options &templateOptions, PrintMode printMode, bool inPlanner); ~Printer(); void print(); void previewOnePage(); |