summaryrefslogtreecommitdiffstats
path: root/printer.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-20 06:14:19 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-20 06:14:19 -0700
commite3a8ff74934c8f5a11ee962650e889464da55522 (patch)
tree6bd206e1df040c4b504e00f5c71e295b8d17b6bd /printer.h
parent7baa18db5fe33f5797e4603a4c2efafc6b474bd0 (diff)
parent599920c6cfd87a213634097045e29f592390438b (diff)
downloadsubsurface-e3a8ff74934c8f5a11ee962650e889464da55522.tar.gz
Merge branch 'custom-print' of github.com:neolit123/subsurface
Diffstat (limited to 'printer.h')
-rw-r--r--printer.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/printer.h b/printer.h
index 4ab65834a..b4cf3ac2a 100644
--- a/printer.h
+++ b/printer.h
@@ -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);