Printing: pass the template_options struct to TemplateLayout

The template_options struct needs to be passed to TemplateLayout
constructor.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Gehad elrobey 2015-07-02 22:26:31 +02:00 committed by Lubomir I. Ivanov
parent 71561e720d
commit bc80fc8849
5 changed files with 15 additions and 6 deletions

View file

@ -4,19 +4,21 @@
#include <grantlee_templates.h>
#include "mainwindow.h"
#include "printoptions.h"
#include "templateedit.h"
int getTotalWork(print_options *printOptions);
class TemplateLayout : public QObject {
Q_OBJECT
public:
TemplateLayout(print_options *PrintOptions);
TemplateLayout(print_options *PrintOptions, template_options *templateOptions);
~TemplateLayout();
QString generate();
private:
Grantlee::Engine *m_engine;
print_options *PrintOptions;
template_options *templateOptions;
signals:
void progressUpdated(int value);
@ -75,6 +77,7 @@ public:
};
Q_DECLARE_METATYPE(Dive)
Q_DECLARE_METATYPE(template_options)
GRANTLEE_BEGIN_LOOKUP(Dive)
if (property == "number")