mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Printing: pass the print_options struct to TemplateLayout and Printer
As the print_options struct is needed by both TemplateLayout and Printer class, it can be passed to their constructor. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
42b9d0d047
commit
60c5e3cf25
5 changed files with 12 additions and 6 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <QPainter>
|
||||
|
||||
#include "profile/profilewidget2.h"
|
||||
#include "printoptions.h"
|
||||
|
||||
class Printer : public QObject {
|
||||
Q_OBJECT
|
||||
|
@ -14,6 +15,7 @@ class Printer : public QObject {
|
|||
private:
|
||||
QPrinter *printer;
|
||||
QWebView *webView;
|
||||
print_options *printOptions;
|
||||
void render();
|
||||
void putProfileImage(QRect box, QRect viewPort, QPainter *painter, struct dive *dive, QPointer<ProfileWidget2> profile);
|
||||
int done;
|
||||
|
@ -22,7 +24,7 @@ private slots:
|
|||
void templateProgessUpdated(int value);
|
||||
|
||||
public:
|
||||
Printer(QPrinter *printer);
|
||||
Printer(QPrinter *printer, print_options *printOptions);
|
||||
void print();
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue