summaryrefslogtreecommitdiffstats
path: root/printer.h
diff options
context:
space:
mode:
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);