mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
6de5cfb7a4
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>
20 lines
263 B
C++
20 lines
263 B
C++
#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
|