diff options
author | 2015-07-20 06:14:19 -0700 | |
---|---|---|
committer | 2015-07-20 06:14:19 -0700 | |
commit | e3a8ff74934c8f5a11ee962650e889464da55522 (patch) | |
tree | 6bd206e1df040c4b504e00f5c71e295b8d17b6bd /printer.h | |
parent | 7baa18db5fe33f5797e4603a4c2efafc6b474bd0 (diff) | |
parent | 599920c6cfd87a213634097045e29f592390438b (diff) | |
download | subsurface-e3a8ff74934c8f5a11ee962650e889464da55522.tar.gz |
Merge branch 'custom-print' of github.com:neolit123/subsurface
Diffstat (limited to 'printer.h')
-rw-r--r-- | printer.h | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -13,23 +13,32 @@ class Printer : public QObject { Q_OBJECT +public: + enum PrintMode { + PRINT, + PREVIEW + }; + private: - QPrinter *printer; + QPaintDevice *paintDevice; QWebView *webView; print_options *printOptions; template_options *templateOptions; QSize pageSize; + PrintMode printMode; int done; int dpi; - void render(); + void render(int Pages); void putProfileImage(QRect box, QRect viewPort, QPainter *painter, struct dive *dive, QPointer<ProfileWidget2> profile); private slots: void templateProgessUpdated(int value); public: - Printer(QPrinter *printer, print_options *printOptions, template_options *templateOptions); + Printer(QPaintDevice *paintDevice, print_options *printOptions, template_options *templateOptions, PrintMode printMode); + ~Printer(); void print(); + void previewOnePage(); signals: void progessUpdated(int value); |