summaryrefslogtreecommitdiffstats
path: root/printer.h
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-04-21 18:05:20 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-04 10:07:35 -0700
commit6de5cfb7a400897e6644668ffa9d0d4926b74590 (patch)
treeb11159f2375dc2d91e44e38863b7aa28a31885a5 /printer.h
parente2ad38189eb81eda213f775302efb44d2ed70c85 (diff)
downloadsubsurface-6de5cfb7a400897e6644668ffa9d0d4926b74590.tar.gz
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 <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'printer.h')
-rw-r--r--printer.h20
1 files changed, 20 insertions, 0 deletions
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 <QPrinter>
+#include <QWebView>
+
+class Printer : public QObject {
+ Q_OBJECT
+
+private:
+ QPrinter *printer;
+ QWebView *webView;
+ void render();
+
+public:
+ Printer(QPrinter *printer);
+ void print();
+};
+
+#endif //PRINTER_H