From 6de5cfb7a400897e6644668ffa9d0d4926b74590 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Tue, 21 Apr 2015 18:05:20 +0200 Subject: Printing: Add Printer class that holds the rendering logic. Render Html pages into a QWebView then print it using QPainter. the Printer::print() is called that prepare the HTML file to be rendered by the QWebView. Printer::render() will do the rendering task. Signed-off-by: Gehad elrobey Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- printer.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 printer.h (limited to 'printer.h') diff --git a/printer.h b/printer.h new file mode 100644 index 000000000..3b574d126 --- /dev/null +++ b/printer.h @@ -0,0 +1,20 @@ +#ifndef PRINTER_H +#define PRINTER_H + +#include +#include + +class Printer : public QObject { + Q_OBJECT + +private: + QPrinter *printer; + QWebView *webView; + void render(); + +public: + Printer(QPrinter *printer); + void print(); +}; + +#endif //PRINTER_H -- cgit v1.2.3-70-g09d2