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>
This commit is contained in:
Berthold Stoeger 2021-02-13 22:43:55 +01:00 committed by Dirk Hohndel
parent 18049bc8d0
commit 42cff9b3a5
10 changed files with 20 additions and 20 deletions

View file

@ -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();